OpenStack HA集群2

  • 时间:
  • 浏览:0
  • 来源:大发5分快乐8_大发5分快乐8官方

[{nodes,[{disc,[rabbit@controller1]},

          {rabbit@controller1,[]},

[root@controller1 ~]# rabbitmqctl add_user mqadmin mqadmin

Creating user "openstack" ...

  rabbitmq_management_agent

          {rabbit@controller1,[]}]}]

  rabbitmq_management

[root@controller1 ~]# systemctl status rabbitmq-server.service

[root@controller3 ~]# rabbitmqctl stop_app

[root@controller2 ~]# rabbitmqctl start_app

一键复制.erlang.coolie到controller2和controller3

 * Options: --online  - fail if broker cannot be contacted.

登录:http://192.168.17.132:15672/#/

[{nodes,[{disc,[rabbit@controller1]},

[root@controller1 ~]# scp /var/lib/rabbitmq/.erlang.cookie controller2:/var/lib/rabbitmq/.erlang.cookie

[root@controller1 ~]# systemctl list-unit-files | grep rabbitmq

[root@controller3 ~]# rabbitmqctl join_cluster --ram rabbit@controller1

The following plugins have been enabled:

在Controller1上查看集群情形

 {partitions,[]},

Cluster status of node rabbit@controller1 ...

[root@controller1 ~]# rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"

[root@controller1 ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management mochiweb webmachine rabbitmq_web_dispatch amqp_client rabbitmq_management_agent

   Changes will take effect at broker restart.

 {cluster_name,<<"rabbit@controller1">>},

 {alarms,[{rabbit@controller3,[]},

Creating user "mqadmin" ...

          {rabbit@controller2,[]},

  amqp_client

[root@controller1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

以上二个 多多多多节点同时进行

[root@controller3 ~]# systemctl restart rabbitmq-server.service

Applying plugin configuration to rabbit@controller1... failed.

Username: guest      Password:guest

Clustering node rabbit@controller3 with rabbit@controller1 ...

[root@controller1 ~]# yum install -y erlang rabbitmq-server

[root@controller2 ~]# rabbitmqctl join_cluster --ram rabbit@controller1

 {partitions,[]},

          {rabbit@controller2,[]}]}]

[root@controller1 ~]# scp /var/lib/rabbitmq/.erlang.cookie controller3:/var/lib/rabbitmq/.erlang.cookie

         {ram,[rabbit@controller3,rabbit@controller2]}]},

 {running_nodes,[rabbit@controller3,rabbit@controller1,rabbit@controller2]},

新增二个 多多多多用户,在二个 多多多多节点中操作

Clustering node rabbit@controller2 with rabbit@controller1 ...

本文转自 OpenStack2015 51CTO博客,原文链接:http://blog.51cto.com/andyliu/1901022,如需转载请自行联系原作者

         {ram,[rabbit@controller3,rabbit@controller2]}]},

Stopping node rabbit@controller3 ...

1、安装RabbitMQ-server

[root@controller1 ~]# systemctl enable rabbitmq-server.service

将controller3加入到controller1集群中

[root@controller1 ~]# systemctl status rabbitmq-server.service

[root@controller1 ~]#

Cluster status of node rabbit@controller2 ...

  webmachine

[root@controller1 ~]# rabbitmqctl add_user openstack zoomtech

[root@controller1 ~]# systemctl restart rabbitmq-server.service

Setting permissions for user "mqadmin" in vhost "/" ...

            --offline - do not try to contact broker.

[root@controller1 ~]# systemctl start rabbitmq-server.service

[root@controller1 ~]# rabbitmqctl status

Stopping node rabbit@controller2 ...

 * Could not contact node rabbit@controller1.

[root@controller2 ~]# rabbitmqctl stop_app

将controller2加入到controller1集群中

 {alarms,[{rabbit@controller3,[]},

rabbitmq-server.service                       enabled

[root@controller2 ~]# systemctl restart rabbitmq-server.service

[root@controller2 ~]# rabbitmqctl cluster_status

2

[root@controller1 ~]# rabbitmqctl cluster_status

  mochiweb

Setting permissions for user "openstack" in vhost "/" ...

 {cluster_name,<<"rabbit@controller1">>},

Starting node rabbit@controller2 ...

  rabbitmq_web_dispatch

 {running_nodes,[rabbit@controller3,rabbit@controller2,rabbit@controller1]},