Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View clintkitson's full-sized avatar

Clint Kitson clintkitson

View GitHub Profile
kernel:
image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0 console=tty0 page_poison=1"
init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- linuxkit/ca-certificates:e091a05fbf7c5e16f18b23602febd45dd690ba2f
onboot:
- name: sysctl
cat /etc/rexray/config.yml
rexray:
modules:
default-docker:
host: unix:///run/docker/plugins/virtualbox.sock
spec: /etc/docker/plugins/virtualbox.spec
libstorage:
service: virtualbox
scaleio-docker:
type: docker
// 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:
// Create a Polly host and a Docker engine host
docker-machine create --driver=virtualbox --virtualbox-cpu-count=2 polly
eval $(docker-machine env polly)
docker-machine create --driver=virtualbox agent1
// Install and configure Polly. Edit the user_name for your own valid path for new volumes of VirtualBox.
for each in $(echo -e "polly\n"); do docker-machine ssh $each "curl -sSL https://dl.bintray.com/emccode/polly/install | sh -s stable" ; done
for each in $(echo -e "polly\n"); do docker-machine ssh $each "sudo tee -a /etc/polly/config.yml << EOF
polly:
apt-get update
apt-get install -y unzip libaio1 linux-image-4.2.0-30-generic linux-headers-4.2.0-30-generic
unzip /vagrant/ScaleIO_2.0.0_UBUNTU_14.04_Download.zip
cd ScaleIO_2.0.0_UBUNTU_14.04_Download/
tar -xvf EMC-ScaleIO-sdc-2.0-5014.0.Ubuntu.14.04.x86_64.tar
./siob_extract EMC-ScaleIO-sdc-2.0-5014.0.Ubuntu.14.04.x86_64.siob
MDM_IP=mdm_ip1,mdm_ip2 dpkg -i EMC-ScaleIO-sdc-2.0-5014.0.Ubuntu.14.04.x86_64.deb
polly:
store:
type: boltdb
endpoints: /tmp/boltdb
bucket: MyBoltDb_test
libstorage:
host: tcp://localhost:7981
profiles:
enabled: true
groups:
// Disable VirtualBox authentication
VBoxManage setproperty websrvauthlibrary null
// Start SOAP service so REX-Ray can talk to VirtualBox from the container host VMs
/Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv -H 0.0.0.0 -v
// Create a Swarm cluster
docker-machine create --driver=virtualbox default
eval $(docker-machine env default)
TOKEN=$(docker run --rm swarm create)
@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",
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: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