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
646fd446
Commit
646fd446
authored
Jul 07, 2016
by
Daniele Venzano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Dockerfile and test compose config file
parent
33314cec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
9 deletions
+13
-9
Dockerfile
Dockerfile
+5
-4
docker-compose.yml
docker-compose.yml
+3
-3
requirements.txt
requirements.txt
+3
-0
zoe_api/db_init.py
zoe_api/db_init.py
+1
-1
zoe_lib/config.py
zoe_lib/config.py
+1
-1
No files found.
Dockerfile
View file @
646fd446
...
...
@@ -5,13 +5,14 @@ MAINTAINER Daniele Venzano <venza@brownhat.org>
RUN
mkdir
-p
/opt/zoe
WORKDIR
/opt/zoe
RUN
apt-get update
&&
apt-get
install
-y
libldap2-dev libsasl2-dev
&&
apt-get clean
COPY
. /opt/zoe
RUN
pip
install
--no-cache-dir
-r
requirements.txt
RUN
echo
'admin,admin,admin'
>
/opt/zoe/zoepass.csv
VOLUME
/etc/zoe/
RUN
python3 ./zoe-master.py
--write-config
/etc/zoe/zoe-master.conf
RUN
python3 ./zoe-observer.py
--write-config
/etc/zoe/zoe-observer.conf
RUN
python3 ./zoe-web.py
--write-config
/etc/zoe/zoe-web.conf
RUN
python3 ./zoe-logger.py
--write-config
/etc/zoe/zoe-logger.conf
RUN
python3 ./zoe-api.py
--write-config
/etc/zoe/zoe.conf
docker-compose.yml
View file @
646fd446
...
...
@@ -8,7 +8,7 @@ services:
-
zoe
zoe-api
:
image
:
zoerepo/zoe
command
:
python3 zoe-api.py --debug --swarm ${SWARM_URL} --deployment-name compose --master-url tcp://zoe-master:4850 --dbuser postgres --db
pass '' --db
host postgres --dbname postgres
command
:
python3 zoe-api.py --debug --swarm ${SWARM_URL} --deployment-name compose --master-url tcp://zoe-master:4850 --dbuser postgres --dbhost postgres --dbname postgres
ports
:
-
"
8080:5001"
depends_on
:
...
...
@@ -20,9 +20,9 @@ services:
volumes
:
-
/etc/zoe:/etc/zoe
-
/opt/zoe-workspaces:/mnt/zoe-workspaces
command
:
python3 zoe-master.py --debug --swarm ${SWARM_URL} --deployment-name compose --dbuser postgres --db
pass '' --db
host postgres --dbname postgres
command
:
python3 zoe-master.py --debug --swarm ${SWARM_URL} --deployment-name compose --dbuser postgres --dbhost postgres --dbname postgres
depends_on
:
-
zoe-api
networks
:
zoe
:
driver
:
overlay
driver
:
bridge
requirements.txt
View file @
646fd446
...
...
@@ -6,3 +6,6 @@ tornado>=4.3
kazoo
>=2.2.1
humanfriendly
psycopg2
>=2.6.1
pyzmq
>=15.2.0
typing
pyldap
zoe_api/db_init.py
View file @
646fd446
...
...
@@ -33,7 +33,7 @@ def schema(cur, deployment_name):
"""Create the schema for the configured deployment name."""
cur
.
execute
(
"SELECT EXISTS(SELECT 1 FROM pg_catalog.pg_namespace WHERE nspname = %s)"
,
(
deployment_name
,))
if
not
cur
.
fetchone
()[
0
]:
cur
.
execute
(
'CREATE SCHEMA
%s'
,
(
deployment_name
,
))
cur
.
execute
(
'CREATE SCHEMA
{}'
.
format
(
deployment_name
))
def
check_schema_version
(
cur
,
deployment_name
):
...
...
zoe_lib/config.py
View file @
646fd446
...
...
@@ -54,7 +54,7 @@ def load_configuration(test_conf=None):
argparser
.
add_argument
(
'--dbname'
,
help
=
'DB name'
,
default
=
'zoe'
)
argparser
.
add_argument
(
'--dbuser'
,
help
=
'DB user'
,
default
=
'zoe'
)
argparser
.
add_argument
(
'--dbpass'
,
help
=
'DB password'
,
default
=
'
zoe
'
)
argparser
.
add_argument
(
'--dbpass'
,
help
=
'DB password'
,
default
=
''
)
argparser
.
add_argument
(
'--dbhost'
,
help
=
'DB hostname'
,
default
=
'localhost'
)
argparser
.
add_argument
(
'--dbport'
,
type
=
int
,
help
=
'DB port'
,
default
=
5432
)
...
...
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