Red Hat Storage 2 1 Configuring Red Hat OpenStack with Red Hat Storage en US


Red Hat Storage 2.1
Configuring Red Hat OpenStack
with Red Hat Storage
Getting Started with Red Hat OpenStack and Red Hat Storage
Edition 1
Divya Muntimadugu
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat
Storage
Getting Started with Red Hat OpenStack and Red Hat Storage
Edition 1
Divya Muntimadugu
Red Hat Engineering Content Services
divya@redhat.com
Legal Notice
Copyright © 2013-2014 Red Hat Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported
License. If you distribute this document, or a modified version of it, you must provide attribution to Red
Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be
removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section
4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo,
and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
Java ® is a registered trademark of Oracle and/or its affiliates.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other
countries.
Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or
endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack Logo are either registered trademarks/service marks or
trademarks/service marks of the OpenStack Foundation, in the United States and other countries and
are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or
sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Abstract
This document is a step-by-step guide for users to install and configure a basic Red Hat Openstack
environment and enable Red Hat Storage for storage.
Table of Contents
Table of Contents
. . fa. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3. . . . . . . . . .
Pr.e. . ce
1. Document Conventions 3
1.1. Typographic Conventions 3
1.2. Pull-quote Conventions 4
1.3. Notes and Warnings 4
2. Getting Help and Giving Feedback 4
2.1. Do You Need Help? 4
2.2. We Need Feedback! 5
. ha.pt.e. . . . . . oduct . . . t . . . . d Ha. . . . . . ge. a.nd Re . . . . t O. . . . . . a.ck. . . . . . . . . . . . . . . . . . . . . . .6. . . . . . . . . .
C. . . . r 1.. Int.r . . . . . . ion. .o Re . . . . t St.ora. . . . . . . . . d Ha. . . pe.nSt . .
1.1. Advantages of Integration 6
1.2. Architecture Overview 6
. ha.pt.e. . . . . .ere.quisit .
C. . . . r 2.. Pr . . . . . . . . e.s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7. . . . . . . . . .
2.1. Supported Versions 7
2.2. Software and Hardware Requirements 7
2.3. Subscribing to Red Hat Channels 7
2.4. Setting SELinux Booleans 7
. ha.pt.e. . . . . . . . . . . . . nd C.onfigur . . . . . . d Ha. . . . . . ge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8. . . . . . . . . .
C. . . . r 3. Inst.a.lling a. . . . . . . . . . . .ing Re . . . . t St.ora. . .
3.1. Installing Red Hat Storage Server 8
3.2. Setting up Red Hat Storage Trusted Storage Pool 8
3.2.1. Creating Volumes 8
3.2.2. Tuning Red Hat Storage Volumes for Red Hat OpenStack 8
3.2.3. Verifying Red Hat Storage Volume Configuration 9
3.2.4. Starting Red Hat Storage Volumes 9
3.3. Installing the Native Client Packages 9
. ha.pt.e. . . Insta. . . . . and. . . . . . . . . . ing . . . . . . . t O . . nSt.a.ck 3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C. . . . r 4... . . . . lling . . . . Configur . . . Re.d Ha . . . pe. . . . . . . . . 1.1. . . . . . . . . .
4.1. Installing OpenStack using PackStack 11
4.2. Configuring OpenStack Block Storage to Use Red Hat Storage Volume 11
4.3. Configure the OpenStack Image Service to Use Red Hat Storage Volumes 11
4.4. Verifying the Integrated Setup 12
. ha.pt.e. . . . . . . lling a. . . . . . . . . . . .ing Re.d. . . t O . . . . . a.ck 4. . 1.4. . . . . . . . . .
C. . . . r 5.. Inst.a. . . . . . nd C.onfigur . . . . . . Ha. . . . pe.nSt . . . . .0. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1. Installing OpenStack 14
5.2. Configuring Openstack Block Storage to Use Red Hat Storage Volume 14
5.3. Configure the OpenStack Image Service to Use Red Hat Storage Volumes 14
5.4. Configure the OpenStack Compute Service to Use Red Hat Storage Volumes 15
5.5. Verifying the Integrated Setup 15
. . vision Hist.ory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Re. . . . . . . . . . . . . 1.7. . . . . . . . . .
1
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
2
Preface
Preface
This guide provides step-by-step instructions for installing and configuring a basic Red Hat OpenStack
environment and enabling Red Hat Storage for storage.
Important
The steps in this guide are for a new setup of Red Hat OpenStack; caution is required if you are
integrating Red Hat Storage with an existing Red Hat OpenStack setup.
1. Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention to
specific pieces of information.
In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. The
Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative
but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation
Fonts set by default.
1.1. Typographic Conventions
Four typographic conventions are used to call attention to specific words and phrases. These
conventions, and the circumstances they apply to, are as follows.
Mono-spaced Bold
Used to highlight system input, including shell commands, file names and paths. Also used to highlight
keys and key combinations. For example:
To see the contents of the file m y_next_bestselling_novel in your current working
directory, enter the cat my_next_bestselling_novel command at the shell prompt
and press Enter to execute the command.
The above includes a file name, a shell command and a key, all presented in mono-spaced bold and all
distinguishable thanks to context.
Key combinations can be distinguished from an individual key by the plus sign that connects each part of
a key combination. For example:
Press Enter to execute the command.
Press Ctrl+Alt+F2 to switch to a virtual terminal.
The first example highlights a particular key to press. The second example highlights a key combination:
a set of three keys pressed simultaneously.
If source code is discussed, class names, methods, functions, variable names and returned values
mentioned within a paragraph will be presented as above, in m ono-spaced bold. For example:
File-related classes include filesystem for file systems, file for files, and dir for
directories. Each class has its own associated set of permissions.
Proportional Bold
This denotes words or phrases encountered on a system, including application names; dialog-box text;
labeled buttons; check-box and radio-button labels; menu titles and submenu titles. For example:
Choose System Preferences Mouse from the main menu bar to launch Mouse
Preferences. In the Buttons tab, select the Left-handed m ouse check box and click
Close to switch the primary mouse button from the left to the right (making the mouse
suitable for use in the left hand).
To insert a special character into a gedit file, choose Applications Accessories
Character Map from the main menu bar. Next, choose Search Find& from the
Character Map menu bar, type the name of the character in the Search field and click
Next. The character you sought will be highlighted in the Character Table. Double-click
this highlighted character to place it in the T ext to copy field and then click the Copy
button. Now switch back to your document and choose Edit Paste from the gedit menu
bar.
The above text includes application names; system-wide menu names and items; application-specific
menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all
distinguishable by context.
Mono-spaced Bold Italic or Proportional Bold Italic
Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable
text. Italics denotes text you do not input literally or displayed text that changes depending on
circumstance. For example:
To connect to a remote machine using ssh, type ssh username@domain.name at a shell
prompt. If the remote machine is example.com and your username on that machine is
3
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
john, type ssh john@exam ple.com.
The m ount -o remount file-system command remounts the named file system. For
example, to remount the /home file system, the command is m ount -o remount /hom e.
To see the version of a currently installed package, use the rpm -q package command. It
will return a result as follows: package-version-release.
Note the words in bold italics above: username, domain.name, file-system, package, version and release.
Each word is a placeholder, either for text you enter when issuing a command or for text displayed by
the system.
Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and
important term. For example:
Publican is a DocBook publishing system.
1.2. Pull-quote Conventions
Terminal output and source code listings are set off visually from the surrounding text.
Output sent to a terminal is set in mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn
books_tests Desktop1 downloads images notes scripts svgs
Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:
static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
struct kvm_assigned_pci_dev *assigned_dev)
{
int r = 0;
struct kvm_assigned_dev_kernel *match;
mutex_lock(&kvm->lock);
match = kvm_find_assigned_dev(&kvm->arch.assigned_dev_head,
assigned_dev->assigned_dev_id);
if (!match) {
printk(KERN_INFO "%s: device hasn't been assigned before, "
"so cannot be deassigned\n", __func__);
r = -EINVAL;
goto out;
}
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
out:
mutex_unlock(&kvm->lock);
return r;
}
1.3. Notes and Warnings
Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.
Note
Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should
have no negative consequences, but you might miss out on a trick that makes your life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only apply to the
current session, or services that need restarting before an update will apply. Ignoring a box
labeled  Important will not cause data loss but may cause irritation and frustration.
Warning
Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
2. Getting Help and Giving Feedback
2.1. Do You Need Help?
If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer
Portal at http://access.redhat.com. Through the customer portal, you can:
4
Preface
search or browse through a knowledgebase of technical support articles about Red Hat products.
submit a support case to Red Hat Global Support Services (GSS).
access other product documentation.
Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and
technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo.
Click on the name of any mailing list to subscribe to that list or to access the list archives.
2.2. We Need Feedback!
If you find a typographical error in this manual, or if you have thought of a way to make this manual
better, we would love to hear from you! Please submit a report in Bugzilla: http://bugzilla.redhat.com/
against the product Red Hat Storage.
When submitting a bug report, be sure to mention the manual's identifier:
Configuring_Red_Hat_OpenStack_with_Red_Hat_Storage
If you have a suggestion for improving the documentation, try to be as specific as possible when
describing it. If you have found an error, please include the section number and some of the surrounding
text so we can find it easily.
5
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
Chapter 1. Introduction to Red Hat Storage and Red Hat
OpenStack
Red Hat Storage is a software-based, distributed technology that is scalable and highly available as
software only. Red Hat Storage can be deployed in the cloud or data centers using Red Hat Storage
Server.
Red Hat OpenStack provides the foundation for building a private or public Infrastructure-as-a-Service
(IaaS) cloud on top of Red Hat Enterprise Linux. It offers a massively scalable, fault-tolerant platform for
the development of cloud-enabled workloads.
Integration of Red Hat Storage with Red Hat OpenStack is hardened and validated by Red Hat, and is
best suited to serve as the storage platform for Red Hat OpenStack.
1.1. Advantages of Integration
The following are some of the advantages of using an integrated solution:
An integrated solution offers users a storage and compute solution, a platform for innovation, and a
support experience during the journey to open hybrid cloud.
An integrated solution 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
Red Hat OpenStack and Red Hat Storage integration consists of:
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.
The following diagram illustrates Red Hat Enterprise OpenStack integration with Red Hat Storage 2.1:
Figure 1.1. Integration Architecture
6
Chapter 2. Prerequisites
Chapter 2. Prerequisites
Ensure that the listed prerequisites are met to install and integrate Red Hat Storage with Red Hat
OpenStack.
2.1. Supported Versions
The following versions of Red Hat OpenStack and Red Hat Storage can be successfully integrated.
Red Hat Storage 2.1 with Red Hat OpenStack 3.0
or
Red Hat Storage 2.1 Update 2 with Red Hat OpenStack 4.0
2.2. Software and Hardware Requirements
To ensure successful integration between Red Hat OpenStack and Red Hat Storage, see:
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
Ensure that clients are registered with the following Red Hat channels:
rhel-x86_64-server-6
rhel-x86_64-server-6-ost-3 - if you are using Red Hat OpenStack 3.0
or
rhel-x86_64-server-6-ost-4 - if you are using Red Hat OpenStack 4.0
Ensure that servers are registered to Red Hat Storage channels.
2.4. Setting SELinux Booleans
Set the following SELinux booleans:
# setsebool -P sanlock_use_fusefs on
# setsebool -P virt_use_sanlock on
# setsebool -P virt_use_fusefs on
7
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
Chapter 3. Installing and Configuring Red Hat Storage
Red Hat OpenStack uses Red Hat Storage (volumes) as a storage platform. To use Red Hat Storage
volumes in a Red Hat OpenStack environment, install and configure Red Hat Storage on all the servers
that will be included in the Red Hat Storage trusted storage pool.
3.1. Installing Red Hat Storage Server
Download and install Red Hat Storage 2.1 on the all the servers. Red Hat Storage installation
instructions are available in the Installing Red Hat Storage chapter of the Red Hat Storage Installation
Guide.
3.2. Setting up Red Hat Storage Trusted Storage Pool
Set up a Red Hat Storage trusted storage pool to create volumes. For trusted storage pools setup
instructions, see the Setting up Trusted Storage Pools chapter in the Red Hat Storage Administration
Guide.
3.2.1. Creating Volumes
Create Red Hat Storage volumes for both the Block Storage and Image service. This example uses a
distributed-replicated volume to demonstrate using Red Hat Storage as the storage back-end for Red
Hat OpenStack.
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
Before starting the volume, tune the volumes used for Block Storage as follows:
# gluster volume set [volname] group virt
# gluster vol set [volname] storage.owner-uid [uid]
# gluster vol set [volname] storage.owner-gid [gid]
As an example, set these volume options for 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
When a volume is tagged (using the group virt command), it is reserved as a storage back-
end for Red Hat OpenStack and cannot be used for any other storage purposes. The tagged
volume is only accessible using the gluster native client.
The tuning command sets the options on the listed volume as key value pairs in the
/var/lib/glusterd/groups/virt file.
The default (and recommended) key value pairs (volume set options) of the group name file in the
/var/lib/glusterd/groups/virt file are as follows:
8
Chapter 3. Installing and Configuring Red Hat Storage
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
For details about volume set options that can be tuned, see the Managing Red Hat Storage Volumes
chapter in the Red Hat Storage Administration Guide.
3.2.3. Verifying Red Hat Storage Volume Configuration
Use the following command to verify the volume configuration before starting the volumes:
# gluster vol info [volname]
The following are examples of this command and its output:
# 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
Start the Block Storage and Image service volumes using the following command:
# gluster volume start [volname]
An example of this command and its output is as follows:
# 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
The Native Client is a FUSE-based client that runs in the user space. Use the Native Client to access
Red Hat Storage volumes. Install the Native Client RPMs on the Red Hat OpenStack nodes as follows:
# yum install --assume yes glusterfs glusterfs-fuse
9
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
10
Chapter 4. Installing and Configuring Red Hat OpenStack 3.0
Chapter 4. Installing and Configuring Red Hat OpenStack 3.0
Red Hat OpenStack uses Red Hat Storage (volumes) as a storage platform. After installing and
configuring Red Hat Storage volumes, perform the following:
1. Install OpenStack using PackStack
2. Configure the OpenStack Cinder service to use Red Hat Storage volume
3. Configure the OpenStack Glance service to use Red Hat Storage volume
4. Verify the integrated setup
4.1. Installing OpenStack using PackStack
Install OpenStack Block Storage and Image service packages as follows:
# yum install -y openstack-utils openstack-cinder openstack-glance
Install the openstack-packstack package as follows:
# yum install -y openstack-packstack
In the following example, a quick start deployment method is used to install OpenStack on a single
node with default configuration values:
# packstack --allinone --debug
Welcome to Installer setup utility
Installing:
Clean Up... [ DONE ]
Setting up ssh keys... [ DONE ]
OS support check... [ DONE ]
Adding pre install manifest entries... [ DONE ]
...
[ DONE ]
**** Installation completed successfully ******
4.2. Configuring OpenStack Block Storage to Use Red Hat
Storage Volume
Procedure 4 .1. Configure OpenStack Block Storage to Use Red Hat Storage Volume
1. Update the cinder.conf File
Set the glusterFS default configuration parameters in the cinder.conf file 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/volumes
2. Create the shares.conf File
Create the /etc/cinder/shares.conf file. 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:ANOTHERVOLUME
An example of this configuration is as follows:
10.1.1.11:cinder-vol
10.1.2.12:nextcinder-vol
10.1.3.13:anothercinder-vol
3. Restart 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
Procedure 4 .2. Configure the OpenStack Image Service to Use Red Hat Storage Volumes
1. Specify the location for filesystem_store_datadir as follows:
11
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
# ============ Filesystem Store Options===================
# Directory that the Filesystem backend store
# writes image data to
filesystem_store_datadir = /mnt/gluster/glance/images/
2. Create a directory named images as follows:
# mkdir -p /mnt/gluster/glance/images
3. Change the ownership of the the Red Hat Storage volume as follows:
chown -R glance:glance/mnt/gluster/glance/
4. Mount the Red Hat Storage volume on filesystem_store_datadir as follows:
mount -t glusterfs 10.1.1.11:/glance-vol /mnt/gluster
5. To persistently mount the glance volume, add the following line to the /etc/fstab file:
10.1.1.11:/glance-vol images glusterfs defaults,_netdev 0 0
6. Restart the OpenStack glance service as follows:
# service openstack-glance-api restart
4.4. Verifying the Integrated Setup
Procedure 4 .3. Verify the Integrated Setup
1. 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)
2. 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="(( (vol-replicate-0> 183.example.com:/rhs/brick1/cinder-vol/> vol):dhcpzz-223.example.com:/rhs/brick1/cinder-vol/>) (replicate-1> 223.example.com:/rhs/brick2/cinder-vol/> 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)))"
3. Verify that the glance image was created on the Red Hat Storage volumes as follows:
12
Chapter 4. Installing and Configuring Red Hat OpenStack 3.0
# 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="( (vol-replicate-1> 223.example.com:/rhs/brick4/glance-vol/a66213ee-1a76-4d4a-959d-5df3f
8f320ac> 183.example.com:/rhs/brick4/glance-vol/a66213ee-1a76-4d4a-959d-
5df3f8f320ac>))"
Use the provided steps to ensure that Red Hat Storage is in use as the storage platform for Red Hat
OpenStack. For further operations such as deploying Virtual Machines and managing OpenStack, see
see the Red Hat Enterprise Linux OpenStack Platform documentation.
13
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
Chapter 5. Installing and Configuring Red Hat OpenStack 4.0
Red Hat OpenStack uses Red Hat Storage (volumes) as a storage platform. After installing and
configuring Red Hat Storage volumes, perform the following:
1. Install OpenStack using Foreman Installer or PackStack
2. Configure the OpenStack Cinder service to use Red Hat Storage volume
3. Configure the OpenStack Glance service to use Red Hat Storage volume
4. Configure the OpenStack Compute service to use Red Hat Storage volume
5. Verify the integrated setup
5.1. Installing OpenStack
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.
5.2. Configuring Openstack Block Storage to Use Red Hat Storage
Volume
Procedure 5.1. Configure Openstack Block Storage to Use Red Hat Storage Volume
1. Update the cinder.conf File
Set the glusterFS default configuration parameters in the cinder.conf file 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/volumes
2. Create the shares.conf File
Create the /etc/cinder/shares.conf file. 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:ANOTHERVOLUME
An example of this configuration is as follows:
10.1.1.11:/cinder-vol
10.1.2.12:/nextcinder-vol
10.1.3.13:/anothercinder-vol
3. Restart Services
Restart the cinder services as follows:
# service openstack-cinder-api restart
# service openstack-cinder-volume restart
# service openstack-cinder-scheduler restart
5.3. Configure the OpenStack Image Service to Use Red Hat
Storage Volumes
Procedure 5.2. Configure the OpenStack Image Service to Use Red Hat Storage Volumes
1. Specify the location for filesystem_store_datadir as follows:
# ============ Filesystem Store Options===================
# Directory that the Filesystem backend store
# writes image data to
filesystem_store_datadir = /mnt/gluster/glance/images/
2. Create a directory named images as follows:
# mkdir -p /mnt/gluster/glance/images
3. Change the ownership of the the Red Hat Storage volume as follows:
chown -R glance:glance/mnt/gluster/glance/
4. Mount the Red Hat Storage volume on filesystem_store_datadir as follows:
14
Chapter 5. Installing and Configuring Red Hat OpenStack 4.0
mount -t glusterfs 10.1.1.11:/glance-vol /mnt/gluster
5. To persistently mount the glance volume, add the following line to the /etc/fstab file:
10.1.1.11:/glance-vol images glusterfs defaults,_netdev 0 0
6. Restart the OpenStack glance service as follows:
# service openstack-glance-api restart
5.4. Configure the OpenStack Compute Service to Use Red Hat
Storage Volumes
This section provides steps to configure common Red Hat Storage volume to host both Image and
Compute services.
Procedure 5.3. Configure the OpenStack Compute Service to Use Red Hat Storage Volumes
1. Configure Compute services to use Red Hat Storage volume by editing the instances_path in
/etc/nova/nova.conf file:
#instances_path = /mnt/gluster/instance
2. Create a directory named images as follows:
# mkdir -p /mnt/gluster/instance
3. Change the ownership of the the Red Hat Storage volume as follows:
chown -R nova:nova /mnt/gluster/instance
4. Restart the OpenStack Compute service as follows:
# service openstack-nova-compute restart
5.5. Verifying the Integrated Setup
Procedure 5.4 . Verify the Integrated Setup
1. 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)
2. 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="(( (vol-replicate-0> 183.example.com:/rhs/brick1/cinder-vol/> vol):dhcpzz-223.example.com:/rhs/brick1/cinder-vol/>) (replicate-1> 223.example.com:/rhs/brick2/cinder-vol/> 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)))"
3. Verify that the glance image was created on the Red Hat Storage volumes as follows:
15
Red Hat Storage 2.1 Configuring Red Hat OpenStack with Red Hat Storage
# 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="( (vol-replicate-1> 223.example.com:/rhs/brick4/glance-vol/a66213ee-1a76-4d4a-959d-5df3f
8f320ac> 183.example.com:/rhs/brick4/glance-vol/a66213ee-1a76-4d4a-959d-
5df3f8f320ac>))"
4. 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="( (vol-replicate-5> vol/glance/images/ 9b8f4140-665b-4959-abcd-5970c979e9df>
vol/glance/images/9b8f4140-665b-4959-abcd-5970c979e9df>))"
Use the provided steps to ensure that Red Hat Storage is in use as the storage platform for Red Hat
OpenStack. For further operations such as deploying Virtual Machines and managing OpenStack, see
the Red Hat Enterprise Linux OpenStack Platform documentation.
16
Revision History
Revision History
Revision 2.1-12 Tue Feb 25 2014 Divya Muntimadugu
Updated the configuration steps for Red Hat OpenStack 4.0.
Revision 2.1-8 Wed Nov 27 2013 Divya Muntimadugu
Renamed the guide to Configuring Red Hat OpenStack with Red Hat Storage.
Revision 2.1-6 Tue Oct 24 2013 Divya Muntimadugu
Bug Fixes.
Revision 2.1-4 Wed Oct 9 2013 Divya Muntimadugu
Bug Fixes.
Revision 2.1-3 Mon Sep 16 2013 Divya Muntimadugu
Incorporated technical review comments.
Revision 2.1-1 Fri Sep 13 2013 Divya Muntimadugu
Publishing for Red Hat Storage 2.1 GA release
17


Wyszukiwarka

Podobne podstrony:
Red Hat Enterprise Linux 6 Configuring the Red Hat High Availability?d On with Pacemaker en US
Red Hat Storage 2 1 Package Manifest en US
Red Hat Storage 2 0 Quick Start Guide en US
Red Hat Enterprise Linux OpenStack Platform?rtification Test Suite 5 User Guide en US
Red Hat Enterprise Linux OpenStack Platform?rtification 1 0 Policy Guide en US
Red Hat Storage 2 1 2 1 Update 1 Release Notes en US
Red Hat Enterprise Linux OpenStack Platform?rtification Test Suite 4 User Guide en US
Red Hat Storage 2 0 2 0 Release Notes en US
Red Hat Storage 2 1 2 1 Release Notes en US
Red Hat Storage 2 1 Console Installation Guide en US
Red Hat Storage 2 0 Installation Guide en US(1)
Red Hat Enterprise Virtualization 3 3 Manager Release Notes en US
Red Hat Enterprise Linux 6 High Availability?d On Overview en US
Red Hat Enterprise Virtualization 3 4 Manager Release Notes en US
Red Hat Enterprise Linux 6 Beta High Availability?d On Overview en US
Red Hat Enterprise Linux 4 Global Network Block?vice en US
Red Hat Enterprise Linux 6 6 1 Release Notes en US
Red Hat Enterprise Linux 5 5 6 Release Notes en US
Red Hat Enterprise Linux 5 5 8 Release Notes en US

więcej podobnych podstron