• openstack controller ha测试环境搭建记录(五)——配置rabbitmq集群


    配置rabbitmq集群的步骤非常简单,因为其本身含集群功能,参考openstack官网文档:
    http://docs.openstack.org/ha-guide/controller-ha-rabbitmq.html


    在所有节点安装rabbitmq:
    # yum install -y rabbitmq-server


    在所有节点设置rabbitmq开机启动:
    # systemctl enable rabbitmq-server.service
    # systemctl start rabbitmq-server.service


    关闭所有节点的rabbitmq服务:
    # systemctl stop rabbitmq-server.service


    在节点1,拷贝cookie至其它节点:
    # scp /var/lib/rabbitmq/.erlang.cookie root@controller2:/var/lib/rabbitmq/.erlang.cookie
    # scp /var/lib/rabbitmq/.erlang.cookie root@controller3:/var/lib/rabbitmq/.erlang.cookie


    在所有节点启动rabbitmq服务:
    # systemctl start rabbitmq-server.service


    在节点2、节点3,加入节点1的集群:
    # rabbitmqctl stop_app
    Stopping node rabbit@controller2...
    ...done.
    # rabbitmqctl join_cluster rabbit@controller1
    # rabbitmqctl start_app
    Starting node rabbit@controller2 ...
    ...done.


    在任意节点验证集群状态:
    # rabbitmqctl cluster_status
    Cluster status of node rabbit@controller1 ...
    [{nodes,[{disc,[rabbit@controller1,rabbit@controller2,rabbit@controller3]}]},
    {running_nodes,[rabbit@controller3,rabbit@controller2,rabbit@controller1]},
    {cluster_name,<<"rabbit@controller1">>},
    {partitions,[]}]
    ...done.


    在任意节点执行HA策略设置:
    # rabbitmqctl set_policy ha-all '^(?!amq.).*' '{"ha-mode": "all"}'


    在任意节点设置密码:
    # rabbitmqctl change_password guest 123456

    -----------------------------------------------------------------------------------

    以下组件或服务以高可用队列(HA queues)的方式工作:
    OpenStack Compute
    OpenStack Block Storage
    OpenStack Networking
    Telemetry

  • 相关阅读:
    flock对文件锁定读写操作的问题 简单
    hdu 2899 Strange Fuction(二分)
    hdu 2199 Can you solve this equation? (二分)
    poj 3080 Blue Jeans (KMP)
    poj 2823 Sliding Window (单调队列)
    poj 2001 Shortest Prefixes (trie)
    poj 2503 Babelfish (trie)
    poj 1936 All in All
    hdu 3507 Print Article (DP, Monotone Queue)
    fzu 1894 志愿者选拔 (单调队列)
  • 原文地址:https://www.cnblogs.com/endoresu/p/5043363.html
Copyright © 2020-2023  润新知