Mount NFS volume to docker container.
authorPranali Deore <pdeore@redhat.com>
Fri, 4 Aug 2017 11:39:16 +0000 (17:09 +0530)
committerPranali Deore <pdeore@redhat.com>
Thu, 10 Aug 2017 06:51:18 +0000 (06:51 +0000)
After creating glance image successfully, share location
was remaining empty because the NFS volume on controller was
not mounted to docker container.

Now, connecting NFS volume to the docker container.

Change-Id: Ib45f117cbbf2b7b2c0faf024e9a8b049c440d872
Closes-Bug: 1708629

docker/services/glance-api.yaml

index 044eb28..df226b1 100644 (file)
@@ -39,10 +39,16 @@ parameters:
   EnableInternalTLS:
     type: boolean
     default: false
+  GlanceNfsEnabled:
+    default: false
+    description: >
+      When using GlanceBackend 'file', mount NFS share for image storage.
+    type: boolean
 
 conditions:
 
   internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
+  nfs_backend_enabled: {equals: [{get_param: GlanceNfsEnabled}, true]}
 
 
 resources:
@@ -128,6 +134,11 @@ outputs:
                   - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro
                   - /var/log/containers/glance:/var/log/glance
                   - /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
+                  -
+                    if:
+                      - nfs_backend_enabled
+                      - /var/lib/glance:/var/lib/glance
+                      - ''
             environment:
               - KOLLA_BOOTSTRAP=True
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS