progetti:cloud-areapd:keystone-glance_high_availability:openstack_ha:temporary_cinder_volume
Table of Contents
Installation and Configuration of OpenStack Cinder Volume
Author:
- Alvise Dorigo (INFN Padova)
Prerequisites
One node with:
- Updated SL6/CentOS6 (6.4 or 6.5)
- Make sure that yum autoupdate is disabled
root@controller-01 ~]# grep ENA /etc/sysconfig/yum-autoupdate # ENABLED ENABLED="false"
- At least 20GB HD for operating system and OpenStack software and related log files
- SELinux configured as "Disabled" (
/etc/selinux/config
) - EPEL 6-8
- A MySQL (possibly a HA cluster) endpoint the Cinder volume daemon can connect to (in this guide we're using our MySQL Percona cluster's IP
192.168.60.10
) - A HAProxy/Keepalived cluster to use for load-balancing and Virtual IP (in this tutorial we're using the IP
192.168.60.40
for mgmt net and90.147.77.40
for public net) - A GlusterFS shared filesystem mounted on
/cinder
(must install gluster-fuse RPM before:yum -y install glusterfs-fuse
). Let's assume, for the rest of the this guide, that the exporting endpoint iscld-nl-04.data.pd.infn.it:/cinder_volume
Note 1: that the specified endpoint must belong to the data network in order to make the cinder-generated traffic pass through the data network. In this case we have two addresses
- cld-nl-04.data.pd.infn.it (corresponding to IP 192.168.61.59 on data network)
- cld-nl-04.cloud.pd.infn.it (corresponding to IP 192.168.60.59 on management network)
the first one must be used as export endpoint.
Note 2: also make sure that on the gluster server side the userid e groupid have been correctly set:
# gluster volume set volume-cinder-alvise owner-uid 165 volume set: success # gluster volume set volume-cinder-alvise owner-gid 165 volume set: success
where 165 is the UID and GID of the cinder user running the cinder-volume
process.
Cinder Volume
The host's IP address where Cinder Volume will be installed into is 192.168.60.42
. In addition consider the two controller IPs where clustered RabbitMQ is running: 192.168.60.41
and 192.168.60.44
(see Controller installation here).
yum install -y openstack-cinder openstack-utils glusterfs-fuse echo "192.168.61.59:/cinder_volume" > /etc/cinder/shares chown root:cinder /etc/cinder/shares chmod 0640 /etc/cinder/shares openstack-config --set /etc/cinder/cinder.conf DEFAULT my_ip 192.168.60.42 openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_shares_config /etc/cinder/shares openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_sparsed_volumes true openstack-config --set /etc/cinder/cinder.conf DEFAULT volume_driver cinder.volume.drivers.glusterfs.GlusterfsDriver openstack-config --set /etc/cinder/cinder.conf DEFAULT auth_strategy keystone openstack-config --set /etc/cinder/cinder.conf DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_hosts 192.168.60.41:5672,192.168.60.44:5672 #openstack-config --set /etc/cinder/cinder.conf DEFAULT glance_host 192.168.60.40 #openstack-config --set /etc/cinder/cinder.conf DEFAULT glance_api_servers http://192.168.60.40:9292 openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_ha_queues True openstack-config --set /etc/cinder/cinder.conf DEFAULT sql_idle_timeout 30 #openstack-config --set /etc/cinder/cinder.conf DEFAULT osapi_volume_listen 192.168.60.40 openstack-config --set /etc/cinder/cinder.conf DEFAULT rootwrap_config /etc/cinder/rootwrap.conf openstack-config --set /etc/cinder/cinder.conf DEFAULT api_paste_config /etc/cinder/api-paste.ini openstack-config --set /etc/cinder/cinder.conf DEFAULT control_exchange cinder openstack-config --set /etc/cinder/cinder.conf DEFAULT sql_connection "mysql://cinder:<CINDER_DB_PWD>@192.168.60.10/cinder" #openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_host 192.168.60.40 #openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_tenant_name services #openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_user cinder #openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_password CINDER_PASS openstack-config --set /etc/cinder/api-paste.ini filter:authtoken paste.filter_factory keystoneclient.middleware.auth_token:filter_factory #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken auth_host 192.168.60.40 #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken auth_port 35357 #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken auth_protocol http #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken auth_uri http://192.168.60.40:5000 #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken admin_tenant_name services #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken admin_user cinder #openstack-config --set /etc/cinder/api-paste.ini filter:authtoken admin_password CINDER_PASS
Start Cinder-Volume service and the SCSI Target daemon (tgtd)
echo "include /etc/cinder/volumes/*" >> /etc/tgt/targets.conf service openstack-cinder-volume start service tgtd start chkconfig openstack-cinder-volume on chkconfig tgtd on
progetti/cloud-areapd/keystone-glance_high_availability/openstack_ha/temporary_cinder_volume.txt · Last modified: 2015/05/11 09:30 by dorigoa@infn.it