Skip to content

Instantly share code, notes, and snippets.

View avtar's full-sized avatar

Avtar Gill avtar

  • Inclusive Design Research Centre
  • Toronto, Canada
View GitHub Profile
# Jumbo frames are enabled on the compute nodes and switches in the cluster
# so we are able to utilize more bandwidth at the VM level by increasing
# the ethernet frame payload size to 9000 bytes
ifconfig eth0 mtu 9000
# Increase the transmit queue length
ifconfig eth0 txqueuelen 10000
# Increase the receive and send buffers to 16MB
net.core.rmem_max=16777216
@avtar
avtar / couchdb.conf
Created October 2, 2013 20:19
Nginx reverse proxy config for CouchDB, taking master-master replication into account
upstream couchdb_servers {
server couchdb1:5984 max_fails=0 fail_timeout=10s;
server couchdb2:5984 max_fails=0 fail_timeout=10s;
}
location / {
proxy_pass http://couchdb_servers:5984;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@avtar
avtar / couchdb replication command
Created October 10, 2013 01:43
Trigger replication of a database
curl \
-H "Content-Type: application/json" \
-X POST http://admin:password@localhost:5984/_replicate \
-d '{"source":"http://couchdb-rw1:5984/user", "target":"http://admin:password@127.0.0.1:5984/user", "create_target": true, "continuous":true}'
- job:
name: 'first-discovery'
project-type: 'freestyle'
display-name: 'First Discovery Preferences Editor Tool'
scm:
- git:
url: https://github.com/fluid-project/first-discovery.git
branches:
- master
triggers:
@avtar
avtar / tsung_config.xml
Created July 24, 2014 20:51
Revised Tsung config for the Costing project
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd" [] >
<tsung loglevel="warning">
<clients>
{% for host in groups['tsung_clients'] %}
<client host="{{ host }}" weight="1" maxusers="40000" cpu="4" />
{% endfor %}
</clients>
@avtar
avtar / Vagrantfile
Last active May 9, 2017 20:47
Vagrant shell provisioner that runs ansible-playbook
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/centos-7.0"
config.vm.network "forwarded_port", guest: 8080, host: 8080
@avtar
avtar / set-up-gpii-win-8.1.yml
Created November 8, 2014 00:29
Managing GPII Windows test VMs using Jenkins and OpenStack
- job:
name: set-up-gpii-win-8.1
project-type: freestyle
node: master
concurrent: false
builders:
- shell: |
source /var/lib/jenkins/secrets/jenkins_openrc.sh
nova --insecure boot --image win81eval_gpii_snapshot --flavor n1.medium --security-groups default,jenkins,windows --poll gpii-jenkins-windows81
@avtar
avtar / create_gpiitestuser.cmd
Last active August 29, 2015 14:09
GPII test user account creation and Jenkins provisioning using cloudbase-init
SET ThisScriptsDirectory=%~dp0
SET PowerShellScriptPath=%ThisScriptsDirectory%create_gpiitestuser.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File """"%PowerShellScriptPath%"""" -nodejsVersion """"0.10.33"""" ' -Verb RunAs}";
@avtar
avtar / asterics-p4allbuildingblocks.yml
Last active August 29, 2015 14:19
Example Jenkins Job Builder configuration for AsTeRICS P4AllBuildingBlocks
- job:
name: 'asterics-P4AllBuildingBlocks'
project-type: 'freestyle'
display-name: 'AsTeRICS components for the Prosperity For All project'
scm:
- git:
url: https://github.com/asterics/P4AllBuildingBlocks.git
branches:
- master
triggers:
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd" [] >
<tsung loglevel="warning">
<clients>
{% for host in groups['tsung_clients'] %}
<client host="{{ host }}" weight="1" maxusers="40000" cpu="4" />
{% endfor %}
</clients>