Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
main
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Simone Rossi
main
Commits
1fecfb2d
Commit
1fecfb2d
authored
Mar 30, 2017
by
qhoangxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fixes for zoeci when porting to new docker api
parent
fc459ce4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
32 deletions
+20
-32
ci/deploy/backenddeploy.py
ci/deploy/backenddeploy.py
+3
-3
ci/docker-compose-prod.yml
ci/docker-compose-prod.yml
+2
-2
ci/docker-compose-test.yml
ci/docker-compose-test.yml
+6
-15
ci/zoeci.py
ci/zoeci.py
+9
-12
No files found.
ci/deploy/backenddeploy.py
View file @
1fecfb2d
...
...
@@ -144,7 +144,7 @@ class ZoeBackendDeploy():
res
=
self
.
cli
.
containers
.
list
(
all
=
True
,
filters
=
{
'name'
:
s
})
if
len
(
res
)
>
0
:
for
r
in
res
:
name
=
r
.
attrs
[
'Names'
][
0
].
split
(
"/"
)[
1
]
name
=
r
.
name
if
self
.
typeDeploy
==
0
:
if
name
==
s
:
r
.
remove
(
force
=
True
)
...
...
@@ -163,7 +163,7 @@ class ZoeBackendDeploy():
# start zoe_api
api_c
=
self
.
cli
.
containers
.
get
(
self
.
zoe_api
)
api_c
.
start
(
self
.
zoe_api
)
api_c
.
start
()
print
(
'Started latest '
+
self
.
zoe_api
+
' container...'
)
if
not
api_c
.
attrs
[
'State'
][
'Running'
]:
retcode
=
-
1
...
...
@@ -172,7 +172,7 @@ class ZoeBackendDeploy():
# start zoe_master
master_c
=
self
.
cli
.
containers
.
get
(
self
.
zoe_master
)
master_c
.
start
(
self
.
zoe_master
)
master_c
.
start
()
print
(
'Started latest '
+
self
.
zoe_master
+
' container...'
)
if
not
master_c
.
attrs
[
'State'
][
'Running'
]:
retcode
=
0
...
...
ci/docker-compose-prod.yml
View file @
1fecfb2d
...
...
@@ -4,7 +4,7 @@ services:
image
:
192.168.12.2:5000/zoe:reducetime
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
command
:
python3 zoe-api.py --debug --
swarm
consul://192.168.12.2 --deployment-name prod --dbuser postgres --dbhost 192.168.12.2 --dbport 5432 --dbname postgres --dbpass postgres --overlay-network-name my-net --master-url tcp://zoe-master:4850 --auth-type ldap --ldap-server-uri ldap://172.17.0.6 --ldap-base-dn ou=users,dc=example,dc=com --proxy-type apache --proxy-container apache2 --proxy-config-file /etc/apache2/sites-available/all.conf --proxy-path fsdna.on.kpmg.de/zoe --gelf-address udp://192.168.12.2:5004
command
:
python3 zoe-api.py --debug --
backend-swarm-url
consul://192.168.12.2 --deployment-name prod --dbuser postgres --dbhost 192.168.12.2 --dbport 5432 --dbname postgres --dbpass postgres --overlay-network-name my-net --master-url tcp://zoe-master:4850 --auth-type ldap --ldap-server-uri ldap://172.17.0.6 --ldap-base-dn ou=users,dc=example,dc=com --proxy-type apache --proxy-container apache2 --proxy-config-file /etc/apache2/sites-available/all.conf --proxy-path fsdna.on.kpmg.de/zoe --gelf-address udp://192.168.12.2:5004
ports
:
-
"
5001:5001"
logging
:
...
...
@@ -16,7 +16,7 @@ services:
image
:
192.168.12.2:5000/zoe:reducetime
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
command
:
python3 zoe-master.py --debug --
swarm
consul://192.168.12.2 --deployment-name prod --dbuser postgres --dbhost 192.168.12.2 --dbport 5432 --dbname postgres --dbpass postgres --overlay-network-name my-net --auth-type ldap --ldap-server-uri ldap://ldapker.example.com --ldap-base-dn ou=users,dc=example,dc=com --proxy-type apache --proxy-container apache2 --proxy-config-file /etc/apache2/sites-available/all.conf --proxy-path fsdna.on.kpmg.de/zoe --gelf-address udp://192.168.12.2:5004
command
:
python3 zoe-master.py --debug --
backend-swarm-url
consul://192.168.12.2 --deployment-name prod --dbuser postgres --dbhost 192.168.12.2 --dbport 5432 --dbname postgres --dbpass postgres --overlay-network-name my-net --auth-type ldap --ldap-server-uri ldap://ldapker.example.com --ldap-base-dn ou=users,dc=example,dc=com --proxy-type apache --proxy-container apache2 --proxy-config-file /etc/apache2/sites-available/all.conf --proxy-path fsdna.on.kpmg.de/zoe --gelf-address udp://192.168.12.2:5004
ports
:
-
"
4850:4850"
depends_on
:
...
...
ci/docker-compose-test.yml
View file @
1fecfb2d
version
:
'
2'
services
:
zoe-api-test
:
image
:
192.168.12.2:5000/zoe:
reducetime
image
:
192.168.12.2:5000/zoe:
wi9
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
command
:
python3 zoe-api.py --debug --
swarm consul://192.168.12.2 --deployment-name test --dbuser postgres --dbhost 192.168.12.2 --dbport 4321 --dbname postgres --dbpass postgres --overlay-network-name my-net --master-url tcp://zoe-master-test:4850 --auth-type text --proxy-type apache --proxy-container apache2 --proxy-config-file /etc/apache2/sites-available/all.conf --proxy-path fsdna.on.kpmg.de/zoe --listen-port 5100 --gelf-address udp://192.168.12.2:5004
command
:
python3 zoe-api.py --debug --
backend-swarm-url consul://192.168.12.2 --deployment-name test --dbuser postgres --dbhost 192.168.12.2 --dbport 4321 --dbname postgres --dbpass postgres --overlay-network-name my-net --master-url tcp://zoe-master-test:4850 --auth-type text --proxy-type none --listen-port
5100
ports
:
-
"
5100:5100"
logging
:
driver
:
"
gelf"
options
:
gelf-address
:
"
udp://192.168.12.2:5004"
tag
:
"
zoe-api"
zoe-master-test
:
image
:
192.168.12.2:5000/zoe:
reducetime
image
:
192.168.12.2:5000/zoe:
wi9
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
command
:
python3 zoe-master.py --debug --swarm consul://192.168.12.2 --deployment-name test --dbuser postgres --dbhost 192.168.12.2 --dbport 4321 --dbname postgres --dbpass postgres --overlay-network-name my-net --auth-type text --proxy-type apache --proxy-container apache2 --proxy-config-file /etc/apache2/sites-available/all.conf --proxy-path fsdna.on.kpmg.de/zoe --listen-port 5100 --gelf-address udp://192.168.12.2:5004 --gelf-address udp://192.168.12.2:5004
-
/mnt/zoe-workspaces:/mnt/zoe-workspaces
command
:
python3 zoe-master.py --debug --backend-swarm-url consul://192.168.12.2 --deployment-name test --dbuser postgres --dbhost 192.168.12.2 --dbport 4321 --dbname postgres --dbpass postgres --overlay-network-name my-net --auth-type text --proxy-type none --listen-port
5100
depends_on
:
-
zoe-api
logging
:
driver
:
"
gelf"
options
:
gelf-address
:
"
udp://192.168.12.2:5004"
tag
:
"
zoe-master"
-
zoe-api-test
ci/zoeci.py
View file @
1fecfb2d
...
...
@@ -58,23 +58,20 @@ class ZoeImage():
def
build
(
self
):
""" Build docker image """
ret
=
1
for
line
in
self
.
cli
.
images
.
build
(
path
=
'.'
,
tag
=
self
.
tag
,
rm
=
True
):
print
(
line
)
if
'error'
in
str
(
line
):
ret
=
0
try
:
self
.
cli
.
images
.
build
(
path
=
'.'
,
tag
=
self
.
tag
,
rm
=
True
)
except
Exception
:
ret
=
0
return
ret
def
push
(
self
):
""" Push docker image """
ret
=
1
for
line
in
self
.
cli
.
images
.
push
(
self
.
tag
,
stream
=
True
):
print
(
line
)
if
'error'
in
str
(
line
):
ret
=
0
try
:
self
.
cli
.
images
.
push
(
self
.
tag
,
stream
=
True
)
except
Exception
:
ret
=
0
pass
return
ret
if
__name__
==
'__main__'
:
...
...
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