|
| 1 | +Deploying Pure Storage FlashArray Cinder driver in a Red Hat OpenStack Platform 16.1 |
| 2 | +==================================================================================== |
| 3 | + |
| 4 | +.. _purestorage-flsharray-rhosp161: |
| 5 | + |
| 6 | +Overview |
| 7 | +-------- |
| 8 | + |
| 9 | +This guide shows how to configure and deploy the Pure Storage FlashArray Cinder driver in a |
| 10 | +**Red Hat OpenStack Platform (RHOSP) 16.1** Overcloud, using RHOSP Director. |
| 11 | +After reading this, you'll be able to define the proper environment files and |
| 12 | +deploy single or multiple FlashArray Cinder back ends in RHOSP Overcloud Controller |
| 13 | +nodes. |
| 14 | + |
| 15 | +.. note:: |
| 16 | + |
| 17 | + For more information about RHOSP, please refer to its `documentation pages |
| 18 | + <https://access.redhat.com/documentation/en-us/red_hat_openstack_platform>`_. |
| 19 | + |
| 20 | +.. warning:: |
| 21 | + |
| 22 | + RHOSP16.1 is based on OpenStack Train release. Features included after Train |
| 23 | + release are not available in RHOSP16.1. |
| 24 | + |
| 25 | +Requirements |
| 26 | +------------ |
| 27 | + |
| 28 | +In order to deploy Pure Storage FlashArray Cinder back ends, you should have the |
| 29 | +following requirements satisfied: |
| 30 | + |
| 31 | +- Pure Storage FlashArrays deployed and ready to be used as Cinder |
| 32 | + back ends. See :ref:`cinder_flasharray_prerequisites` for more details. |
| 33 | + |
| 34 | +- RHOSP Director user credentials to deploy Overcloud. |
| 35 | + |
| 36 | +- RHOSP Overcloud Controller nodes where Cinder services will be installed. |
| 37 | + |
| 38 | + |
| 39 | +Deployment Steps |
| 40 | +---------------- |
| 41 | + |
| 42 | +Prepare the environment files |
| 43 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + |
| 45 | +RHOSP makes use of **TripleO Heat Templates (THT)**, which allows you to define |
| 46 | +the Overcloud resources by creating environment files. |
| 47 | + |
| 48 | +To ensure that your RHOSP environment is correctly configured for using |
| 49 | +Pure Storage FlashArrays obtain a copy of `pure-temp.yaml <https://raw.githubusercontent.com/PureStorage-OpenConnect/tripleo-deployment-configs/master/RHOSP16.1/pure-temp.yaml>`__ |
| 50 | +and save this in the ``/home/stack/templates`` directory. This will be required when |
| 51 | +deploying the Overcloud. |
| 52 | + |
| 53 | +Multiple back end configuration |
| 54 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 55 | + |
| 56 | +Define Pure Storage Cinder back ends using Custom THT Configuration syntax. |
| 57 | +It's possible to define all the back ends in a single environment file, but for |
| 58 | +sake of clarity, the following example organizes the back ends in multiple |
| 59 | +smaller environment files: |
| 60 | + |
| 61 | +- ``/home/stack/templates/cinder-flasharray-backend1.yaml`` |
| 62 | + |
| 63 | + This file defines the first Cinder volume back end |
| 64 | + ``tripleo_pure_1`` and its parameters: |
| 65 | + |
| 66 | + .. code-block:: yaml |
| 67 | + :name: cinder-flasharray-backend1.yaml |
| 68 | +
|
| 69 | + parameter_defaults: |
| 70 | + ControllerExtraConfig: |
| 71 | + cinder::config::cinder_config: |
| 72 | + tripleo_pure_1/CinderPureBackendName: |
| 73 | + value: tripleo_pure_1 |
| 74 | + tripleo_pure_1/CinderPureStorageProtocol: |
| 75 | + value: 'iSCSI' |
| 76 | + tripleo_pure_1/CinderPureSanIp: |
| 77 | + value: san_ip_1 |
| 78 | + tripleo_pure_1/CinderPureAPIToken: |
| 79 | + value: api_token_1 |
| 80 | +
|
| 81 | +- ``/home/stack/templates/cinder-purestorage-backend2.yaml`` |
| 82 | + |
| 83 | + This file defines the second Cinder volume back end |
| 84 | + ``tripleo_pure_2`` and its parameters: |
| 85 | + |
| 86 | + .. code-block:: yaml |
| 87 | + :name: cinder-flasharray-backend2.yaml |
| 88 | +
|
| 89 | + parameter_defaults: |
| 90 | + ControllerExtraConfig: |
| 91 | + cinder::config::cinder_config: |
| 92 | + tripleo_pure_2/CinderPureBackendName: |
| 93 | + value: tripleo_pure_2 |
| 94 | + tripleo_pure_2/CinderPureStorageProtocol: |
| 95 | + value: 'iSCSI' |
| 96 | + tripleo_pure_2/CinderPureSanIp: |
| 97 | + value: san_ip_2 |
| 98 | + tripleo_pure_2/CinderPureAPIToken: |
| 99 | + value: api_token_2 |
| 100 | +
|
| 101 | + Modify the parameter values according to your Pure Storage back end |
| 102 | + configuration. |
| 103 | + |
| 104 | +- ``/home/stack/templates/cinder-enabled-backends.yaml`` |
| 105 | + |
| 106 | + This file defines which back ends will be enabled. In this example, two |
| 107 | + back ends ``tripleo_pure_1`` and ``tripleo_pure_2`` will be |
| 108 | + enabled: |
| 109 | + |
| 110 | + .. code-block:: yaml |
| 111 | + :name: cinder-enabled-backends.yaml |
| 112 | +
|
| 113 | + parameter_defaults: |
| 114 | + ControllerExtraConfig: |
| 115 | + cinder_user_enabled_backends: |
| 116 | + - 'tripleo_pure_1' |
| 117 | + - 'tripleo_pure_2' |
| 118 | +
|
| 119 | +.. note:: |
| 120 | + |
| 121 | + You can define arbitrary Custom THT Configurations using the following syntax: |
| 122 | + |
| 123 | + .. code-block:: yaml |
| 124 | + :name: custom-config.yaml |
| 125 | +
|
| 126 | + parameter_defaults: |
| 127 | + ControllerExtraConfig: |
| 128 | + cinder::config::cinder_config: |
| 129 | + <backend_name>/<configuration_name>: |
| 130 | + value: <value> |
| 131 | +
|
| 132 | + Each configuration will be rendered in ``cinder.conf`` file as: |
| 133 | + |
| 134 | + .. code-block:: |
| 135 | + :name: cinder.conf |
| 136 | +
|
| 137 | + [backend_name] |
| 138 | + configuration_name=value |
| 139 | +
|
| 140 | + See `Optional Cinder Configuration Attributes (Train) |
| 141 | + <../section_flasharray-conf.html#optional-cinder-configuration-attributes>`_ |
| 142 | + for a complete list of the available Cinder Configuration Options. |
| 143 | + |
| 144 | +.. warning:: |
| 145 | + |
| 146 | + RHOSP16.1 is based on OpenStack Train release. Features and Configuration |
| 147 | + Options included after Train release are not available in RHOSP16.1. |
| 148 | + |
| 149 | + |
| 150 | +Use Certified Pure Storage Cinder Volume Container |
| 151 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 152 | + |
| 153 | +Red Hat requires that you utilize the Certified Pure Storage Cinder Volume |
| 154 | +Container when deploying RHOSP16.1 with a Pure Storage FlashArray backend. |
| 155 | + |
| 156 | +This container can be found in the `Red Hat Container Catalog <https://catalog.redhat.com/software/containers/search?q=pure&p=1>`__ |
| 157 | +and should be stored in a local registry. |
| 158 | + |
| 159 | +Alternatively, you may build your own version of this container and store it |
| 160 | +within a local registry. |
| 161 | + |
| 162 | +Follow these steps to build your own version of the Pure Storage Cinder Volume |
| 163 | +container: |
| 164 | + |
| 165 | + * Obtain a copy of the `Dockerfile <https://raw.githubusercontent.com/PureStorage-OpenConnect/tripleo-deployment-configs/master/RHOSP16.1/Dockerfile>`__ |
| 166 | + |
| 167 | + * Login to the Red Hat registry |
| 168 | + |
| 169 | + .. code-block:: bash |
| 170 | +
|
| 171 | + sudo buildah login registry.redhat.io |
| 172 | +
|
| 173 | + * Build the podman image |
| 174 | + |
| 175 | + .. code-block:: bash |
| 176 | + |
| 177 | + sudo buildah bud . -t "openstack-cinder-volume-pure:latest" |
| 178 | +
|
| 179 | + * Push the new image to a local registry |
| 180 | + |
| 181 | + .. code-block:: bash |
| 182 | +
|
| 183 | + sudo openstack tripleo container image push --local <registry:port>/<directory>/openstack-cinder-volume-pure:latest |
| 184 | +
|
| 185 | +Create a Custom Environment File |
| 186 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 187 | + |
| 188 | +Create a new environment file ``custom_container_pure.yaml`` in the directory |
| 189 | +``/home/stack/templates`` with only the custom container parameter. |
| 190 | + |
| 191 | +.. code-block:: bash |
| 192 | +
|
| 193 | + parameter_defaults: |
| 194 | + DockerCinderVolumeImage: <registry:port>/<directory>/openstack-cinder-volume-pure:latest |
| 195 | +
|
| 196 | +Alternatively, you may edit the container images environment file (usually |
| 197 | +``overcloud_images.yaml``, created when the ``openstack overcloud container |
| 198 | +image prepare`` command was executed) and change the appropriate |
| 199 | +parameter to use the custom container image. |
| 200 | + |
| 201 | +Deploy Overcloud |
| 202 | +^^^^^^^^^^^^^^^^ |
| 203 | + |
| 204 | +Now that you have the Cinder back end environment files defined, you can run |
| 205 | +the command to deploy the RHOSP Overcloud. Run the following command as |
| 206 | +the ``stack`` user in the RHOSP Director command line, specifying the |
| 207 | +YAML file(s) you defined: |
| 208 | + |
| 209 | +.. code-block:: bash |
| 210 | + :name: overcloud-deploy |
| 211 | +
|
| 212 | + (undercloud) [stack@rhosp-undercloud ~]$ openstack overcloud deploy \ |
| 213 | + --templates \ |
| 214 | + -e /home/stack/containers-prepare-parameter.yaml \ |
| 215 | + -e /home/stack/templates/cinder-flasharray-backend1.yaml \ |
| 216 | + -e /home/stack/templates/cinder-flasharray-backend2.yaml \ |
| 217 | + -e /home/stack/templates/cinder-enabled-backends.yaml \ |
| 218 | + -e /home/stack/templates/custom_container_pure.yaml \ |
| 219 | + --stack overcloud |
| 220 | +
|
| 221 | +If you modified the container images environment file the |
| 222 | +``custom_container_pure.yaml`` line is not required above. |
| 223 | + |
| 224 | +.. note:: |
| 225 | + Alternatively, you can use ``--environment-directory`` parameter and specify |
| 226 | + the whole directory to the deployment command. It will consider all the YAML |
| 227 | + files within this directory: |
| 228 | + |
| 229 | + .. code-block:: bash |
| 230 | + :name: overcloud-deploy-environment-directory |
| 231 | +
|
| 232 | + (undercloud) [stack@rhosp-undercloud ~]$ openstack overcloud deploy \ |
| 233 | + --templates \ |
| 234 | + -e /home/stack/containers-prepare-parameter.yaml \ |
| 235 | + --environment-directory /home/stack/templates \ |
| 236 | + --stack overcloud |
| 237 | +
|
| 238 | +
|
| 239 | +Test the Deployed Back Ends |
| 240 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 241 | + |
| 242 | +After RHOSP Overcloud is deployed, run the following command to check if the |
| 243 | +Cinder services are up: |
| 244 | + |
| 245 | +.. code-block:: bash |
| 246 | + :name: cinder-service-list |
| 247 | +
|
| 248 | + [stack@rhosp-undercloud ~]$ source ~/overcloudrc |
| 249 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder service-list |
| 250 | +
|
| 251 | +
|
| 252 | +Run the following commands as ``stack`` user in the RHOSP Director command line |
| 253 | +to create the volume types mapped to the deployed back ends: |
| 254 | + |
| 255 | +.. code-block:: bash |
| 256 | + :name: create-volume-types |
| 257 | +
|
| 258 | + [stack@rhosp-undercloud ~]$ source ~/overcloudrc |
| 259 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder type-create pure1 |
| 260 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder type-key pure1 set volume_backend_name=tripleo_pure_1 |
| 261 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder type-create pure2 |
| 262 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder type-key pure2 set volume_backend_name=tripleo_pure_2 |
| 263 | +
|
| 264 | +Make sure that you're able to create Cinder volumes with the configured volume |
| 265 | +types: |
| 266 | + |
| 267 | +.. code-block:: bash |
| 268 | + :name: create-volumes |
| 269 | +
|
| 270 | + [stack@rhosp-undercloud ~]$ source ~/overcloudrc |
| 271 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder create --volume-type pure1 --name v1 1 |
| 272 | + (overcloud) [stack@rhosp-undercloud ~]$ cinder create --volume-type pure2 --name v2 1 |
| 273 | +
|
0 commit comments