Last active
June 9, 2016 08:18
-
-
Save lmduc/8be4e6c27080bbbf512af9bbb95fe169 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "sudo apt-get update\n" | |
sudo apt-get update | |
echo "curl -sSL https://get.docker.com/ | sh\n" | |
curl -sSL https://get.docker.com/ | sh | |
sudo usermod -aG docker $(whoami) | |
echo "sudo service docker stop\n" | |
sudo service docker stop | |
echo "IP=$(hostname -i | awk '{ print $1}')\n" | |
IP=$(hostname -i | awk '{ print $1}') | |
echo "sudo docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --label=com.function=$LABEL\n" | |
sudo docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --label=com.function=$LABEL & | |
echo "docker run -d swarm join --addr=$IP:2375 consul://$MASTER_IP:8500\n" | |
docker run -d swarm join --addr=$IP:2375 consul://$MASTER_IP:8500 | |
echo "Please make sure that you input LABEL and MASTER_IP before installing or you have to reinstall" | |
echo "Please logout to take effect" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment