Configuring Red Hat OpenStack with Red Hat Storage
Getting Started with Red Hat OpenStack and Red Hat Storage
Abstract
Chapter 1. Introduction to Red Hat Storage and Red Hat OpenStack Copy linkLink copied to clipboard!
1.1. Advantages of Integration Copy linkLink copied to clipboard!
- It offers users a storage and compute solution, a platform for innovation, and a support experience during the journey to open hybrid cloud.
- Makes it easier to deploy and manage enterprise and public clouds with unified storage services for OpenStack, supporting block storage (Cinder), image services (Glance), and object storage (Swift) from the same storage pool.
1.2. Architecture Overview Copy linkLink copied to clipboard!
- Red Hat Enterprise OpenStack environment.See Red Hat OpenStack Architecture in Product Introduction in the Red Hat OpenStack Getting Started Guide.
- Red Hat Storage environment.A Red Hat Storage environment consists of bricks that are used to build volumes. Different types of optimized storage volumes can be used as storage for Red Hat OpenStack.
Figure 1.1. Integration Architecture
Chapter 2. Prerequisites Copy linkLink copied to clipboard!
2.1. Supported Versions Copy linkLink copied to clipboard!
- Red Hat Storage 3.0 with Red Hat OpenStack 4.0
2.2. Software and Hardware Requirements Copy linkLink copied to clipboard!
- the hardware and software requirements to install and configure the Red Hat OpenStack environment in the Prerequisites chapter of Red Hat Enterprise Linux OpenStack Platform 4's Installation and Configuration Guide.
- the hardware compatibility matrix and system requirements in the Planning Red Hat Storage Installation chapter of Red Hat Storage Installation Guide.
2.3. Subscribing to Red Hat Channels Copy linkLink copied to clipboard!
- rhel-x86_64-server-6
- rhel-x86_64-server-6-ost-4
2.4. Setting SELinux Booleans Copy linkLink copied to clipboard!
# setsebool -P sanlock_use_fusefs on
# setsebool -P virt_use_sanlock on
# setsebool -P virt_use_fusefs on
Chapter 3. Installing and Configuring Red Hat Storage Copy linkLink copied to clipboard!
3.1. Installing Red Hat Storage Server Copy linkLink copied to clipboard!
3.2. Setting up Red Hat Storage Trusted Storage Pool Copy linkLink copied to clipboard!
3.2.1. Creating Volumes Copy linkLink copied to clipboard!
- To create a distributed-replicate Red Hat Storage volume for Block Storage:
# gluster volume create [new_volname] [replica [count]] [transport tcp | rdma | tcp,rdma] [new-brick]...As an example, the following command creates a four node distributed-replicated volume with a two-way mirror:# gluster volume create cinder-volume replica 2 transport tcp 10.1.1.11:/rhs/brick1/cinder-vol 10.1.1.12:/rhs/brick1/cinder-vol 10.1.1.13:/rhs/brick2/cinder-vol 10.1.1.14:/rhs/brick2/cinder-vol Creation of cinder-volume has been successful Please start the volume to access data. - To create a distributed-replicated Red Hat Storage volume for the Image service:
# gluster volume create [new-volname] [replica [count]] [transport tcp | rdma | tcp,rdma] [count]...As an example, the following command creates a four node distributed-replicated volume with a two-way mirror:# gluster volume create glance-volume replica 2 transport tcp 10.1.1.11:/rhs/brick1/glance-vol 10.1.1.12:/rhs/brick1/glance-vol 10.1.1.13:/rhs/brick2/glance-vol 10.1.1.14:/rhs/brick2/glance-vol Creation of cinder-volume has been successful Please start the volume to access data.
3.2.2. Tuning Red Hat Storage Volumes for Red Hat OpenStack Copy linkLink copied to clipboard!
# gluster volume set [volname] group virt
# gluster vol set [volname] storage.owner-uid [uid]
# gluster vol set [volname] storage.owner-gid [gid]
cinder-vol volume as follows:
# gluster vol set cinder-vol group virt
Set volume successful
# gluster vol set cinder-vol storage.owner-uid 165
Set volume successful
# gluster vol set cinder-vol storage.owner-gid 165
Set volume successful
Important
group virt command), it is reserved as a storage back-end for Red Hat OpenStack and cannot be used for any other storage purpose. The tagged volume is only accessible using the gluster native client.
/var/lib/glusterd/groups/virt file.
/var/lib/glusterd/groups/virt file are as follows:
quick-read=off
read-ahead=off
io-cache=off
stat-prefetch=off
eager-lock=enable
remote-dio=on
quorum-type=auto
server-quorum-type=server
3.2.3. Verifying Red Hat Storage Volume Configuration Copy linkLink copied to clipboard!
# gluster vol info [volname]
# gluster vol info cinder-vol
Volume Name: cinder-vol
Type: Distributed-Replicate
Volume ID: 2f4edaef-678b-492a-b972-bd95c1c490a3
Status: Created
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.1.1.11:/rhs/brick1/cinder-vol
Brick2: 10.1.1.12:/rhs/brick1/cinder-vol
Brick3: 10.1.1.13:/rhs/brick2/cinder-vol
Brick4: 10.1.1.14:/rhs/brick2/cinder-vol
Options Reconfigured:
storage.owner-gid: 165
storage.owner-uid: 165
network.remote-dio: enable
cluster.eager-lock: enable
performance.stat-prefetch: off
performance.io-cache: off
performance.read-ahead: off
performance.quick-read: off
# gluster vol info glance-vol
Volume Name: glance-vol
Type: Distributed-Replicate
Volume ID: eedd5254-e0ca-4173-98eb-45eaef738010
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.1.1.11:/rhs/brick3/glance-vol
Brick2: 10.1.1.12:/rhs/brick3/glance-vol
Brick3: 10.1.1.13:/rhs/brick4/glance-vol
Brick4: 10.1.1.14:/rhs/brick4/glance-vol
Options Reconfigured:
storage.owner-gid: 161
storage.owner-uid: 161
network.remote-dio: enable
cluster.eager-lock: enable
performance.stat-prefetch: off
performance.io-cache: off
performance.read-ahead: off
performance.quick-read: off
3.2.4. Starting Red Hat Storage Volumes Copy linkLink copied to clipboard!
# gluster volume start [volname]
# gluster volume start cinder-vol
Starting cinder-vol has been successful
# gluster volume start glance-vol
Starting glance-vol has been successful
3.3. Installing the Native Client Packages Copy linkLink copied to clipboard!
# yum install --assume yes glusterfs glusterfs-fuse
Chapter 4. Installing and Configuring Red Hat OpenStack Copy linkLink copied to clipboard!
- Install OpenStack using Foreman Installer or PackStack
- Configure the OpenStack Cinder service to use Red Hat Storage volume
- Configure the OpenStack Glance service to use Red Hat Storage volume
- Configure the OpenStack Compute service to use Red Hat Storage volume
- Verify the integrated setup
4.1. Installing OpenStack Copy linkLink copied to clipboard!
- Install OpenStack using Foreman OpenStack Manager on all the OpenStack nodes. For more information on installing using Foreman installer, see Chapter 3. Foreman Overview and Installation of Red Hat Enterprise Linux OpenStack Platform 4 Installation and Configuration Guide.
- Install OpenStack using PackStack utility on all the OpenStack nodes. For information on installing using PackStack, see Part II. Deploying OpenStack using PackStack of Red Hat Enterprise Linux OpenStack Platform 4 Getting Started Guide.
4.2. Configuring Openstack Block Storage to Use Red Hat Storage Volume Copy linkLink copied to clipboard!
Procedure 4.1. Configure Openstack Block Storage to Use Red Hat Storage Volume
Update the cinder.conf File
Set the glusterFS default configuration parameters in thecinder.conffile as follows:# openstack-config --set /etc/cinder/cinder.conf DEFAULT volume_driver cinder.volume.drivers.glusterfs.GlusterfsDriver # openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_shares_config /etc/cinder/shares.conf # openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_mount_point_base /var/lib/cinder/volumesCreate the shares.conf File
Create the/etc/cinder/shares.conffile. Add a list of Red Hat Storage Volumes from different trusted storage pools with the client mount point for each. Each storage volume and mount point must be on a new line, as follows:STORAGEHOST:VOLUME STORAGEHOST1:NEXTVOLUME STORAGEHOSTHOST2:ANOTHERVOLUMEAn example of this configuration is as follows:10.1.1.11:/cinder-vol 10.1.2.12:/nextcinder-vol 10.1.3.13:/anothercinder-volWhen listing the storage volume and mount point, Red Hat recommends that you use thebackup-volfile-servers=volfile_server2:volfile_server3:...:volfile_serverNoption to list the backup volfile servers to mount the client. If this option is specified while mounting the FUSE client, and if the first volfile server fails, the servers specified in thebackup-volfile-serversoption are used as volfile servers to mount the client until the mount operation is successful. Add this option to the storage volume and mount point list in/etc/cinder/shares.conffile as shown below:10.1.1.11:/cinder-vol -o backup-volfile-servers=volfile_server2:volfile_server3Restart Services
Restart the cinder services as follows:# service openstack-cinder-api restart # service openstack-cinder-volume restart # service openstack-cinder-scheduler restart
4.3. Configure the OpenStack Image Service to Use Red Hat Storage Volumes Copy linkLink copied to clipboard!
Procedure 4.2. Configure the OpenStack Image Service to Use Red Hat Storage Volumes
- Specify the location for
filesystem_store_datadiras follows:# ============ Filesystem Store Options=================== # Directory that the Filesystem backend store # writes image data to filesystem_store_datadir = /mnt/gluster/glance/images/ - Create a directory named
imagesas follows:# mkdir -p /mnt/gluster/glance/images - Change the ownership of the the Red Hat Storage volume as follows:
chown -R glance:glance/mnt/gluster/glance/ - Mount the Red Hat Storage volume on
filesystem_store_datadiras follows:mount -t glusterfs 10.1.1.11:/glance-vol /mnt/glusterWhen mounting the volume, Red Hat recommends you to usebackup-volfile-servers=volfile_server2:volfile_server3:...:volfile_serverNoption to list the backup volfile servers to mount the client. If this option is specified while mounting the fuse client, when the first volfile server fails, the servers specified in backup-volfile-servers option are used as volfile servers to mount the client until the mount is successful. - To persistently mount the glance volume, add the following line to the
/etc/fstabfile:10.1.1.11:/glance-vol images glusterfs defaults,_netdev 0 0 - Restart the OpenStack glance service as follows:
# service openstack-glance-api restart
4.4. Configure the OpenStack Compute Service to Use Red Hat Storage Volumes Copy linkLink copied to clipboard!
Procedure 4.3. Configure the OpenStack Compute Service to Use Red Hat Storage Volumes
- Configure the Compute service to the use Red Hat Storage volume by editing the
instances_pathin the/etc/nova/nova.conffile:#instances_path = /mnt/gluster/instance - Create a directory named
instanceas follows:# mkdir -p /mnt/gluster/instanceIf you are using a different volume other than the glance volume for compute service, then you must mount the volume usingmount -t glusterfs 10.1.1.11:/nova-vol /mnt/novacommand.When mounting the volume, Red Hat recommends you to use thebackup-volfile-servers=volfile_server2:volfile_server3:...:volfile_serverNoption to list the backup volfile servers to mount the client. If this option is specified while mounting the FUSE client, when the first volfile server fails, the servers specified in backup-volfile-servers option are used as volfile servers to mount the client until the mount operation is successful. - Change the ownership of the Red Hat Storage volume as follows:
chown -R nova:nova /mnt/gluster/instance - Restart the OpenStack Compute service as follows:
# service openstack-nova-compute restart
4.5. Verifying the Integrated Setup Copy linkLink copied to clipboard!
Procedure 4.4. Verify the Integrated Setup
- Verify that the Red Hat Storage Volumes are successfully mounted as follows:
# mount | grep gluster 10.1.1.11:/glance-vol on /mnt/gluster/glance/images type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072) 10.1.1.11:cinder-vol on /var/lib/cinder/volumes/586c24173ac3ab5d1d43aed1f113d9f6 type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072) - Verify that the Cinder volume is mounted on the Red Hat Storage volumes as follows:
# getfattr -d -etext -m. -n trusted.glusterfs.pathinfo /var/lib/cinder/volumes/586c24173ac3ab5d1d43aed1f113d9f6 # file: var/lib/cinder/volumes/586c24173ac3ab5d1d43aed1f113d9f6 trusted.glusterfs.pathinfo="((<DISTRIBUTE:cinder-vol-dht> (<REPLICATE:cinder-vol-replicate-0> <POSIX(/rhs/brick1/cinder-vol):dhcpzz-183.example.com:/rhs/brick1/cinder-vol/> <POSIX(/rhs/brick1/cinder- vol):dhcpzz-223.example.com:/rhs/brick1/cinder-vol/>) (<REPLICATE:cinder-vol-replicate-1> <POSIX(/rhs/brick2/cinder-vol):dhcpzz-223.example.com:/rhs/brick2/cinder-vol/> <POSIX(/rhs/brick2/ cinder-vol):dhcpzz-183.example.com:/rhs/brick2/cinder-vol/>)) (cinder-vol-dht-layout (cinder-vol-replicate-0 0 2147483646) (cinder-vol-replicate-1 2147483647 4294967295)))" - Verify that the glance image was created on the Red Hat Storage volumes as follows:
# glance image-create --name="test" --is-public=true --container-format=ovf --disk-format=qcow2 < f17-x86_64-openstack-sda.qcow2 +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | 1f104b5667768964d5df8c4ad1d7cd27 | | container_format | ovf | | created_at | 2013-07-30T12:56:05 | | deleted | False | | deleted_at | None | | disk_format | qcow2 | | id | a66213ee-1a76-4d4a-959d-5df3f8f320ac | | is_public | True | | min_disk | 0 | | min_ram | 0 | | name | test | | owner | 84e2f0fac93d402287a8eb97b6ba9711 | | protected | False | | size | 251985920 | | status | active | | updated_at | 2013-07-30T12:56:49 | +------------------+--------------------------------------+ # ls -l /mnt/gluster/glance/images/ total 246080 -rw-r-----. 1 glance glance 251985920 Jul 30 18:26 a66213ee-1a76-4d4a-959d-5df3f8f320ac ~(keystone_admin)]# getfattr -d -etext -m. -n trusted.glusterfs.pathinfo /mnt/gluster/glance/images/a66213ee-1a76-4d4a-959d-5df3f8f320ac getfattr: Removing leading '/' from absolute path names # file: var/lib/glance/images/a66213ee-1a76-4d4a-959d-5df3f8f320ac trusted.glusterfs.pathinfo="(<DISTRIBUTE:glance-vol-dht> (<REPLICATE:glance-vol-replicate-1> <POSIX(/rhs/brick4/glance-vol):dhcpzz-223.example.com:/rhs/brick4/glance-vol/a66213ee-1a76-4d4a-959d-5df3f 8f320ac> <POSIX(/rhs/brick4/glance-vol):dhcpzz-183.example.com:/rhs/brick4/glance-vol/a66213ee-1a76-4d4a-959d-5df3f8f320ac>))" - Verify that the nova instance was created on the Red Hat Storage volumes as follows:
# nova list +--------------------------------------+-----------+--------+------------+-------------+---------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+-----------+--------+------------+-------------+---------------------+ | 9b8f4140-665b-4959-abcd-5970c979e9df | instance1 | ACTIVE | None | Running | public=172.24.4.227 | +--------------------------------------+-----------+--------+------------+-------------+---------------------+ # getfattr -d -etext -m. -n trusted.glusterfs.pathinfo /mnt/gluster/instance/9b8f4140-665b-4959-abcd-5970c979e9df/disk getfattr: Removing leading '/' from absolute path names # file: mnt/gluster/instance/9b8f4140-665b-4959-abcd-5970c979e9df trusted.glusterfs.pathinfo="(<DISTRIBUTE:glance-vol-dht> (<REPLICATE:glance-vol-replicate-5> <POSIX(/rhs/brick4/glance-vol):rhs-vm4:/rhs/brick4/glance-vol/glance/images/ 9b8f4140-665b-4959-abcd-5970c979e9df> <POSIX(/rhs/brick4/glance-vol):rhs-vm3:/rhs/brick4/glance-vol/glance/images/9b8f4140-665b-4959-abcd-5970c979e9df>))"
Appendix A. Revision History Copy linkLink copied to clipboard!
| Revision History | |||
|---|---|---|---|
| Revision 3-10 | Mon Sep 22 2014 | ||
| |||