Welcome to Elvin's blog

cinder块存储控制节点

#cinder块存储控制节点

 openstack pike 安装 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html

 

#cinder块存储控制节点
#在控制节点安装配置cender api服务

#存储节点安装配置cinder-volume服务
#控制节点安装配置cinder-api、cinder-scheduler服务

######################################################
#以下在controller节点安装配置

#hosts
echo '192.168.58.24   cinder1'>>/etc/hosts

#创建Nova数据库、用户
#mysql -u root -p
create database cinder;
grant all privileges on cinder.* to 'cinder'@'localhost' identified by 'cinder';
grant all privileges on cinder.* to 'cinder'@'%' identified by 'cinder';
flush privileges;exit;

# keystone创建cinder用户、服务、API
source ./admin-openstack.sh
openstack user create --domain default --password=cinder cinder
openstack role add --project service --user cinder admin
openstack service create --name cinderv2   --description "OpenStack Block Storage" volumev2
openstack service create --name cinderv3   --description "OpenStack Block Storage" volumev3
openstack endpoint create --region RegionOne   volumev2 public http://controller:8776/v2/%\(project_id\)s
openstack endpoint create --region RegionOne   volumev2 internal http://controller:8776/v2/%\(project_id\)s
openstack endpoint create --region RegionOne   volumev2 admin http://controller:8776/v2/%\(project_id\)s
openstack endpoint create --region RegionOne   volumev3 public http://controller:8776/v3/%\(project_id\)s
openstack endpoint create --region RegionOne   volumev3 internal http://controller:8776/v3/%\(project_id\)s
openstack endpoint create --region RegionOne   volumev3 admin http://controller:8776/v3/%\(project_id\)s

######################################################
#安装Cinder yum install openstack-cinder -y yum install nfs-utils -y #NFS cp /etc/cinder/cinder.conf{,.bak} #配置 echo ' [DEFAULT] auth_strategy = keystone log_dir = /var/log/cinder state_path = /var/lib/cinder glance_api_servers = http://controller:9292 transport_url = rabbit://openstack:openstack@controller [database] connection = mysql+pymysql://cinder:cinder@controller/cinder [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller: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 '>/etc/cinder/cinder.conf #nova echo ' [cinder] os_region_name = RegionOne '>>/etc/nova/nova.conf #初始化数据 su -s /bin/sh -c "cinder-manage db sync" cinder mysql -h controller -u cinder -pcinder -e "use cinder;show tables;" #检测 #启动服务 systemctl restart openstack-nova-api.service systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service netstat -antp|grep 8776 #cheack ##查看到存储节点@lvm、@nfs 且up状态说明配置成功 cinder service-list # +------------------+-------------+------+---------+-------+ # | Binary | Host | Zone | Status | State | # +------------------+-------------+------+---------+-------+ # | cinder-volume | cinder1@lvm | nova | enabled | up | # | cinder-volume | cinder1@nfs | nova | enabled | up | # +------------------+-------------+------+---------+-------+

 

posted @ 2017-10-26 13:08  blog-elvin-vip  阅读(2037)  评论(0编辑  收藏  举报