Skip to content

Instantly share code, notes, and snippets.

@aorjoa
Last active October 28, 2016 15:07
Show Gist options
  • Save aorjoa/05b7fb200b75b8dd1026c13690687814 to your computer and use it in GitHub Desktop.
Save aorjoa/05b7fb200b75b8dd1026c13690687814 to your computer and use it in GitHub Desktop.
#!/bin/bash
for II in `seq 11 110`;
do
docker-machine create -d digitalocean --digitalocean-access-token $DO --digitalocean-size 1gb Aiyara-SwarmZilla-$II
docker-machine ssh Aiyara-SwarmZilla-$II "echo net.ipv4.neigh.default.gc_thresh1 = 30000 >> /etc/sysctl.conf ;"
docker-machine ssh Aiyara-SwarmZilla-$II "echo net.ipv4.neigh.default.gc_thresh2 = 32000 >> /etc/sysctl.conf ;"
docker-machine ssh Aiyara-SwarmZilla-$II "echo net.ipv4.neigh.default.gc_thresh3 = 32768 >> /etc/sysctl.conf ;"
docker-machine ssh Aiyara-SwarmZilla-$II "sysctl -p;"
docker-machine ssh Aiyara-SwarmZilla-$II "docker swarm join --advertise-addr $(docker-machine ip Aiyara-SwarmZilla-$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