In Controller Node
# mysql -u root -p
> CREATE DATABASE cinder;
> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'openstack';
> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'openstack';
> exit
# source admin-openrc.sh
# keystone user-create --name cinder --pass openstack
# keystone user-role-add --user cinder --tenant service --role admin
# keystone service-create --name cinder --type volume --description "OpenStack Block Storage"
# keystone service-create --name cinderv2 --type volumev2 --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 --region regionOne
# 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 --region regionOne
# apt-get install cinder-api cinder-scheduler python-cinderclient
# nano /etc/cinder/cinder.conf
[database]
...
connection = mysql://cinder:openstack@controller/cinder
[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = openstack
...
auth_strategy = keystone
...
my_ip = 10.10.10.10
...
verbose = True
[keystone_authtoken]
...
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = cinder
admin_password = openstack
* Comment out any auth_host, auth_port, and auth_protocol
# cinder-manage db sync
# rm -f /var/lib/cinder/cinder.sqlite
# service cinder-scheduler restart
# service cinder-api restart
Clone Backup Node (Full Clone) - block
Assign network adapter
Settings > Network
Adapter 1:
Attached to: Host-only Adapter
Name: Interface 1
Adapter Type: Paravirtualized Network
Promiscuous Mode: Allow All
Adapter 2:
Attached to: NAT
Adapter Type: Paravirtualized Network
Assign additional storage
Settings > Storage > Add Hard disk
Name storage
Assign storage size
In Block Node
Configuring Hostname
# nano /etc/hostname
block
Configuring Network Interfaces
# nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.10.10.13
netmask 255.255.255.0
auto eth1
iface eth1 inet dhcp
# reboot
# apt-get install lvm2
# pvcreate /dev/sdb
# vgcreate cinder-volumes /dev/sdb
# nano /etc/lvm/lvm.conf
devices {
...
filter = [ "a/sdb/", "r/.*/"]
# apt-get install cinder-volume python-mysqldb
# nano /etc/cinder/cinder.conf
[database]
...
connection = mysql://cinder:openstack@controller/cinder
[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = openstack
...
auth_strategy = keystone
...
my_ip = 10.10.10.13
...
glance_host = controller
...
verbose = True
[keystone_authtoken]
...
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = cinder
admin_password = openstack
* Comment out any auth_host, auth_port, and auth_protocol
# rm -f /var/lib/cinder/cinder.sqlite
# service tgt restart
# service cinder-volume restart
In Controller Node
# source admin-openrc.sh
# cinder service-list
# source demo-openrc.sh
# cinder create --display-name demo-volume1 1
# cinder list
0 comments:
Post a Comment