Atom feed of this document
  
 

 Configure a Block Storage service controller

[Note]Note

This scenario configures OpenStack Block Storage services on the Controller node and assumes that a second node provides storage through the cinder-volume service.

For instructions on how to configure the second node, see the section called “Configure a Block Storage service node”.

You can configure OpenStack to use various storage systems. This example uses LVM.

  1. Install the appropriate packages for the Block Storage service:

    # yum install openstack-cinder
  2. Configure Block Storage to use your database.

    Run the following command to set connection option in the [database] section, which is in the /etc/cinder/cinder.conf file, replace CINDER_DBPASS with the password for the Block Storage database that you will create in a later step:

    # openstack-config --set /etc/cinder/cinder.conf \
      database connection mysql://cinder:CINDER_DBPASS@controller/cinder
  3. Use the password that you set to log in as root to create a cinder database:

    # mysql -u root -p
    mysql> CREATE DATABASE cinder;
    mysql> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
      IDENTIFIED BY 'CINDER_DBPASS';
    mysql> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
      IDENTIFIED BY 'CINDER_DBPASS';
  4. Create the database tables for the Block Storage service:

    # su -s /bin/sh -c "cinder-manage db sync" cinder
  5. Create a cinder user.

    The Block Storage service uses this user to authenticate with the Identity service.

    Use the service tenant and give the user the admin role:

    $ keystone user-create --name=cinder --pass=CINDER_PASS --email=[email protected]
    $ keystone user-role-add --user=cinder --tenant=service --role=admin
  6. Edit the /etc/cinder/cinder.conf configuration file:

    # openstack-config --set /etc/cinder/cinder.conf DEFAULT \
      auth_strategy keystone
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      auth_uri http://controller:5000
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      auth_host controller
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      auth_protocol http
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      auth_port 35357
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      admin_user cinder
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      admin_tenant_name service
    # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \
      admin_password CINDER_PASS
  7. Configure Block Storage to use the Qpid message broker:

    # openstack-config --set /etc/cinder/cinder.conf \
      DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid
    # openstack-config --set /etc/cinder/cinder.conf \
      DEFAULT qpid_hostname controller
  8. Register the Block Storage service with the Identity service so that other OpenStack services can locate it:

    $ keystone service-create --name=cinder --type=volume --description="OpenStack Block Storage"
    $ keystone endpoint-create \
      --service-id=$(keystone service-list | awk '/ volume / {print $2}') \
      --publicurl=http://controller:8776/v1/%\(tenant_id\)s \
      --internalurl=http://controller:8776/v1/%\(tenant_id\)s \
      --adminurl=http://controller:8776/v1/%\(tenant_id\)s
  9. Register a service and endpoint for version 2 of the Block Storage service API:

    $ keystone service-create --name=cinderv2 --type=volumev2 --description="OpenStack Block Storage v2"
    $ keystone endpoint-create \
      --service-id=$(keystone service-list | awk '/ volumev2 / {print $2}') \
      --publicurl=http://controller:8776/v2/%\(tenant_id\)s \
      --internalurl=http://controller:8776/v2/%\(tenant_id\)s \
      --adminurl=http://controller:8776/v2/%\(tenant_id\)s
  10. Start and configure the Block Storage services to start when the system boots:

    # service openstack-cinder-api start
    # service openstack-cinder-scheduler start
    # chkconfig openstack-cinder-api on
    # chkconfig openstack-cinder-scheduler on
Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...