Skip to content

Instantly share code, notes, and snippets.

View clintkitson's full-sized avatar

Clint Kitson clintkitson

View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This configuration requires Vagrant 1.5 or newer and two plugins:
#
# vagrant plugin install vagrant-hosts ~> 2.1.4
# vagrant plugin install vagrant-auto_network ~> 1.0.0
#
# After installation, the following steps will spin up a master and agent that
# can communicate with each other:
@clintkitson
clintkitson / gist:701373d87daa7343415a
Last active February 12, 2016 15:50
build and test volume drivers in docker using boot2docker and docker-machine form os x cli
docker-machine create --driver=virtualbox testing
docker-machine create --driver=virtualbox testing2
eval $(docker-machine env testing2)
docker-machine ssh testing2 "curl -sSL https://dl.bintray.com/emccode/rexray/install | sh -s staged"
docker-machine ssh testing2 "sudo tee -a /etc/rexray/config.yml << EOF
rexray:
logLevel: debug
storageDrivers:
- virtualbox
@clintkitson
clintkitson / gist:832e86489ea1f480789e
Last active February 18, 2016 05:11
docker scaleio
docker-machine create --driver=virtualbox tb
eval $(docker-machine env tb)
docker-machine ssh tb sudo dd if=/dev/zero of=/sio_device1 bs=1 count=0 seek=100G
docker build -t scaleio-tb scaleio-tb/.
docker-machine create --driver=virtualbox mdm2
eval $(docker-machine env mdm2)
docker-machine ssh mdm2 sudo dd if=/dev/zero of=/sio_device1 bs=1 count=0 seek=100G
docker build -t scaleio-secondary-mdm scaleio-secondary-mdm/.
docker-machine create --driver=virtualbox --virtualbox-memory=4096 --virtualbox-cpu-count=2 k8-build
eval $(docker-machine env k8-build)
docker-machine ssh k8-build sudo mkdir /etc/rexray
docker-machine ssh k8-build "sudo tee -a /etc/rexray/config.yml << EOF
rexray:
storageDrivers:
- virtualbox
modules:
@clintkitson
clintkitson / gist:48fad1790a79c8dca6c1
Last active March 3, 2016 23:00
k8 docker-machine rexray demo
docker-machine create --driver=virtualbox k8
eval $(docker-machine env k8)
VBoxManage setproperty websrvauthlibrary null
/Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv -H 0.0.0.0 -v
docker-machine ssh k8 "sudo mkdir -p /etc/rexray && sudo tee -a /etc/rexray/config.yml << EOF
rexray:
storageDrivers:
- virtualbox
@clintkitson
clintkitson / gist:d4825d4889429d763465
Created March 8, 2016 18:59
docker-machine swarm
eval $(docker-machine env manager)
TOKEN=$(docker run --rm swarm create)
docker-machine create --driver=virtualbox --swarm --swarm-master --swarm-discovery token://$TOKEN manager
docker-machine create --driver=virtualbox --swarm --swarm-discovery token://$TOKEN agent1
docker-machine create --driver=virtualbox --swarm --swarm-discovery token://$TOKEN agent2
eval $(docker-machine env manager)
TOKEN=$(docker run --rm swarm create)
docker-machine create --driver=virtualbox --swarm --swarm-master --swarm-discovery token://$TOKEN manager
docker-machine create --driver=virtualbox --swarm --swarm-discovery token://$TOKEN agent1
docker-machine create --driver=virtualbox --swarm --swarm-discovery token://$TOKEN agent2
@clintkitson
clintkitson / gist:5e243ff72115820ef0e1
Last active March 16, 2016 19:52
k8 master.json with scaleio
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {"name":"k8s-master"},
"spec":{
"hostNetwork": true,
"containers":[
{
"name": "controller-manager",
"image": "emccode/hyperkube-amd64:v1.2.0-alpha.8",
polly:
store:
type: boltdb
endpoints: /tmp/boltdb
bucket: MyBoltDb_test
libstorage:
host: tcp://localhost:7981
profiles:
enabled: true
groups:
// Create a Polly host and a Docker engine host
docker-machine create --driver=virtualbox agent1
// Install and configure Docker engine host with REX-Ray talking to Polly
for each in $(echo -e "agent1\n"); do docker-machine ssh $each "curl -sSL https://dl.bintray.com/emccode/rexray/install | sh -s unstable" ; done
for each in $(echo -e "agent1\n"); do docker-machine ssh $each "sudo tee -a /etc/rexray/config.yml << EOF
rexray:
modules:
default-docker: