#cinder控制节点集群

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

#cinder块存储控制节点.txt.sh
#在控制节点安装配置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]
osapi_volume_listen = controller1
osapi_volume_listen_port =
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 = controller1:,controller2:,controller3:
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;" #检测 #haproxy高可用配置
echo '
#Cinder_API_cluster
listen Cinder_API_cluster
bind controller:
#balance source
option tcpka
option httpchk
option tcplog
server controller1 controller1: check inter rise fall
server controller2 controller2: check inter rise fall
server controller3 controller3: check inter rise fall
'>>/etc/haproxy/haproxy.cfg
systemctl restart haproxy.service
netstat -antp|grep haproxy #启动服务
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 #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 |
# +------------------+-------------+------+---------+-------+ #openstack volume service list #cheack cinder server
#systemctl restart openstack-cinder-api openstack-cinder-scheduler
# cinder-manage service remove <binary> <host>
# cinder-manage service remove cinder-scheduler cinder1 #创建云硬盘类型,关联volum
#LVM
#(backend_name与配置文件名对应)
cinder type-create lvm
cinder type-key lvm set volume_backend_name=lvm01
#NFS
cinder type-create nfs
cinder type-key nfs set volume_backend_name=nfs01
#cheack
cinder extra-specs-list
#cinder type-list
#cinder type-delete nfs #创建云盘(容量单位G)
openstack volume create --size --type lvm disk01 #lvm类型
openstack volume create --size --type nfs disk02 #nfs类型
openstack volume list ######################################################
#集群节点controller2安装配置Cinder #安装
yum install openstack-cinder -y
yum install nfs-utils -y #NFS
cp /etc/cinder/cinder.conf{,.bak} #nova
echo '
[cinder]
os_region_name = RegionOne
'>>/etc/nova/nova.conf

#同步controller1配置并修改
Node=controller2
rsync -avzP -e 'ssh -p 22' controller1:/etc/cinder/cinder.conf /etc/cinder/
rsync -avzP -e 'ssh -p 22' controller1:/etc/haproxy/* /etc/haproxy/
sed -i '1,8s/controller1/'$Node'/' /etc/cinder/cinder.conf


#启动服务
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 8775 #cheack


#节点controller3同上
######################################################

cinder控制节点集群的更多相关文章

  1. 高可用OpenStack(Queen版)集群-9.Cinder控制节点集群

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  2. 高可用OpenStack(Queen版)集群-6.Nova控制节点集群

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  3. Nova控制节点集群

    #Nova控制节点集群 openstack pike 部署 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html ##Nova控制节点集群 # control ...

  4. Neutron控制节点集群

    #Neutron控制节点集群 openstack pike 部署 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html #.Neutron控制节点集群 #本实 ...

  5. 高可用OpenStack(Queen版)集群-7.Neutron控制/网络节点集群

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  6. kubernetes系列:(一)、kubeadm搭建kubernetes(v1.13.1)单节点集群

    kubeadm是Kubernetes官方提供的用于快速部署Kubernetes集群的工具,本篇文章使用kubeadm搭建一个单master节点的k8s集群. 节点部署信息 节点主机名 节点IP 节点角 ...

  7. 7.2 k8s 基于PV、PVC搭建zookeeper 3节点集群

    1.PV,PVC介绍 1.1.StorageClass & PV & PVC关系图 Volumes 是最基础的存储抽象,其支持多种类型,包括本地存储.NFS.FC以及众多的云存储,我们 ...

  8. CentOS7搭建hadoop2.6.4双节点集群

    环境: CentOS7+SunJDK1.8@VMware12. NameNode虚拟机节点主机名:master,IP规划:192.168.23.101,职责:Name node,Secondary n ...

  9. Hadoop学习笔记(两)设置单节点集群

    本文描写叙述怎样设置一个单一节点的 Hadoop 安装.以便您能够高速运行简单的操作,使用 Hadoop MapReduce 和 Hadoop 分布式文件系统 (HDFS). 參考官方文档:Hadoo ...

随机推荐

  1. angular内置provider之$compileProvider

    一.方法概览 directive(name, directiveFactory) component(name, options) aHrefSanitizationWhitelist([regexp ...

  2. 数据模型(LP32 ILP32 LP64 LLP64 ILP64 )

    数据模型(LP32 ILP32 LP64 LLP64 ILP64 ) 32位环境涉及"ILP32"数据模型,是因为C数据类型为32位的int.long.指针.而64位环境使用不同的 ...

  3. IdentityServer4实现Token认证登录以及权限控制

    相关知识点 不再对IdentityServer4做相关介绍,博客园上已经有人出了相关的系列文章,不了解的可以看一下: 蟋蟀大神的:小菜学习编程-IdentityServer4 晓晨Master:Ide ...

  4. 【20171106早】BeEF 工具初探

    老黑今天接触BeEF工具,首先要了解这个工具能够做什么? 0x01:功能介绍 专业文档:点击这里 通俗的说就是可以控制别的浏览器,获取浏览器的信息.然后做something 专业的说就是好用的渗透测试 ...

  5. linux-echo

    echo 更新时间: 2017-10-11-11:55:24 echo:打印输出内容 参数选择 -e 激活转义字符 命令:echo 123    ,此命令 就会输出123 命令: echo -e &q ...

  6. NHibernate 慎用Session.Merge

    Session.Merge其意思有两个步骤, 一般用法: Session.Merge(obj); 1. 从当前的Session中获取obj对象, 如果未获取到则从数据库获取. 2. 把程序中的obj的 ...

  7. [转]移动前端开发之viewport的深入理解

    今天去面试,被问到一个用了一万次的东西,然而我并不了解具体是个毛毛,看这一篇豁然开朗. DevicePixelRatio 以及这句话:移动设备上的viewport分为layout viewport  ...

  8. 使用 gulp-file-include 构建前端静态页面

    前言 虽然现在单页面很流行,但是在 PC 端多页面还是常态,所以构建静态页面的工具还有用武之地.最近也看到了一些询问如何 include HTML 文件的问题. 很多时候我们在写静态页面的时候也希望能 ...

  9. ASP.NET Core 与 Vue.js 服务端渲染

    http://mgyongyosi.com/2016/Vuejs-server-side-rendering-with-aspnet-core/ 原作者:Mihály Gyöngyösi 译者:oop ...

  10. JS获取DOM元素

    1.childNodes:获取节点,不同浏览器表现不同: IE:只获取元素节点: 非IE:获取元素节点与文本节点: 解决方案:if(childNode.nodeName=="#text&qu ...