私有云落地解决方案之openstack高可用(pike版本)-cinder
作者:【吴业亮】博客:http://blog.csdn.net/wylfengyujiancheng创建用户# openstack user create --domain default --project service --password Changeme_123 cinder 赋予admin权限# openstack role add --project service --user c
·
作者:【吴业亮】
博客:https://wuyeliang.blog.csdn.net/
创建用户
# openstack user create --domain default --project service --password Changeme_123 cinder
赋予admin权限
# openstack role add --project service --user cinder admin
创建service
# openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
# openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3
定义controller的管理网IP
# export controller=172.16.8.50
创建endpoint
# openstack endpoint create --region RegionOne volumev2 public http://$controller:8776/v2/%\(tenant_id\)s
# openstack endpoint create --region RegionOne volumev2 internal http://$controller:8776/v2/%\(tenant_id\)s
# openstack endpoint create --region RegionOne volumev2 admin http://$controller:8776/v2/%\(tenant_id\)s
# openstack endpoint create --region RegionOne volumev3 public http://$controller:8776/v3/%\(tenant_id\)s
# openstack endpoint create --region RegionOne volumev3 internal http://$controller:8776/v3/%\(tenant_id\)s
# openstack endpoint create --region RegionOne volumev3 admin http://$controller:8776/v3/%\(tenant_id\)s
创建数据库和用户
# mysql -u root -pChangeme_123
MariaDB [(none)]> create database cinder;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on cinder.* to cinder@'localhost' identified by 'Changeme_123';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on cinder.* to cinder@'%' identified by 'Changeme_123';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye
安装软件包
# yum -y install openstack-cinder
修改配置文件
# mv /etc/cinder/cinder.conf /etc/cinder/cinder.conf.org
# vi /etc/cinder/cinder.conf
[DEFAULT]
my_ip = 172.16.8.60
osapi_volume_listen = 172.16.8.60
log_dir = /var/log/cinder
state_path = /var/lib/cinder
auth_strategy = keystone
# RabbitMQ connection info
transport_url = rabbit://openstack:Changeme_123@172.16.8.50
# MariaDB connection info
[database]
connection = mysql+pymysql://cinder:Changeme_123@172.16.8.50/cinder
# Keystone auth info
[keystone_authtoken]
auth_uri = http://172.16.8.50:5000
auth_url = http://172.16.8.50:35357
memcached_servers = node1:11211,node2:11211,node3:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = Changeme_123
[oslo_concurrency]
lock_path = $state_path/tmp
修改权限
# chmod 640 /etc/cinder/cinder.conf
# chgrp cinder /etc/cinder/cinder.conf
同步数据库
# su -s /bin/bash cinder -c "cinder-manage db sync"
启动服务并设置开机启动
# systemctl restart openstack-cinder-api openstack-cinder-scheduler
# systemctl enable openstack-cinder-api openstack-cinder-scheduler
查看状态
# openstack volume service list
更多推荐
已为社区贡献133条内容
所有评论(0)