Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Red Hat Ceph Storage for the Overcloud
Configuring an Overcloud to Use Red Hat Ceph Storage
Abstract
Chapter 1. Introduction Link kopierenLink in die Zwischenablage kopiert!
Red Hat OpenStack Platform director creates a cloud environment called the Overcloud. The director provides the ability to configure extra features for an Overcloud. One of these extra features includes integration with Red Hat Ceph Storage. This includes both Ceph Storage clusters created with the director or existing Ceph Storage clusters. This guide provides information for integrating Ceph Storage into your Overcloud through the director and configuration examples.
1.1. Defining Ceph Storage Link kopierenLink in die Zwischenablage kopiert!
Red Hat Ceph Storage is a distributed data object store designed to provide excellent performance, reliability, and scalability. Distributed object stores are the future of storage, because they accommodate unstructured data, and because clients can use modern object interfaces and legacy interfaces simultaneously. At the heart of every Ceph deployment is the Ceph Storage Cluster, which consists of two types of daemons:
- Ceph OSD (Object Storage Daemon)
- Ceph OSDs store data on behalf of Ceph clients. Additionally, Ceph OSDs utilize the CPU and memory of Ceph nodes to perform data replication, rebalancing, recovery, monitoring and reporting functions.
- Ceph Monitor
- A Ceph monitor maintains a master copy of the Ceph storage cluster map with the current state of the storage cluster.
For more information about Red Hat Ceph Storage, see the Red Hat Ceph Storage Architecture Guide.
This guide only integrates Ceph Block storage and does not include Ceph Object (RGW) or Ceph File (CephFS) storage.
1.2. Using Ceph Storage in Red Hat OpenStack Platform Link kopierenLink in die Zwischenablage kopiert!
Red Hat OpenStack Platform director provides two main methods for integrating Red Hat Ceph Storage into an Overcloud.
- Creating an Overcloud with its own Ceph Storage Cluster
- The director has the ability to create a Ceph Storage Cluster during the creation on the Overcloud. The director creates a set of Ceph Storage nodes that use the Ceph OSD to store the data. In addition, the director installs the Ceph Monitor service on the Overcloud’s Controller nodes. This means if an organization creates an Overcloud with three highly available controller nodes, the Ceph Monitor also becomes a highly available service.
- Integrating a Existing Ceph Storage into an Overcloud
- If you already have an existing Ceph Storage Cluster, you can integrate this during an Overcloud deployment. This means you manage and scale the cluster outside of the Overcloud configuration.
1.3. Setting Requirements Link kopierenLink in die Zwischenablage kopiert!
This guide acts as supplementary information for the Director Installation and Usage guide. This means the Requirements section also applies to this guide. Implement these requirements as necessary.
If using the Red Hat OpenStack Platform director to create Ceph Storage nodes, note the following requirements for these nodes:
- Processor
- 64-bit x86 processor with support for the Intel 64 or AMD64 CPU extensions.
- Memory
- Memory requirements depend on the amount of storage space. Ideally, use at minimum 1 GB of memory per 1 TB of hard disk space.
- Disk Space
- Storage requirements depends on the amount of memory. Ideally, use at minimum 1 GB of memory per 1 TB of hard disk space.
- Disk Layout
The recommended Red Hat Ceph Storage node configuration requires a disk layout similar to the following:
-
/dev/sda
- The root disk. The director copies the main Overcloud image to the disk. -
/dev/sdb
- The journal disk. This disk divides into partitions for Ceph OSD journals. For example, /dev/sdb1, /dev/sdb2, /dev/sdb3, and onward. The journal disk is usually a solid state drive (SSD) to aid with system performance. -
/dev/sdc
and onward - The OSD disks. Use as many disks as necessary for your storage requirements.
-
Erase all existing partitions on the disks targeted for journaling and OSDs before deploying the Overcloud. In addition, the Ceph Storage OSDs and journal disks require GPT disk labels, which you can configure as a part of the deployment. See Section 2.8, “Formatting Ceph Storage Node Disks to GPT” for more information.
- Network Interface Cards
- A minimum of one 1 Gbps Network Interface Cards, although it is recommended to use at least two NICs in a production environment. Use additional network interface cards for bonded interfaces or to delegate tagged VLAN traffic. It is recommended to use a 10 Gbps interface for storage node, especially if creating an OpenStack Platform environment that serves a high volume of traffic.
- Intelligent Platform Management Interface (IPMI)
- Each Ceph node requires IPMI functionality on the server’s motherboard.
This guide also requires the following:
- An Undercloud host with the Red Hat OpenStack Platform director installed. See Chapter 3. Installing the Undercloud.
- Any additional hardware recommendation for Red Hat Ceph Storage. See the Red Hat Ceph Storage Hardware Guide for these recommendations.
The Ceph Monitor service is installed on the Overcloud’s Controller nodes. This means you must provide adequate resources to alleviate performance issues. Ensure the Controller nodes in your environment use at least 16 GB of RAM for memory and solid-state drive (SSD) storage for the Ceph monitor data.
1.4. Defining the Scenarios Link kopierenLink in die Zwischenablage kopiert!
This guide uses two scenarios:
- The first scenario creates an Overcloud with a Ceph Storage Cluster. This means the director deploys the Ceph Storage Cluster.
- The second scenario integrates an existing Ceph Storage Cluster with an Overcloud. This means you manage the Ceph Storage Cluster separate from Overcloud management.
Chapter 2. Creating an Overcloud with Ceph Storage Nodes Link kopierenLink in die Zwischenablage kopiert!
This chapter describes how to use the director to create an Overcloud that includes its own Ceph Storage Cluster. For instructions on how to create an Overcloud and integrate it with an existing Ceph Storage Cluster, see Chapter 3, Integrating an Existing Ceph Storage Cluster in an Overcloud instead.
The scenario described in this chapter consists of nine nodes in the Overcloud:
- Three Controller nodes with high availability. This includes the Ceph Monitor service on each node.
- Three Red Hat Ceph Storage nodes in a cluster. These nodes contain the Ceph OSD service and act as the actual storage.
- Three Compute nodes.
All machines in this scenario are bare metal systems using IPMI for power management. These nodes do not require an operating system because the director copies a Red Hat Enterprise Linux 7 image to each node.
The director communicates to each node through the Provisioning network during the introspection and provisioning processes. All nodes connect to this network through the native VLAN. For this example, we use 192.0.2.0/24 as the Provisioning subnet with the following IP address assignments:
Node Name | IP Address | MAC Address | IPMI IP Address |
---|---|---|---|
Director | 192.0.2.1 | aa:aa:aa:aa:aa:aa | |
Controller 1 | DHCP defined | b1:b1:b1:b1:b1:b1 | 192.0.2.205 |
Controller 2 | DHCP defined | b2:b2:b2:b2:b2:b2 | 192.0.2.206 |
Controller 3 | DHCP defined | b3:b3:b3:b3:b3:b3 | 192.0.2.207 |
Compute 1 | DHCP defined | c1:c1:c1:c1:c1:c1 | 192.0.2.208 |
Compute 2 | DHCP defined | c2:c2:c2:c2:c2:c2 | 192.0.2.209 |
Compute 3 | DHCP defined | c3:c3:c3:c3:c3:c3 | 192.0.2.210 |
Ceph 1 | DHCP defined | d1:d1:d1:d1:d1:d1 | 192.0.2.211 |
Ceph 2 | DHCP defined | d2:d2:d2:d2:d2:d2 | 192.0.2.212 |
Ceph 3 | DHCP defined | d3:d3:d3:d3:d3:d3 | 192.0.2.213 |
2.1. Initializing the Stack User Link kopierenLink in die Zwischenablage kopiert!
Log into the director host as the stack
user and run the following command to initialize your director configuration:
source ~/stackrc
$ source ~/stackrc
This sets up environment variables containing authentication details to access the director’s CLI tools.
2.2. Registering Nodes Link kopierenLink in die Zwischenablage kopiert!
A node definition template (instackenv.json
) is a JSON format file and contains the hardware and power management details for registering nodes. For example:
After creating the template, save the file to the stack user’s home directory (/home/stack/instackenv.json
), then import it into the director. Use the following command to accomplish this:
openstack baremetal import --json ~/instackenv.json
$ openstack baremetal import --json ~/instackenv.json
This imports the template and registers each node from the template into the director.
Assign the kernel and ramdisk images to all nodes:
openstack baremetal configure boot
$ openstack baremetal configure boot
The nodes are now registered and configured in the director.
2.3. Inspecting the Hardware of Nodes Link kopierenLink in die Zwischenablage kopiert!
After registering the nodes, inspect the hardware attribute of each node. Run the following command to inspect the hardware attributes of each node:
openstack baremetal introspection bulk start
$ openstack baremetal introspection bulk start
Make sure this process runs to completion. This process usually takes 15 minutes for bare metal nodes.
2.4. Manually Tagging the Nodes Link kopierenLink in die Zwischenablage kopiert!
After registering and inspecting the hardware of each node, tag them into specific profiles. These profile tags match your nodes to flavors, and in turn the flavors are assigned to a deployment role.
Retrieve a list of your nodes to identify their UUIDs:
ironic node-list
$ ironic node-list
To manually tag a node to a specific profile, add a profile option to the properties/capabilities
parameter for each node. For example, to tag three nodes to use a controller profile and one node to use a compute profile, use the following commands:
The addition of the profile
option tags the nodes into each respective profiles.
As an alternative to manual tagging, use the Automated Health Check (AHC) Tools to automatically tag larger numbers of nodes based on benchmarking data.
2.5. Defining the Root Disk for Ceph Storage Nodes Link kopierenLink in die Zwischenablage kopiert!
Most Ceph Storage nodes use multiple disks. This means the director needs to identify the disk to use for the root disk when provisioning a Ceph Storage node. There are several properties you can use to help identify the root disk:
-
model
(String): Device identifier. -
vendor
(String): Device vendor. -
serial
(String): Disk serial number. -
wwn
(String): Unique storage identifier. -
size
(Integer): Size of the device in GB.
In this example, we specify the drive to deploy the Overcloud image using the serial number of the disk to determine the root device.
First, collect a copy of each node’s hardware information that the director obtained from the introspection. This information is stored in the OpenStack Object Storage server (swift). Download this information to a new directory:
mkdir swift-data cd swift-data export SWIFT_PASSWORD=`sudo crudini --get /etc/ironic-inspector/inspector.conf swift password` for node in $(ironic node-list | grep -v UUID| awk '{print $2}'); do swift -U service:ironic -K $SWIFT_PASSWORD download ironic-inspector inspector_data-$node; done
$ mkdir swift-data
$ cd swift-data
$ export SWIFT_PASSWORD=`sudo crudini --get /etc/ironic-inspector/inspector.conf swift password`
$ for node in $(ironic node-list | grep -v UUID| awk '{print $2}'); do swift -U service:ironic -K $SWIFT_PASSWORD download ironic-inspector inspector_data-$node; done
This example uses the crudini
command, which is available in the crudini
package.
This downloads the data from each inspector_data
object from introspection. All objects use the node UUID as part of the object name:
Check the disk information for each node. The following command displays each node ID and the disk information:
for node in $(ironic node-list | grep -v UUID| awk '{print $2}'); do echo "NODE: $node" ; cat inspector_data-$node | jq '.inventory.disks' ; echo "-----" ; done
$ for node in $(ironic node-list | grep -v UUID| awk '{print $2}'); do echo "NODE: $node" ; cat inspector_data-$node | jq '.inventory.disks' ; echo "-----" ; done
For example, the data for one node might show three disk:
For this example, set the root device to disk 2, which has 61866da04f37fc001ea4e31e121cfb45
as the serial number. This requires a change to the root_device
parameter for the node definition:
ironic node-update 15fc0edc-eb8d-4c7f-8dc0-a2a25d5e09e3 add properties/root_device='{"serial": "61866da04f37fc001ea4e31e121cfb45"}'
$ ironic node-update 15fc0edc-eb8d-4c7f-8dc0-a2a25d5e09e3 add properties/root_device='{"serial": "61866da04f37fc001ea4e31e121cfb45"}'
This helps the director identify the specific disk to use as the root disk. When we initiate our Overcloud creation, the director provisions this node and writes the Overcloud image to this disk. The other disks are used for mapping our Ceph Storage nodes.
Do not use name
to set the root disk as this value can change when the node boots.
2.6. Enabling Ceph Storage in the Overcloud Link kopierenLink in die Zwischenablage kopiert!
The Overcloud image already contains the Ceph services and the necessary Puppet modules to automatically configure both the Ceph OSD nodes and the Ceph Monitor on Controller clusters. The Overcloud’s Heat template collection also contains the necessary procedures to enable your Ceph Storage configuration. However, the director requires some details to enable Ceph Storage and pass on the intended configuration. To pass this information, copy the storage-environment.yaml
environment file to your stack user’s templates directory.
cp /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml ~/templates/.
$ cp /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml ~/templates/.
Modify the following options in the copy of storage-environment.yaml:
- CinderEnableIscsiBackend
-
Enables the iSCSI backend. Set to
false
. - CinderEnableRbdBackend
-
Enables the Ceph Storage backend. Set to
true
. - CinderEnableNfsBackend
-
Enables the NFS backend. Set to
false
. - NovaEnableRbdBackend
-
Enables Ceph Storage for Nova ephemeral storage. Set to
true
. - GlanceBackend
-
Defines the backend to use for Glance. Set to
rbd
to use Ceph Storage for images.
The storage-environment.yaml
also contains some options to configure Ceph Storage directly through Heat. However, these options are not necessary in this scenario since the director creates these nodes and automatically defines the configuration values.
2.7. Mapping the Ceph Storage Node Disk Layout Link kopierenLink in die Zwischenablage kopiert!
The default mapping uses the root disk for Ceph Storage. However, most production environments use multiple separate disks for storage and partitions for journaling. In this situation, you define a storage map as part of the storage-environment.yaml
file copied previously.
Edit the storage-environment.yaml
file and add an additional section that contains the following:
parameter_defaults: ExtraConfig: ceph::profile::params::osds:
parameter_defaults:
ExtraConfig:
ceph::profile::params::osds:
This adds extra Hiera data to the Overcloud, which Puppet uses as custom parameters during configuration. Use the ceph::profile::params::osds
parameter to map the relevant disks and journal partitions. For example, a Ceph node with four disks might have the following assignments:
-
/dev/sda
- The root disk containing the Overcloud image -
/dev/sdb
- The disk containing the journal partitions. This is usually a solid state disk (SSD) to aid with system performance. -
/dev/sdc
and/dev/sdd
- The OSD disks
For this example, the mapping might contain the following:
ceph::profile::params::osds: '/dev/sdc': journal: '/dev/sdb' '/dev/sdd': journal: '/dev/sdb'
ceph::profile::params::osds:
'/dev/sdc':
journal: '/dev/sdb'
'/dev/sdd':
journal: '/dev/sdb'
If you do not want a separate disk for journals, use co-located journals on the OSD disks. Pass a blank value to the journal parameters:
ceph::profile::params::osds: '/dev/sdb': {} '/dev/sdc': {} '/dev/sdd': {}
ceph::profile::params::osds:
'/dev/sdb': {}
'/dev/sdc': {}
'/dev/sdd': {}
After completing these modifications, save the storage-environment.yaml
file so that when we deploy the Overcloud, the Ceph Storage nodes use our disk mapping. We include this file in our deployment to initiate our storage requirements.
2.8. Formatting Ceph Storage Node Disks to GPT Link kopierenLink in die Zwischenablage kopiert!
The Ceph Storage OSDs and journal partitions require GPT disk labels. This means the additional disks on Ceph Storage require conversion to GPT labels before installing the Ceph OSD. To accomplish this, the node must execute a script to perform this operation on first boot. You include this script as part of a Heat template in your Overcloud creation. For example, the following heat template (wipe-disks.yaml
) runs a script that checks all disks on Ceph Storage node and converts all of them (except the disk containing the root file system) to GPT.
This Heat template makes reference to a Bash script called wipe-disk.sh
. This script contains your procedure to wipe the non-root disks. The following script is an example of wipe-disk.sh
that wipes all disks except for the root disk:
To include the Heat template in your environment, register it as the NodeUserData
resource in your storage-environment.yaml
file:
resource_registry: OS::TripleO::NodeUserData: /home/stack/templates/firstboot/wipe-disks.yaml
resource_registry:
OS::TripleO::NodeUserData: /home/stack/templates/firstboot/wipe-disks.yaml
2.9. Customizing the Ceph Storage Cluster Link kopierenLink in die Zwischenablage kopiert!
It is possible to override the default configuration parameters for Ceph Storage nodes using the ExtraConfig
hook to define data to pass to the Puppet configuration. There are two methods to pass this data:
Method 1: Modifying Puppet Defaults
You customize parameters provided to the ceph
Puppet module during the overcloud configuration. These parameters are a part of the ceph::profile::params
Puppet class defined in /etc/puppet/modules/ceph/manifests/profile/params.conf
. For example, following environment file snippet customizes the default osd_journal_size
parameter from the ceph::profile::params
class and overrides any default:
parameter_defaults: ExtraConfig: ceph::profile::params::osd_journal_size: 2048
parameter_defaults:
ExtraConfig:
ceph::profile::params::osd_journal_size: 2048
Add this content to an environment file (for example, ceph-settings.yaml
) and include it when you run the openstack overcloud deploy
command in Section 2.10, “Creating the Overcloud”. For example:
openstack overcloud deploy --templates --ceph-storage-scale <number of nodes> -e /home/stack/templates/storage-environment.yaml -e /home/stack/templates/ceph-settings.yaml
$ openstack overcloud deploy --templates --ceph-storage-scale <number of nodes> -e /home/stack/templates/storage-environment.yaml -e /home/stack/templates/ceph-settings.yaml
Method 2: Arbitrary Configuration Defaults
If Method 1 does not include a specific parameter you need to configure, it is possible to provide arbitrary Ceph Storage parameters using the ceph::conf::args
Puppet class. This class accepts parameter names using a stanza/key
format and value
to define the parameter’s value. These settings configure the ceph.conf
file on each node. For example, to change the max_open_files
parameter in the global
section of the ceph.conf
file, use the following structure in an environment file:
parameter_defaults: ExtraConfig: ceph::conf::args: global/max_open_files: value: 131072
parameter_defaults:
ExtraConfig:
ceph::conf::args:
global/max_open_files:
value: 131072
Add this content to an environment file (for example, ceph-settings.yaml
) and include it when you run the openstack overcloud deploy
command in Section 2.10, “Creating the Overcloud”. For example:
openstack overcloud deploy --templates --ceph-storage-scale <number of nodes> -e /home/stack/templates/storage-environment.yaml -e /home/stack/templates/ceph-settings.yaml
$ openstack overcloud deploy --templates --ceph-storage-scale <number of nodes> -e /home/stack/templates/storage-environment.yaml -e /home/stack/templates/ceph-settings.yaml
The resulting ceph.conf
file should be populated with the following:
[global] max_open_files = 131072
[global]
max_open_files = 131072
2.10. Creating the Overcloud Link kopierenLink in die Zwischenablage kopiert!
The creation of the Overcloud requires additional arguments for the openstack overcloud deploy
command. For example:
openstack overcloud deploy --templates -e /home/stack/templates/storage-environment.yaml --control-scale 3 --compute-scale 3 --ceph-storage-scale 3 --control-flavor control --compute-flavor compute --ceph-storage-flavor ceph-storage --neutron-network-type vxlan --neutron-tunnel-types vxlan --ntp-server pool.ntp.org
$ openstack overcloud deploy --templates -e /home/stack/templates/storage-environment.yaml --control-scale 3 --compute-scale 3 --ceph-storage-scale 3 --control-flavor control --compute-flavor compute --ceph-storage-flavor ceph-storage --neutron-network-type vxlan --neutron-tunnel-types vxlan --ntp-server pool.ntp.org
The above command uses the following options:
-
--templates
- Creates the Overcloud from the default Heat template collection. -
-e /home/stack/templates/storage-environment.yaml
- Adds an additional environment file to the Overcloud deployment. In this case, it is the storage environment file containing our Ceph Storage configuration. -
--control-scale 3
- Scale the Controller nodes to three. -
--compute-scale 3
- Scale the Compute nodes to three. -
--ceph-storage-scale 3
- Scale the Ceph Storage nodes to three. -
--control-flavor control
- Use a specific flavor for the Controller nodes. -
--compute-flavor compute
- Use a specific flavor for the Compute nodes. -
--ceph-storage-flavor ceph-storage
- Use a specific flavor for the Compute nodes. -
--neutron-network-type vxlan
- Sets theneutron
networking type. -
--neutron-tunnel-types vxlan
- Sets theneutron
tunnel type. -
--ntp-server pool.ntp.org
- Sets our NTP server.
For a full list of options, run:
openstack help overcloud deploy
$ openstack help overcloud deploy
For more information, see Setting Overcloud Parameters 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 heat stack-list --show-nested
$ source ~/stackrc
$ heat stack-list --show-nested
2.11. Accessing the Overcloud Link kopierenLink in die Zwischenablage kopiert!
The director generates a script to configure and help authenticate interactions with your Overcloud from the director host. The director saves this file (overcloudrc
) in your stack
user’s home directory. Run the following command to use this file:
source ~/overcloudrc
$ source ~/overcloudrc
This loads the necessary environment variables to interact with your Overcloud from the director host’s CLI. To return to interacting with the director’s host, run the following command:
source ~/stackrc
$ source ~/stackrc
2.12. Monitoring Ceph Storage Nodes Link kopierenLink in die Zwischenablage kopiert!
After completing the Overcloud creation, it is recommended to check the status of the Ceph Storage Cluster to make sure it is working properly. To accomplish this, log into a Controller node as the heat-admin
user from the director.
nova list ssh heat-admin@192.168.0.25
$ nova list
$ ssh heat-admin@192.168.0.25
Check the health of the cluster:
sudo ceph health
$ sudo ceph health
If the cluster has no issues, the command reports back HEALTH_OK
. This means the cluster is safe to use.
Check the status of the Ceph Monitor quorum:
sudo ceph quorum_status
$ sudo ceph quorum_status
This shows the monitors participating in the quorum and which one is the leader.
Check if all Ceph OSDs are running:
ceph osd stat
$ ceph osd stat
For more information on monitoring Ceph Storage clusters, see Chapter 3. Monitoring in the Red Hat Ceph Storage Administration Guide.
2.13. Rebooting the Environment Link kopierenLink in die Zwischenablage kopiert!
A situation might occur where you need to reboot the environment. For example, when you might need to modify the physical servers, or you might need to recover from a power outage. In this situation, it is important to make sure your Ceph Storage nodes boot correctly.
Make sure to boot the nodes in the following order:
- Boot all Ceph Monitor nodes first - This ensures the Ceph Monitor service is active in your high availability cluster. By default, the Ceph Monitor service is installed on the Controller node. If the Ceph Monitor is separate from the Controller in a custom role, make sure this custom Ceph Monitor role is active.
- Boot all Ceph Storage nodes - This ensures the Ceph OSD cluster can connect to the active Ceph Monitor cluster on the Controller nodes.
Use the following process to reboot the Ceph Storage nodes:
- Select the first Ceph Storage node to reboot and log into it.
Disable Ceph Storage cluster rebalancing temporarily:
sudo ceph osd set noout sudo ceph osd set norebalance
$ sudo ceph osd set noout $ sudo ceph osd set norebalance
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Reboot the node:
sudo reboot
$ sudo reboot
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Wait until the node boots.
Log into the node and check the cluster status:
sudo ceph -s
$ sudo ceph -s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check that the
pgmap
reports allpgs
as normal (active+clean
).- Log out of the node, reboot the next node, and check its status. Repeat this process until you have rebooted all Ceph storage nodes.
When complete, enable cluster rebalancing again:
sudo ceph osd unset noout sudo ceph osd unset norebalance
$ sudo ceph osd unset noout $ sudo ceph osd unset norebalance
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Perform a final status check to make sure the cluster reports
HEALTH_OK
:sudo ceph status
$ sudo ceph status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
If a situation occurs where all Overcloud nodes boot at the same time, the Ceph OSD services might not start correctly on the Ceph Storage nodes. In this situation, reboot the Ceph Storage OSDs so they can connect to the Ceph Monitor service. Run the following command on each Ceph Storage node:
sudo systemctl restart 'ceph*'
$ sudo systemctl restart 'ceph*'
Verify a HEALTH_OK
status of the Ceph Storage node cluster with the following command:
sudo ceph status
$ sudo ceph status
2.14. Replacing Ceph Storage Nodes Link kopierenLink in die Zwischenablage kopiert!
A situation might occur when a Ceph Storage node fails. In this situation, you must ensure to disable and rebalance the faulty node before removing it from the Overcloud to ensure no data loss. This procedure explains the process for replacing a Ceph Storage node.
This procedure uses steps from the Red Hat Ceph Storage Administration Guide to manually remove Ceph Storage nodes. For more in-depth information about manual removal of Ceph Storage nodes, see Removing OSDs Manually from the Red Hat Ceph Storage Administration Guide.
Log into either a Controller node or a Ceph Storage node as the heat-admin
user. The director’s stack
user has an SSH key to access the heat-admin
user.
List the OSD tree and find the OSDs for your node. For example, your node to remove might contain the following OSDs:
-2 0.09998 host overcloud-cephstorage-0 0 0.04999 osd.0 up 1.00000 1.00000 1 0.04999 osd.1 up 1.00000 1.00000
Disable the OSDs on the Ceph Storage node. In this case, the OSD IDs are 0 and 1.
sudo ceph osd out 0 sudo ceph osd out 1
[heat-admin@overcloud-controller-0 ~]$ sudo ceph osd out 0
[heat-admin@overcloud-controller-0 ~]$ sudo ceph osd out 1
The Ceph Storage cluster begins rebalancing. Wait for this process to complete. You can follow the status using the following command:
sudo ceph -w
[heat-admin@overcloud-controller-0 ~]$ sudo ceph -w
Once the Ceph cluster completes rebalancing, log into the faulty Ceph Storage node as the heat-admin
user and stop the node.
sudo /etc/init.d/ceph stop osd.0 sudo /etc/init.d/ceph stop osd.1
[heat-admin@overcloud-cephstorage-0 ~]$ sudo /etc/init.d/ceph stop osd.0
[heat-admin@overcloud-cephstorage-0 ~]$ sudo /etc/init.d/ceph stop osd.1
Remove the Ceph Storage node from the CRUSH map so that it no longer receives data.
sudo ceph osd crush remove osd.0 sudo ceph osd crush remove osd.1
[heat-admin@overcloud-cephstorage-0 ~]$ sudo ceph osd crush remove osd.0
[heat-admin@overcloud-cephstorage-0 ~]$ sudo ceph osd crush remove osd.1
Remove the OSD authentication key.
sudo ceph auth del osd.0 sudo ceph auth del osd.1
[heat-admin@overcloud-cephstorage-0 ~]$ sudo ceph auth del osd.0
[heat-admin@overcloud-cephstorage-0 ~]$ sudo ceph auth del osd.1
Remove the OSD from the cluster.
sudo ceph osd rm 0 sudo ceph osd rm 1
[heat-admin@overcloud-cephstorage-0 ~]$ sudo ceph osd rm 0
[heat-admin@overcloud-cephstorage-0 ~]$ sudo ceph osd rm 1
Leave the node and return to the director host as the stack
user.
exit
[heat-admin@overcloud-cephstorage-0 ~]$ exit
[stack@director ~]$
Disable the Ceph Storage node so the director does not reprovision it.
ironic node-list ironic node-set-maintenance [UUID] true
[stack@director ~]$ ironic node-list
[stack@director ~]$ ironic node-set-maintenance [UUID] true
Removing a Ceph Storage node requires an update to the overcloud
stack in the director using the local template files. First identify the UUID of the Overcloud stack:
heat stack-list
$ heat stack-list
Identify the UUIDs of the Ceph Storage node to delete:
nova list
$ nova list
Run the following command to delete the node from the stack and update the plan accordingly:
openstack overcloud node delete --stack [STACK_UUID] --templates -e [ENVIRONMENT_FILE] [NODE_UUID]
$ openstack overcloud node delete --stack [STACK_UUID] --templates -e [ENVIRONMENT_FILE] [NODE_UUID]
If you passed any extra environment files when you created the Overcloud, pass them again here using the -e
or --environment-file
option to avoid making undesired changes to the Overcloud.
Wait until the stack completes its update. Monitor the stack update using the heat stack-list --show-nested
command.
Add new nodes to the director’s node pool and deploy them as Ceph Storage nodes. Use the --ceph-storage-scale
option to define the total number of Ceph Storage nodes in the Overcloud. For example, if you removed a faulty node from a three-node cluster and you want to replace it, use --ceph-storage-scale 3
to return the number of Ceph Storage nodes to its original value:
openstack overcloud deploy --templates --ceph-storage-scale 3 -e [ENVIRONMENT_FILES]
$ openstack overcloud deploy --templates --ceph-storage-scale 3 -e [ENVIRONMENT_FILES]
If you passed any extra environment files when you created the Overcloud, pass them again here using the -e
or --environment-file
option to avoid making undesired changes to the Overcloud.
The director provisions the new node and updates the entire stack with the new node’s details.
Log into a Controller node as the heat-admin
user and check the status of the Ceph Storage node. For example:
sudo ceph status
[heat-admin@overcloud-controller-0 ~]$ sudo ceph status
Confirm that the value in the osdmap
section matches the number of desired nodes in your cluster.
The failed Ceph Storage node has now been replaced with a new node.
Chapter 3. Integrating an Existing Ceph Storage Cluster in an Overcloud Link kopierenLink in die Zwischenablage kopiert!
This chapter describes how to create an Overcloud and integrate it with an existing Ceph Storage Cluster. For instructions on how to create both Overcloud and Ceph Storage Cluster, see Chapter 2, Creating an Overcloud with Ceph Storage Nodes instead.
The scenario described in this chapter consists of six nodes in the Overcloud:
- Three Controller nodes with high availability.
- Three Compute nodes.
The director will integrate a separate Ceph Storage Cluster with its own nodes into the Overcloud. 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.
All OpenStack machines are bare metal systems using IPMI for power management. These nodes do not require an operating system because the director copies a Red Hat Enterprise Linux 7 image to each node.
The director communicates to the Controller and Compute nodes through the Provisioning network during the introspection and provisioning processes. All nodes connect to this network through the native VLAN. For this example, we use 192.0.2.0/24 as the Provisioning subnet with the following IP address assignments:
Node Name | IP Address | MAC Address | IPMI IP Address | |
---|---|---|---|---|
Director | 192.0.2.1 | aa:aa:aa:aa:aa:aa | ||
Controller 1 | DHCP defined | b1:b1:b1:b1:b1:b1 | 192.0.2.205 | |
Controller 2 | DHCP defined | b2:b2:b2:b2:b2:b2 | 192.0.2.206 | |
Controller 3 | DHCP defined | b3:b3:b3:b3:b3:b3 | 192.0.2.207 | |
Compute 1 | DHCP defined | c1:c1:c1:c1:c1:c1 | 192.0.2.208 | |
Compute 2 | DHCP defined | c2:c2:c2:c2:c2:c2 | 192.0.2.209 | |
Compute 3 | DHCP defined | c3:c3:c3:c3:c3:c3 | 192.0.2.210 |
3.1. Configuring the Existing Ceph Storage Cluster Link kopierenLink in die Zwischenablage kopiert!
Create three pools in your Ceph cluster:
volumes
,images
, andvms
. Use the following commands as a guide:ceph osd pool create volumes PGNUM ceph osd pool create images PGNUM ceph osd pool create vms PGNUM
[root@ceph ~]# ceph osd pool create volumes PGNUM [root@ceph ~]# ceph osd pool create images PGNUM [root@ceph ~]# ceph osd pool create vms PGNUM
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace PGNUM with the number of placement groups. We recommend approximately 100 per OSD. For example, the total number of OSDs multiplied by 100 divided by the number of replicas (
osd pool default size
). You can also use the Ceph Placement Groups (PGs) per Pool Calculator to determine a suitable value.Create a
client.openstack
user in your Ceph cluster with the following capabilities:-
cap_mon:
allow r
, cap_osd:
allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images
Use the following command as a guide:
ceph auth add client.openstack mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
[root@ceph ~]# ceph auth add client.openstack mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
cap_mon:
Next, note the Ceph client key created for the
client.openstack
user:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
key
value here (AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ==) is your Ceph client key.Finally, note the file system ID of your Ceph Storage cluster. This value is specified with the
fsid
setting in the configuration file of your cluster (under the[global]
section):[global] fsid = 4b5c8c0a-ff60-454b-a1b4-9747aa737d19 ...
[global] fsid = 4b5c8c0a-ff60-454b-a1b4-9747aa737d19 ...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteFor more information about the Ceph Storage cluster configuration file, see Configuration Reference (from the Red Hat Ceph Storage Configuration Guide).
The Ceph client key and file system ID will both be used later in Section 3.6, “Enabling Integration with the Existing Ceph Storage Cluster”.
3.2. Initializing the Stack User Link kopierenLink in die Zwischenablage kopiert!
Log into the director host as the stack
user and run the following command to initialize your director configuration:
source ~/stackrc
$ source ~/stackrc
This sets up environment variables containing authentication details to access the director’s CLI tools.
3.3. Registering Nodes Link kopierenLink in die Zwischenablage kopiert!
A node definition template (instackenv.json
) is a JSON format file and contains the hardware and power management details for registering nodes. For example:
After creating the template, save the file to the stack user’s home directory (/home/stack/instackenv.json
), then import it into the director. Use the following command to accomplish this:
openstack baremetal import --json ~/instackenv.json
$ openstack baremetal import --json ~/instackenv.json
This imports the template and registers each node from the template into the director.
Assign the kernel and ramdisk images to all nodes:
openstack baremetal configure boot
$ openstack baremetal configure boot
The nodes are now registered and configured in the director.
3.4. Inspecting the Hardware of Nodes Link kopierenLink in die Zwischenablage kopiert!
After registering the nodes, inspect the hardware attribute of each node. Run the following command to inspect the hardware attributes of each node:
openstack baremetal introspection bulk start
$ openstack baremetal introspection bulk start
Make sure this process runs to completion. This process usually takes 15 minutes for bare metal nodes.
3.5. Manually Tagging the Nodes Link kopierenLink in die Zwischenablage kopiert!
After registering and inspecting the hardware of each node, tag them into specific profiles. These profile tags match your nodes to flavors, and in turn the flavors are assigned to a deployment role.
Retrieve a list of your nodes to identify their UUIDs:
ironic node-list
$ ironic node-list
To manually tag a node to a specific profile, add a profile option to the properties/capabilities
parameter for each node. For example, to tag three nodes to use a controller profile and one node to use a compute profile, use the following commands:
The addition of the profile
option tags the nodes into each respective profiles.
As an alternative to manual tagging, use the Automated Health Check (AHC) Tools to automatically tag larger numbers of nodes based on benchmarking data,
3.6. Enabling Integration with the Existing Ceph Storage Cluster Link kopierenLink in die Zwischenablage kopiert!
Create a copy of /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph-external.yaml
to a directory in your stack
user’s home directory:
mkdir templates cp /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph-external.yaml ~/templates/.
[stack@director ~]# mkdir templates
[stack@director ~]# cp /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph-external.yaml ~/templates/.
Edit the file and set the following parameters:
- Set the resource definition to an absolute path:
OS::TripleO::CephClusterConfig::SoftwareConfig: /usr/share/openstack-tripleo-heat-templates/puppet/extraconfig/ceph/ceph-external-config.yaml
OS::TripleO::CephClusterConfig::SoftwareConfig: /usr/share/openstack-tripleo-heat-templates/puppet/extraconfig/ceph/ceph-external-config.yaml
Set the following three parameters using your Ceph Storage environment details:
-
CephClientKey
: the Ceph client key of your Ceph Storage cluster. This is the value ofkey
you retrieved earlier in Section 3.1, “Configuring the Existing Ceph Storage Cluster” (for example,AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ==
). -
CephExternalMonHost
: a comma-delimited list of the IPs of all MON hosts in your Ceph Storage cluster. -
CephClusterFSID
: the file system ID of your Ceph Storage cluster. This is the value offsid
in your Ceph Storage cluster configuration file, which you retrieved earlier in Section 3.1, “Configuring the Existing Ceph Storage Cluster” (for example,4b5c8c0a-ff60-454b-a1b4-9747aa737d19
).
-
If necessary, also set the name of the OpenStack pools and the client user using the following parameters and values:
-
CephClientUserName: openstack
-
NovaRbdPoolName: vms
-
CinderRbdPoolName: volumes
-
GlanceRbdPoolName: images
-
3.7. Creating the Overcloud Link kopierenLink in die Zwischenablage kopiert!
The creation of the Overcloud requires additional arguments for the openstack overcloud deploy
command. For example:
openstack overcloud deploy --templates -e /home/stack/templates/puppet-ceph-external.yaml --control-scale 3 --compute-scale 3 --ceph-storage-scale 0 --control-flavor control --compute-flavor compute --neutron-network-type vxlan --ntp-server pool.ntp.org
$ openstack overcloud deploy --templates -e /home/stack/templates/puppet-ceph-external.yaml --control-scale 3 --compute-scale 3 --ceph-storage-scale 0 --control-flavor control --compute-flavor compute --neutron-network-type vxlan --ntp-server pool.ntp.org
The above command uses the following options:
-
--templates
- Creates the Overcloud from the default Heat template collection. -
-e /home/stack/templates/puppet-ceph-external.yaml
- Adds an additional environment file to the Overcloud deployment. In this case, it is the storage environment file containing the configuration for the existing Ceph Storage Cluster. -
--control-scale 3
- Scale the Controller nodes to three. -
--compute-scale 3
- Scale the Compute nodes to three. -
--ceph-storage-scale 0
- Scale the Ceph Storage nodes to zero. This ensures the director does not create any Ceph Storage nodes. -
--control-flavor control
- Use a specific flavor for the Controller nodes. -
--compute-flavor compute
- Use a specific flavor for the Compute nodes. -
--neutron-network-type vxlan
- Sets theneutron
networking type. -
--ntp-server pool.ntp.org
- Sets our NTP server.
For a full list of options, run:
openstack help overcloud deploy
$ openstack help overcloud deploy
For more information, see Setting Overcloud Parameters 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 heat stack-list --show-nested
$ source ~/stackrc
$ heat stack-list --show-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.
3.8. Accessing the Overcloud Link kopierenLink in die Zwischenablage kopiert!
The director generates a script to configure and help authenticate interactions with your Overcloud from the director host. The director saves this file (overcloudrc
) in your stack
user’s home directory. Run the following command to use this file:
source ~/overcloudrc
$ source ~/overcloudrc
This loads the necessary environment variables to interact with your Overcloud from the director host’s CLI. To return to interacting with the director’s host, run the following command:
source ~/stackrc
$ source ~/stackrc
Chapter 4. Conclusion Link kopierenLink in die Zwischenablage kopiert!
This concludes the creation and configuration of Overcloud with Red Hat Ceph Storage. For general Overcloud post-creation functions, see Performing Tasks after Overcloud Creation" in the Director Installation and Usage guide.