Chapter 3. Integrating with the Existing Ceph Cluster
The heat template collection provided by director already contains the necessary templates and environment files to deploy an overcloud.
This environment file is invoked during deployment (Section 3.2, “Deploying the Overcloud”) to integrate an existing Ceph cluster to the overcloud being deployed.
ceph-ansibleto integrate with an existing Ceph cluster, but
ceph-ansibleis not installed by default on the undercloud. Enter the following command to install the ceph-ansible package on the undercloud:
sudo yum install -y ceph-ansible
To configure the integration, you must supply the details of your Ceph cluster to director. Use a custom environment file to override the default settings used by
Create the following custom environment file:
parameter_defaults:header to this file:
Under this header, set all the parameters you want to override in
/usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml. At a minimum, you must set the following:
CephClientKey: the Ceph client key of your Ceph Storage cluster. This is the value of
keyyou retrieved earlier in Section 2.2, “Configuring the Existing Ceph Storage Cluster”. For example,
CephClusterFSID: the file system ID of your Ceph Storage cluster. This is the value of
fsidin your Ceph Storage cluster configuration file, which you retrieved earlier in Section 2.2, “Configuring the Existing Ceph Storage Cluster”. For example,
CephExternalMonHost: a comma-delimited list of the IPs of all MON hosts in your Ceph Storage cluster.For example,
parameter_defaults: CephClientKey: AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ== CephClusterFSID: 4b5c8c0a-ff60-454b-a1b4-9747aa737d19 CephExternalMonHost: 172.16.1.7, 172.16.1.8
If necessary, also set the name of the OpenStack pools and the client user by using the following parameters and values:
You can also add overcloud parameters to your custom environment file. For example, to set
neutronnetwork type, add the following to
3.1. Assigning Nodes and Flavors to Roles
Planning an overcloud deployment involves specifying how many nodes and which flavors to assign to each role. Like all Heat template parameters, these role specifications are declared in the
parameter_defaults section of your custom environment file (in this case,
/home/stack/templates/ceph-config from Chapter 3, Integrating with the Existing Ceph Cluster):
For this purpose, use the following parameters:
Table 3.1. Roles and Flavors for Overcloud Nodes
|Heat Template Parameter||Description|
The number of Controller nodes to scale out
The flavor to use for Controller nodes (
The number of Compute nodes to scale out
The flavor to use for Compute nodes (
For example, to configure the overcloud to deploy three nodes for each role (Controller and Compute), add the following to your
parameter_defaults: ControllerCount: 3 ComputeCount: 3 OvercloudControlFlavor: control OvercloudComputeFlavor: compute
3.2. Deploying the Overcloud
During undercloud installation, set
generate_service_certificate=false in the
undercloud.conf file. Otherwise, you must inject a trust anchor when you deploy the overcloud. For more information about how to inject a trust anchor, see Enabling SSL/TLS on Overcloud Public Endpoints in the Advanced Overcloud Customization guide.
The creation of the overcloud requires additional arguments for the
openstack overcloud deploy command. For example:
$ openstack overcloud deploy --templates \ -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \ -e /home/stack/templates/ceph-config.yaml \ -e --ntp-server pool.ntp.org \
The above command uses the following options:
--templates- Creates the Overcloud from the default Heat template collection (namely,
-e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml- Sets the director to integrate an existing Ceph cluster to the overcloud.
-e /home/stack/templates/ceph-config.yaml- Adds a custom environment file to override the defaults set by
-e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml. In this case, it is the custom environment file you created in Chapter 3, Integrating with the Existing Ceph Cluster.
--ntp-server pool.ntp.org- Sets our NTP server.
You can also use an answers file to invoke all your templates and environment files. For example, you can use the following command to deploy an identical overcloud:
$ openstack overcloud deploy \ --answers-file /home/stack/templates/answers.yaml \ --ntp-server pool.ntp.org
In this case, the answers file
templates: /usr/share/openstack-tripleo-heat-templates/ environments: - /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible-external.yaml \ - /home/stack/templates/ceph-config.yaml \
For more information, see Including Environment Files in Overcloud Creation.
For a full list of options, run:
$ openstack help overcloud deploy
For more information, see Creating the Overcloud with the CLI Tools in the Director Installation and Usage guide.
The overcloud creation process begins and the director provisions your nodes. This process takes some time to complete. To view the status of the overcloud creation, open a separate terminal as the
stack user and run:
$ source ~/stackrc $ openstack stack list --nested
This configures the Overcloud to use your external Ceph Storage cluster. Note that you manage this cluster independently from the Overcloud. For example, you scale the Ceph Storage cluster using the Ceph management tools and not through the OpenStack Platform director.