From 40932193dd77dbe9f0387c819fec85c303c8927e Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Tue, 20 Feb 2018 09:58:38 -0800 Subject: Update CVP Docker Compose Configuration - Uses extra files config.env, vhost.env to hold environment variables for docker configuration. - Provides samples for these config that can be copied and modified to fit deployment requirements. - Updates the docker images to the newest releases. Change-Id: Ibe9b8597edfb38940297433708497c244200d0af Signed-off-by: Trevor Bramwell --- cvp/docker/.gitignore | 2 ++ cvp/docker/README.rst | 29 +++++++++++++++++++++++++++++ cvp/docker/config.env.sample | 3 +++ cvp/docker/docker-compose.yml | 20 +++++++++----------- cvp/docker/vhost.env.sample | 1 + 5 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 cvp/docker/.gitignore create mode 100644 cvp/docker/README.rst create mode 100644 cvp/docker/config.env.sample create mode 100644 cvp/docker/vhost.env.sample (limited to 'cvp') diff --git a/cvp/docker/.gitignore b/cvp/docker/.gitignore new file mode 100644 index 00000000..af398fed --- /dev/null +++ b/cvp/docker/.gitignore @@ -0,0 +1,2 @@ +config.env +vhost.env diff --git a/cvp/docker/README.rst b/cvp/docker/README.rst new file mode 100644 index 00000000..6aeb38aa --- /dev/null +++ b/cvp/docker/README.rst @@ -0,0 +1,29 @@ +Docker Deployment +================= + +To deploy the OVP Dashboard perform the following steps: + + #. Copy config.env.sample to config.env + + cp config.env.sample config.env + + #. Copy vhost.env.sample to vhost.env + + cp vhost.env.sample vhost.env + + #. Modify config.env and vhost.env to you liking + + #. Bring the services up + + docker-compose up -d + + #. Navigate to the site listed in vhost.env in your browser of choice + + google-chrome-stable http://ovp.localhost + + .. note:: + + If you're using the default sitename 'ovp.localhost', you'll + need to add the following line to /etc/hosts: + + 127.0.0.1 ovp.localhost diff --git a/cvp/docker/config.env.sample b/cvp/docker/config.env.sample new file mode 100644 index 00000000..96d36300 --- /dev/null +++ b/cvp/docker/config.env.sample @@ -0,0 +1,3 @@ +mongodb_url=mongodb://mongodb:27017/ +base_url=http://ovp.localhost +testapi_url=testapi:8010 diff --git a/cvp/docker/docker-compose.yml b/cvp/docker/docker-compose.yml index 2b9958e6..55eb58d0 100644 --- a/cvp/docker/docker-compose.yml +++ b/cvp/docker/docker-compose.yml @@ -4,9 +4,8 @@ services: testapi: image: opnfv/testapi:cvp.0.5.0 container_name: cvp-testapi - environment: - - mongodb_url=mongodb://mongodb:27017/ - - base_url=https://cvp.opnfv.org + env_file: + - config.env volumes: - cvp-testapi-logs:/home/testapi/logs links: @@ -21,12 +20,12 @@ services: expose: - "27017" web: - image: opnfv/dovetail:web.cvp.0.7.0 + image: opnfv/dovetail:web.ovp.1.0.0 container_name: cvp-web restart: always - environment: - - testapi_url=testapi:8010 - - VIRTUAL_HOST=cvp.opnfv.org + env_file: + - config.env + - vhost.env volumes: - cvp-testapi-logs:/home/testapi/logs links: @@ -36,11 +35,10 @@ services: ports: - "8000:8000" cvpapi: - image: opnfv/dovetail:api.cvp.0.7.0 + image: opnfv/dovetail:api.ovp.1.0.0 container_name: cvp-cvpapi - environment: - - mongodb_url=mongodb://mongodb:27017/ - - base_url=https://cvp.opnfv.org + env_file: + - config.env volumes: - cvp-testapi-logs:/home/testapi/logs ports: diff --git a/cvp/docker/vhost.env.sample b/cvp/docker/vhost.env.sample new file mode 100644 index 00000000..1c4c87fb --- /dev/null +++ b/cvp/docker/vhost.env.sample @@ -0,0 +1 @@ +VIRTUAL_HOST=ovp.localhost -- cgit 1.2.3-korg