Commit 646fd446 authored by Daniele Venzano's avatar Daniele Venzano

Fix Dockerfile and test compose config file

parent 33314cec
......@@ -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
......@@ -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 --dbpass '' --dbhost 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 --dbpass '' --dbhost 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
......@@ -6,3 +6,6 @@ tornado>=4.3
kazoo>=2.2.1
humanfriendly
psycopg2>=2.6.1
pyzmq>=15.2.0
typing
pyldap
......@@ -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):
......
......@@ -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)
......
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