From cc51bea02db758d466474bc36f221a3c768f22cf Mon Sep 17 00:00:00 2001
From: Eric Young <eric.young@emc.com>
Date: Tue, 13 Feb 2018 14:49:32 -0500
Subject: [PATCH] ScaleIO: Add documentation for containerized overcloud

When running a containerized overcloud, an additional
step is needed to map in the directories containing the
ScaleIO SDC components.

Change-Id: Iaa304ad80a84c3a649d53d519de0630c477a3429
---
 .../drivers/dell-emc-scaleio-driver.rst       | 113 ++++++++++++++++++
 1 file changed, 113 insertions(+)

diff --git a/doc/source/configuration/block-storage/drivers/dell-emc-scaleio-driver.rst b/doc/source/configuration/block-storage/drivers/dell-emc-scaleio-driver.rst
index 91e6f929ac0..89b591ad664 100644
--- a/doc/source/configuration/block-storage/drivers/dell-emc-scaleio-driver.rst
+++ b/doc/source/configuration/block-storage/drivers/dell-emc-scaleio-driver.rst
@@ -285,3 +285,116 @@ and the relevant calculated value of ``maxIOPSperGB`` or ``maxBWSperGB``.
 
 Since the limits are per SDC, they will be applied after the volume
 is attached to an instance, and thus to a compute node/SDC.
+
+Using ScaleIO Storage with a containerized overcloud
+----------------------------------------------------
+
+When using a containerized overcloud, such as one deployed via TripleO or RedHat
+Openstack version 12 and above, there is an additional step that must be
+performed.
+
+Before deploying the overcloud
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+After ensuring that the ScaleIO Data Client (SDC) is installed on all nodes and
+before deploying the overcloud,
+modify the TripleO Heat Template for the nova-compute and cinder-volume
+containers to add volume mappings for directories containing the SDC
+components. These files can normally
+be found at
+``/usr/share/openstack-tripleo-heat-templates/docker/services/nova-compute.yaml``
+and
+``/usr/share/openstack-tripleo-heat-templates/docker/services/cinder-volume.yaml``
+
+Two lines need to be inserted into the list of mapped volumes in each container.
+
+.. code-block:: yaml
+
+  /opt/emc/scaleio:/opt/emc/scaleio
+  /bin/emc/scaleio:/bin/emc/scaleio
+
+.. end
+
+The changes to the two heat templates are identical, as an example
+the original nova-compute file should have section that resembles the following:
+
+.. code-block:: yaml
+
+  ...
+  docker_config:
+    step_4:
+      nova_compute:
+        image: &nova_compute_image {get_param: DockerNovaComputeImage}
+        ipc: host
+        net: host
+        privileged: true
+        user: nova
+        restart: always
+        volumes:
+          list_concat:
+            - {get_attr: [ContainersCommon, volumes]}
+            -
+              - /var/lib/kolla/config_files/nova_compute.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/puppet-generated/nova_libvirt/:/var/lib/kolla/config_files/src:ro
+              - /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
+              - /dev:/dev
+              - /lib/modules:/lib/modules:ro
+              - /etc/iscsi:/etc/iscsi
+              - /run:/run
+              - /var/lib/nova:/var/lib/nova:shared
+              - /var/lib/libvirt:/var/lib/libvirt
+              - /var/log/containers/nova:/var/log/nova
+              - /sys/class/net:/sys/class/net
+              - /sys/bus/pci:/sys/bus/pci
+        environment:
+         - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+  ...
+
+.. end
+
+After modifying the nova-compute file, the section should resemble:
+
+.. code-block:: yaml
+
+  ...
+  docker_config:
+    step_4:
+      nova_compute:
+        image: &nova_compute_image {get_param: DockerNovaComputeImage}
+        ipc: host
+        net: host
+        privileged: true
+        user: nova
+        restart: always
+        volumes:
+          list_concat:
+            - {get_attr: [ContainersCommon, volumes]}
+            -
+              - /var/lib/kolla/config_files/nova_compute.json:/var/lib/kolla/config_files/config.json:ro
+              - /var/lib/config-data/puppet-generated/nova_libvirt/:/var/lib/kolla/config_files/src:ro
+              - /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
+              - /dev:/dev
+              - /lib/modules:/lib/modules:ro
+              - /etc/iscsi:/etc/iscsi
+              - /run:/run
+              - /var/lib/nova:/var/lib/nova:shared
+              - /var/lib/libvirt:/var/lib/libvirt
+              - /var/log/containers/nova:/var/log/nova
+              - /sys/class/net:/sys/class/net
+              - /sys/bus/pci:/sys/bus/pci
+              - /opt/emc/scaleio:/opt/emc/scaleio
+              - /bin/emc/scaleio:/bin/emc/scaleio
+        environment:
+         - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+  ...
+
+.. end
+
+Once the nova-compute file is modified, make an identical change to the
+cinder-volume file.
+
+
+Deploy the overcloud
+~~~~~~~~~~~~~~~~~~~~
+
+Once the above changes have been made, deploy the overcloud as usual.