Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

When I converted to Juno from Icehouse, Juno required cinder for volumes. I added an additional 1TB drive to all of my compute nodes. Once I added the drive and installed Cinder I could launch instances. I use the following steps to install Cinder. I use OS Ubuntu 14.04

**************** Cinder (Block Storage) Setup *******

Cinder requires a separate drive installed for the volumes

Create the Cinder database and user on the Controller

mysql -u root -p << EOF CREATE DATABASE cinder default character set utf8; GRANT ALL PRIVILEGES ON cinder.* TO 'cinderdbadmin'@'%' IDENTIFIED BY 'cinder password'; EOF

mysql -u root -p << EOF GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinder password'; EOF

mysql -u root -p << EOF GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder password'; EOF

Get credentials

source admin-openrc

Create User

keystone user-create --name=cinder --pass=cinder password --email=admin email keystone user-role-add --user=cinder --tenant=service --role=admin

Register service for version 1

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

Register service for version 2

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

Install services on Controller

sudo apt-get install cinder-api cinder-scheduler python-cinderclient

Add user to cinder group on Controller

sudo usermod -aG cinder ubuntu

Logout and in to refresh group privledges

sudo chmod 770 /etc/cinder sudo chmod 770 /var/log/cinder

Edit the cinder.conf file

sudo pico /etc/cinder/cinder.conf

under [default]

auth_strategy = keystone

rpc_backend = cinder.openstack.common.rpc.impl_kombu

rabbit_host = controller

rabbit_port = 5672

rabbit_userid = mwsrabbit

rabbit_password = rabbit password

[database]

connection = mysql://cinderdbadmin:cinderpassword@controller/cinder

[keystone_authtoken]

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = cinder

admin_password = admin password

Restart the services

sudo service cinder-scheduler restart

sudo service cinder-api restart

Create Database tables

sudo cinder-manage db sync

sudo rm -f /var/lib/cinder/cinder.sqlite

Install services on Compute Node

sudo apt-get install lvm2

create cinder-volumes on Compute Node

sudo lshw -C disk - to find the drives on the box. Use sudo fdisk to create a partition and mkfs.ext /dev/sdb1

sudo pvcreate /dev/sdb1

sudo vgcreate cinder-volumes /dev/sdb1

Edit lvm.conf under devices

sudo pico /etc/lvm/lvm.conf

Cinder Filter

filter = [ "a/sda1/", "a/sdb1/", "r/.*/"]

Check pvdisplay

sudo pvdisplay

Install cinder-volume

sudo apt-get install cinder-volume

Edit cinder.conf under [default]

sudo pico /etc/cinder/cinder.conf

rpc_backend = cinder.openstack.common.rpc.impl_kombu

rabbit_host = controller

rabbit_port = 5672

rabbit_userid = mwsrabbit

rabbit_password = rabbit password

glance_host = controller

[database]

connection = mysql://cinderdbadmin:cinderpassword@controller/cinder

[keystone_authtoken]

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = cinder

admin_password = admin password

Restart the services

sudo service cinder-volume restart

sudo service tgt restart

When I converted to Juno from Icehouse, Juno required cinder for volumes. I added an additional 1TB drive to all of my compute nodes. Once I added the drive and installed Cinder I could launch instances. I use the following steps to install Cinder. I use OS Ubuntu 14.04

**************** Cinder (Block Storage) Setup *******

Cinder requires a separate drive installed for the volumes

Create the Cinder database and user on the Controller

mysql -u root -p << EOF CREATE DATABASE cinder default character set utf8; GRANT ALL PRIVILEGES ON cinder.* TO 'cinderdbadmin'@'%' IDENTIFIED BY 'cinder password'; EOF

mysql -u root -p << EOF GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinder password'; EOF

mysql -u root -p << EOF GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder password'; EOF

Get credentials

source admin-openrc

Create User

keystone user-create --name=cinder --pass=cinder password --email=admin email keystone user-role-add --user=cinder --tenant=service --role=admin

Register service for version 1

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

Register service for version 2

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

Install services on Controller

sudo apt-get install cinder-api cinder-scheduler python-cinderclient

Add user to cinder group on Controller

sudo usermod -aG cinder ubuntu

Logout and in to refresh group privledges

sudo chmod 770 /etc/cinder sudo chmod 770 /var/log/cinder

Edit the cinder.conf file

sudo pico /etc/cinder/cinder.conf

under [default]

auth_strategy = keystone

rpc_backend = cinder.openstack.common.rpc.impl_kombu

rabbit_host = controller

rabbit_port = 5672

rabbit_userid = mwsrabbitrabbit user

rabbit_password = rabbit password

[database]

connection = mysql://cinderdbadmin:cinderpassword@controller/cinder

[keystone_authtoken]

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = cinder

admin_password = admin password

Restart the services

sudo service cinder-scheduler restart

sudo service cinder-api restart

Create Database tables

sudo cinder-manage db sync

sudo rm -f /var/lib/cinder/cinder.sqlite

Install services on Compute Node

sudo apt-get install lvm2

create cinder-volumes on Compute Node

sudo lshw -C disk - to find the drives on the box. Use sudo fdisk to create a partition and mkfs.ext /dev/sdb1

sudo pvcreate /dev/sdb1

sudo vgcreate cinder-volumes /dev/sdb1

Edit lvm.conf under devices

sudo pico /etc/lvm/lvm.conf

Cinder Filter

filter = [ "a/sda1/", "a/sdb1/", "r/.*/"]

Check pvdisplay

sudo pvdisplay

Install cinder-volume

sudo apt-get install cinder-volume

Edit cinder.conf under [default]

sudo pico /etc/cinder/cinder.conf

rpc_backend = cinder.openstack.common.rpc.impl_kombu

rabbit_host = controller

rabbit_port = 5672

rabbit_userid = mwsrabbitrabbit user

rabbit_password = rabbit password

glance_host = controller

[database]

connection = mysql://cinderdbadmin:cinderpassword@controller/cinder

[keystone_authtoken]

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = cinder

admin_password = admin password

Restart the services

sudo service cinder-volume restart

sudo service tgt restart