私有云落地解决方案之openstack高可用(pike版本)-集群参数

时间:2021-07-22 17:15:23

作者:【吴业亮】

博客:http://blog.csdn.net/wylfengyujiancheng

一、添加服务

将消息队列加入集群监控中

crm configure primitive rabbitmq-server systemd:rabbitmq-server \
params environment_file="/etc/profile.d/rabbitmq-server.sh" \
op start interval=0s timeout=600 \
op stop interval=0s timeout=120 \
op monitor interval=10 timeout=20 \
meta priority=100

将消息队列克隆加入集群监控中

crm configure clone rabbitmq-server-clone rabbitmq-server meta target-role=Started

注意:
在三个控制节点上创建/etc/profile.d/rabbitmq-server.sh并写入

export RABBITMQ_USE_LONGNAME=true

将haproxy加入集群监控中

crm configure primitive haproxy systemd:haproxy \
op start interval=0s \
op start interval=0s timeout=20s \
op stop interval=0s timeout=20s \
op monitor interval=20s timeout=30s \
meta priority=100 target-role=Started
colocation haproxy-with-vip inf: vip:Started haproxy:Started

将httpd加入集群监控中

crm configure primitive httpd systemd:httpd \
op start interval=0s timeout=40s \
op stop interval=0s timeout=60s \
op monitor interval=30s timeout=30s

将memcached加入集群监控中

crm configure primitive memcached systemd:memcached \
params \
op monitor interval=30s timeout=30s
crm configure clone openstack-dashboard-clone httpd meta
crm configure clone openstack-memcached-clone memcached

将openstack-glance-registry加入集群监控中

crm configure primitive openstack-glance-registry systemd:openstack-glance-registry \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-glance-registry克隆加入集群监控中

crm configure clone openstack-glance-registry-clone openstack-glance-registry  metatarget-role=Started

将openstack-glance-api加入集群监控中

crm configure primitive openstack-glance-api systemd:openstack-glance-api \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-glance-api克隆加入集群监控中

crm configure clone openstack-glance-api-clone openstack-glance-api  meta target-role=Started

将openstack-nova-cert加入集群监控中

crm configure primitive openstack-nova-cert systemd:openstack-nova-cert \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-nova-cert克隆加入集群监控中

crm configure clone openstack-nova-cert-clone openstack-nova-cert  meta target-role=Started

将openstack-nova-api加入集群监控中

crm configure primitive openstack-nova-api systemd:openstack-nova-api \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-nova-api克隆加入集群监控中

crm configure clone openstack-nova-api-clone openstack-nova-api  meta target-role=Started

将openstack-nova-conductor加入集群监控中

crm configure primitive openstack-nova-conductor systemd:openstack-nova-conductor   \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-nova-conductor克隆加入集群监控中

crm configure clone openstack-nova-conductor-clone openstack-nova-conductor metatarget-role=Started

将openstack-nova-scheduler加入集群监控中

crm configure primitive openstack-nova-scheduler systemd:openstack-nova-scheduler \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-nova-scheduler克隆加入集群监控中

crm configure clone openstack-nova-scheduler-clone openstack-nova-scheduler  metatarget-role=Started

将openstack-nova-novncproxy加入集群监控中

crm configure primitive openstack-nova-novncproxy systemd:openstack-nova-、
novncproxy \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-nova-novncproxy克隆加入集群监控中

crm configure clone openstack-nova-novncproxy-clone openstack-nova-novncproxy    metatarget-role=Started

将openstack-nova-consoleauth加入集群监控中

crm configure primitive openstack-nova-consoleauth systemd:openstack-nova-consoleauth \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s \
meta target-role=Started

将openstack-nova-consoleauth克隆加入集群监控中

crm configure clone openstack-nova-consoleauth-clone openstack-nova-consoleauth   metatarget-role=Started

将openstack-cinder-api加入集群监控中

crm configure primitive openstack-cinder-api systemd:openstack-cinder-api \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-cinder-api克隆加入集群监控中

crm configure clone openstack-cinder-api-clone openstack-cinder-api meta target-role=Started

将openstack-cinder-scheduler加入集群监控中

crm configure primitive openstack-cinder-scheduler systemd:openstack-cinder-scheduler \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将openstack-cinder-scheduler克隆加入集群监控中

crm configure clone openstack-cinder-scheduler-clone openstack-cinder-scheduler   metatarget-role=Started

将neutron-server 加入集群监控中

crm configure primitive neutron-server systemd:neutron-server \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将neutron-server克隆资源加入集群监控中

crm configure clone neutron-server-clone neutron-server  meta target-role=Started

将neutron-openvswitch-agent 加入集群监控中

crm configure primitive neutron-openvswitch-agent systemd:neutron-openvswitch-agent \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将neutron-openvswitch-agent克隆 加入集群监控中

crm configure clone neutron-openvswitch-agent-clone neutron-openvswitch-agent metatarget-role=Started

将neutron-dhcp-agent 加入集群监控中

crm configure primitive neutron-dhcp-agent systemd:neutron-dhcp-agent \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将neutron-dhcp-agent克隆加入集群监控中

crm configure clone neutron-dhcp-agent-clone neutron-dhcp-agent  meta target-role=Started

将neutron-metadata-agent 加入集群监控中

crm configure primitive neutron-metadata-agent systemd:neutron-metadata-agent  \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将neutron-metadata-agent克隆加入集群监控中

crm configure clone neutron-metadata-agent-clone neutron-metadata-agent metatarget-role=Started

将systemd:neutron-l3-agent加入集群监控中

crm configure primitive neutron-l3-agent systemd:neutron-l3-agent \
op start interval=0s timeout=45s \
op stop interval=0s timeout=45s \
op monitor interval=30s timeout=30s

将systemd:neutron-l3-agent克隆加入集群监控中

crm configure clone neutron-l3-agent-clone neutron-l3-agent meta target-role=Started

二、定义服务启动顺序

定义neutron-metadata-agent-clone和neutron-dhcp-agent-clone:start启动

pcs constraint order order_neutron-metadata-agent_neutron-dhcp-agent \
neutron-metadata-agent-clone:start neutron-dhcp-agent-clone:start \
symmetrical=true

定义openstack-memcached-clone和openstack-dashboard-clone启动

pcs constraint order order_memcached_httpd openstack-memcached-clone:start\
openstack-dashboard-clone:start \
symmetrical=true

定义vip、haproxy和openstack-neutron-server-clone启动

pcs constraint order order_vip_haproxy vip:start haproxy:start \
pcs constraint order order_vip_neutron-server vip:start \
openstack-neutron-server-clone:start

定义neutron-openvswitch-agent-clone和neutron-metadata-agent-clone启动

pcs constraint order order_neutron-openvswitch-agent_neutron-metadata-agent \
neutron-openvswitch-agent-clone:start neutron-metadata-agent-clone:start \
symmetrical=true

定义openstack-memcached-clone和openstack-nova-consoleauth-clone启动

pcs constraint order order_memcached_nova-consoleauth \
openstack-memcached-clone:start openstack-nova-consoleauth-clone:start\
symmetrical=true

定义neutron-metadata-agent-clone和neutron-l3-agent-clone启动

pcs constraint order order_neutron-metadata-agent_neutron-l3-agent \
neutron-metadata-agent-clone:start neutron-l3-agent-clone:start \
symmetrical=true