Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
f8bf53aa
Commit
f8bf53aa
authored
Mar 14, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Plain Diff
Merge origin/master
parents
e9419be6
f35d4444
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
docker_engine.sh
drip-deployer/docker_engine.sh
+1
-1
docker_swarm.py
drip-deployer/docker_swarm.py
+4
-0
No files found.
drip-deployer/docker_engine.sh
View file @
f8bf53aa
...
...
@@ -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
=
1
45.100.133.241
:5000
""
>>
/etc/default/docker
sudo echo
"DOCKER_OPTS="
--insecure-registry
=
1
29.7.98.3
:5000
""
>>
/etc/default/docker
sudo
service docker restart
drip-deployer/docker_swarm.py
View file @
f8bf53aa
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment