青春纸盒子

文: 芦苇

你喜欢我笑的样子

我靠上了落寞的窗子

晚风吹起了我的袖子

明月沾湿了你的眸子


转身,你走出了两个人的圈子

树影婆娑,整座院子


挽起袖子

回头,把揽你忧伤一地的影子

装进,青春,这纸盒子


更多代码请关注我的微信小程序: "ecoder"

luwei0915

导航

S1_搭建分布式OpenStack集群_09 cinder 控制节点配置

一、创建数据库
创建数据库以及用户:
# mysql -uroot -p12345678
MariaDB [(none)]> CREATE DATABASE cinder;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinder123';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinder123';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

二、创建cinder-api
导入环境变量:
# source admin-openrc

创建cinder用户
# openstack user create --domain default --password-prompt cinder # 输入密码cinder

绑定角色和租户:
# openstack role add --project service --user cinder admin

cinder服务实体类型”volume”,创建v2/v3两个服务实体
# openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
# openstack service create --name cinderv3 --description "OpenStack Block Storage" volumev3

创建块存储服务API v2端点:
# openstack endpoint create --region RegionOne \
  volumev2 public http://10.10.11.11:8776/v2/%\(project_id\)s
# openstack endpoint create --region RegionOne \
  volumev2 internal http://10.10.11.11:8776/v2/%\(project_id\)s
# openstack endpoint create --region RegionOne \
  volumev2 admin http://10.10.11.11:8776/v2/%\(project_id\)s

创建块存储服务API v3端点:
# openstack endpoint create --region RegionOne \
  volumev3 public http://10.10.11.11:8776/v3/%\(project_id\)s
# openstack endpoint create --region RegionOne \
  volumev3 internal http://10.10.11.11:8776/v3/%\(project_id\)s
# openstack endpoint create --region RegionOne \
  volumev3 admin http://10.10.11.11:8776/v3/%\(project_id\)s

三、安装配置组件
3.1 安装包
# yum install -y openstack-cinder

3.2 编辑 /etc/cinder/cinder.conf文件
# vim /etc/cinder/cinder.conf
[database]
connection = mysql+pymysql://cinder:cinder123@localhost/cinder

[DEFAULT]
transport_url = rabbit://openstack:openstack123@10.10.11.11
auth_strategy = keystone
my_ip = 10.10.11.11

[keystone_authtoken]
auth_uri = http://10.10.11.11:5000
auth_url = http://10.10.11.11:35357
memcached_servers = 10.10.11.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = cinder

[oslo_concurrency]
lock_path = /var/lib/cinder/tmp

3.3 同步块存储数据
# su -s /bin//sh -c "cinder-manage db sync" cinder

3.4 配置计算服务以使用块存储
# vim /etc/nova/nova.conf
[cinder]
os_region_name = RegionOne

3.5 重启服务
重启nova-api服务:
# systemctl restart openstack-nova-api.service

启动cinder服务,并设置开机启动:
# systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service
# systemctl start  openstack-cinder-api.service openstack-cinder-scheduler.service

 当你的才华配不上你的野心的时候,就静下来学习吧。

posted on 2019-08-13 23:20  芦苇の  阅读(207)  评论(0编辑  收藏  举报