Commit f8bf53aa authored by Spiros Koulouzis's avatar Spiros Koulouzis

Merge origin/master

parents e9419be6 f35d4444
......@@ -7,5 +7,5 @@ sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce
sudo echo "DOCKER_OPTS="--insecure-registry=145.100.133.241:5000"" >> /etc/default/docker
sudo echo "DOCKER_OPTS="--insecure-registry=129.7.98.3:5000"" >> /etc/default/docker
sudo service docker restart
......@@ -25,6 +25,8 @@ def install_manager(vm):
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(vm.ip, username=vm.user, key_filename=vm.key)
stdin, stdout, stderr = ssh.exec_command("sudo docker swarm leave --force")
stdout.read()
stdin, stdout, stderr = ssh.exec_command("sudo docker swarm init --advertise-addr eth0")
retstr = stdout.readlines()
print "%s: ========= Swarm Manager Installed =========" % (vm.ip)
......@@ -40,6 +42,8 @@ def install_worker(join_cmd, vm):
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(vm.ip, username=vm.user, key_filename=vm.key)
stdin, stdout, stderr = ssh.exec_command("sudo docker swarm leave --force")
stdout.read()
stdin, stdout, stderr = ssh.exec_command("sudo %s" % (join_cmd))
stdout.read()
print "%s: ========= Swarm Worker Installed =========" % (vm.ip)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment