tripleo-image-elements/elements/rabbitmq-server
Jan Provaznik b197121fd1 Fix rabbitmq env file name and log path
Proper filename for setting env vars is rabbitmq-env.conf, otherwise
rabbitmqctl is not able to connect to the server on newly deployed
undercloud or overcloud.

Change-Id: I53b3df2fbe0f3da976b32dbeed9a6277fd1c38bc
2014-02-26 09:10:40 +01:00
..
install.d Fix editing of systemd files on openSUSE 2014-02-02 14:59:38 +01:00
os-config-applier Fix rabbitmq env file name and log path 2014-02-26 09:10:40 +01:00
os-refresh-config Fix rabbitmq env file name and log path 2014-02-26 09:10:40 +01:00
element-deps Moving iptables rules to the relevant elements 2014-01-28 06:31:54 -05:00
README.md Add cluster support for rabbitmq element 2014-02-26 09:10:40 +01:00

Install RabbitMQ server package and optionally configure it using Heat metadata.

Heat

We will create a random password and feed it to a Heat wait condition if directed by Metadata. The relevant Metadata would look something like this in Heat:

Metadata:
  rabbit:
    users:
      - username: guest
      - tags: administrator
    password_handle: {Ref: RabbitMQPasswordHandle}

Using cfn-signal, we will feed back a generated password into the handle for use by other resources.

RabbitMQ Cluster

Additional parameters in heat template are required for each clustered node:

Metadata:
  rabbit:
    cookie: some_cookie
      - make sure same cookie is set for all nodes in cluster
    nodes:
      node0,node1

'rabbit.nodes' contains short hostnames of all nodes in RabbitMq cluster.

If a node has 'rabbit.nodes' set to true, this node is added into cluster with other nodes listed in 'rabbit.nodes'.

RabbitMQ inter-node communication is restricted to port 5535 only in config file (otherwise random ports would be used) to make sure this port can be enabled in firewall.

Sample 2-node cluster definition:

node0:
  rabbit:
    cookie: some_cookie
    nodes:
      Fn::Join:
      - ','
      - - Fn::Select:
          - name
          - Fn::GetAtt:
            - node0
            - show
        - Fn::Select:
          - name
          - Fn::GetAtt:
            - node1
            - show

node1:
  rabbit:
    cookie: some_cookie
    nodes:
      Fn::Join:
      - ','
      - - Fn::Select:
          - name
          - Fn::GetAtt:
            - node0
            - show
        - Fn::Select:
          - name
          - Fn::GetAtt:
            - node1
            - show