tripleo-image-elements/elements/rabbitmq-server
Swapnil Kulkarni (coolsvap) 787bf7041f Replace deprecated LOG.warn with LOG.warning
LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.

Change-Id: Ieb3b6eaf6ffc88998364560b0c0ddda9de5adc67
Closes-Bug:#1508442
2016-03-11 14:57:27 +05:30
..
bin Improve rabbitmq_join_cluster on failure. 2014-12-15 11:52:33 +00:00
files/etc Change rabbitmq-server log file names to not use the '@' character. 2014-11-18 14:10:56 -05:00
install.d Rabbitmq logrotate broken 2015-01-28 22:37:10 +00:00
os-apply-config Use oac to create .erlang.cookie 2014-11-07 12:47:20 +00:00
os-refresh-config Replace deprecated LOG.warn with LOG.warning 2016-03-11 14:57:27 +05:30
README.md added clean_users flag in metadata 2014-09-10 10:03:26 -07:00
element-deps Merge "Fix RabbitMQ element clustering start and stop" 2014-11-05 16:13:47 +00:00

README.md

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:
      clean_users: True
      guest:
        username: guest
        tags: administrator
      nova:
        username: nova
        password: SuperSecret
        tags: 
          - administrator
          - monitoring
        permissions:
          conf: .*
          write: .*
          read: .*
    password_handle: {Ref: RabbitMQPasswordHandle}
    keepalive_disabled: true/false
    - Enable/Disable TCP keepalive on rabbitmq sockets (default is
    for keepalive to be enabled).

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 61000 only in config file (otherwise random ports would be used) to make sure this port can be enabled in firewall.

Due to bug http://bugzilla.redhat.com/show_bug.cgi?id=1105850, we must use a port within the ephemeral port range (32768-61000).

Port 61000 is reserved by using sysctl to set net.ipv4.ip_local_reserved_ports to 61000.

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