OpenStack HA集群2

  • 时间:
  • 浏览:3
  • 来源:5分排列3APP下载_5分排列3APP官方

 {partitions,[]},

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

[root@controller2 ~]# rabbitmqctl start_app

Cluster status of node rabbit@controller1 ...

以上六个节点一并进行

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

将controller3加入到controller1集群中

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

The following plugins have been enabled:

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

Creating user "mqadmin" ...

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

[root@controller2 ~]# rabbitmqctl cluster_status

  rabbitmq_management_agent

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

          {rabbit@controller2,[]}]}]

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

            --offline - do not try to contact broker.

将controller2加入到controller1集群中

Creating user "openstack" ...

  mochiweb

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

   Changes will take effect at broker restart.

Stopping node rabbit@controller3 ...

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

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

  rabbitmq_management

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

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

          {rabbit@controller1,[]}]}]

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

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

 {partitions,[]},

  webmachine

  amqp_client

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

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

          {rabbit@controller1,[]},

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

[root@controller1 ~]# rabbitmqctl status

[root@controller1 ~]# rabbitmqctl add_user openstack zoomtech

  rabbitmq_web_dispatch

克隆.erlang.coolie到controller2和controller3

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

[root@controller2 ~]# rabbitmqctl stop_app

[root@controller3 ~]# rabbitmqctl stop_app

Starting node rabbit@controller2 ...

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

在Controller1上查看集群具体情况

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

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

[root@controller1 ~]# rabbitmqctl cluster_status

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

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

 * Could not contact node rabbit@controller1.

Stopping node rabbit@controller2 ...

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

Cluster status of node rabbit@controller2 ...

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

rabbitmq-server.service                       enabled

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

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

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

2

1、安装RabbitMQ-server

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

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

[root@controller1 ~]#

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

新增一六个用户,在六个节点中操作

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

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

[root@controller1 ~]# rabbitmqctl add_user mqadmin mqadmin

Username: guest      Password:guest

          {rabbit@controller2,[]},

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