Update CVP Docker Compose Configuration 75/52375/3
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 20 Feb 2018 17:58:38 +0000 (09:58 -0800)
committerGeorg Kunz <georg.kunz@ericsson.com>
Wed, 28 Feb 2018 14:49:30 +0000 (14:49 +0000)
- 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 <tbramwell@linuxfoundation.org>
cvp/docker/.gitignore [new file with mode: 0644]
cvp/docker/README.rst [new file with mode: 0644]
cvp/docker/config.env.sample [new file with mode: 0644]
cvp/docker/docker-compose.yml
cvp/docker/vhost.env.sample [new file with mode: 0644]

diff --git a/cvp/docker/.gitignore b/cvp/docker/.gitignore
new file mode 100644 (file)
index 0000000..af398fe
--- /dev/null
@@ -0,0 +1,2 @@
+config.env
+vhost.env
diff --git a/cvp/docker/README.rst b/cvp/docker/README.rst
new file mode 100644 (file)
index 0000000..6aeb38a
--- /dev/null
@@ -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 (file)
index 0000000..96d3630
--- /dev/null
@@ -0,0 +1,3 @@
+mongodb_url=mongodb://mongodb:27017/
+base_url=http://ovp.localhost
+testapi_url=testapi:8010
index 2b9958e..55eb58d 100644 (file)
@@ -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 (file)
index 0000000..1c4c87f
--- /dev/null
@@ -0,0 +1 @@
+VIRTUAL_HOST=ovp.localhost