Skip to content

Instantly share code, notes, and snippets.

@pascalandy
Created October 28, 2016 15:00
Show Gist options
  • Select an option

  • Save pascalandy/da5433af5fa5205a4430f32f5c77d548 to your computer and use it in GitHub Desktop.

Select an option

Save pascalandy/da5433af5fa5205a4430f32f5c77d548 to your computer and use it in GitHub Desktop.
to anaylst - docker-machine ssh
#!/bin/bash
for II in `seq 1 20`;
do
docker-machine create -d digitalocean --digitalocean-access-token $DO --digitalocean-size 1gb name-$II
docker-machine ssh name-$II "echo net.ipv4.neigh.default.gc_thresh1 = 30000 >> /etc/sysctl.conf ;"
docker-machine ssh name-$II "echo net.ipv4.neigh.default.gc_thresh2 = 32000 >> /etc/sysctl.conf ;"
docker-machine ssh name-$II "echo net.ipv4.neigh.default.gc_thresh3 = 32768 >> /etc/sysctl.conf ;"
docker-machine ssh name-$II "sysctl -p;"
docker-machine ssh name-$II "docker swarm join --advertise-addr $(docker-machine ip name-$II) --token SWMTKN-1-29tx6z2k8zmsbt9z2c2ay54jc9ce2l94ixhmmagveifv3pp4fa-5e8i9gugpb9b4bmi9vrp7m5su 67.205.160.45:2377"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment