Merge "Make the openvswitch 2.4->2.5 upgrade more robust"
[apex-tripleo-heat-templates.git] / puppet / services / rabbitmq.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   RabbitMQ service configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   RabbitUserName:
22     default: guest
23     description: The username for RabbitMQ
24     type: string
25   RabbitPassword:
26     description: The password for RabbitMQ
27     type: string
28     hidden: true
29   RabbitFDLimit:
30     default: 65536
31     description: Configures RabbitMQ FD limit
32     type: string
33   RabbitIPv6:
34     default: false
35     description: Enable IPv6 in RabbitMQ
36     type: boolean
37   RabbitCookie:
38     type: string
39     default: ''
40     hidden: true
41   RabbitHAQueues:
42     description:
43       The number of HA queues to be configured in rabbit. The default is 0 which will
44       be automatically overridden to CEIL(N/2) where N is the number of nodes running
45       rabbitmq.
46     default: 0
47     type: number
48   MonitoringSubscriptionRabbitmq:
49     default: 'overcloud-rabbitmq'
50     type: string
51
52 outputs:
53   role_data:
54     description: Role data for the RabbitMQ role.
55     value:
56       service_name: rabbitmq
57       monitoring_subscription: {get_param: MonitoringSubscriptionRabbitmq}
58       config_settings:
59         rabbitmq::file_limit: {get_param: RabbitFDLimit}
60         rabbitmq::default_user: {get_param: RabbitUserName}
61         rabbitmq::default_pass: {get_param: RabbitPassword}
62         rabbit_ipv6: {get_param: RabbitIPv6}
63         tripleo.rabbitmq.firewall_rules:
64           '109 rabbitmq':
65             dport:
66               - 4369
67               - 5672
68               - 25672
69         rabbitmq::delete_guest_user: false
70         rabbitmq::wipe_db_on_cookie_change: true
71         rabbitmq::port: '5672'
72         rabbitmq::package_source: undef
73         rabbitmq::repos_ensure: false
74         rabbitmq::tcp_keepalive: true
75         rabbitmq_environment:
76           NODE_PORT: ''
77           NODE_IP_ADDRESS: ''
78           RABBITMQ_NODENAME: "rabbit@%{::hostname}"
79           RABBITMQ_SERVER_ERL_ARGS: '"+K true +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]"'
80         rabbitmq_kernel_variables:
81           inet_dist_listen_min: '25672'
82           inet_dist_listen_max: '25672'
83         rabbitmq_config_variables:
84           cluster_partition_handling: 'pause_minority'
85           queue_master_locator: '<<"min-masters">>'
86           loopback_users: '[]'
87         rabbitmq::erlang_cookie:
88           yaql:
89             expression: $.data.passwords.where($ != '').first()
90             data:
91               passwords:
92                 - {get_param: RabbitCookie}
93                 - {get_param: [DefaultPasswords, rabbit_cookie]}
94         # NOTE: bind IP is found in Heat replacing the network name with the
95         # local node IP for the given network; replacement examples
96         # (eg. for internal_api):
97         # internal_api -> IP
98         # internal_api_uri -> [IP]
99         # internal_api_subnet - > IP/CIDR
100         rabbitmq::interface: {get_param: [ServiceNetMap, RabbitmqNetwork]}
101         rabbitmq::nr_ha_queues: {get_param: RabbitHAQueues}
102       step_config: |
103         include ::tripleo::profile::base::rabbitmq
104       upgrade_tasks:
105         - name: Stop rabbitmq service
106           tags: step2
107           service: name=rabbitmq-server state=stopped
108         - name: Start rabbitmq service
109           tags: step6
110           service: name=rabbitmq-server state=started
111