a0669dcd5abf7073af1f5cd2c06a4c90cab7b725
[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   MonitoringSubscriptionRabbitmq:
42     default: 'overcloud-rabbitmq'
43     type: string
44
45 outputs:
46   role_data:
47     description: Role data for the RabbitMQ role.
48     value:
49       service_name: rabbitmq
50       monitoring_subscription: {get_param: MonitoringSubscriptionRabbitmq}
51       config_settings:
52         rabbitmq::file_limit: {get_param: RabbitFDLimit}
53         rabbitmq::default_user: {get_param: RabbitUserName}
54         rabbitmq::default_pass: {get_param: RabbitPassword}
55         rabbit_ipv6: {get_param: RabbitIPv6}
56         tripleo.rabbitmq.firewall_rules:
57           '109 rabbitmq':
58             dport:
59               - 4369
60               - 5672
61               - 35672
62         rabbitmq::delete_guest_user: false
63         rabbitmq::wipe_db_on_cookie_change: true
64         rabbitmq::port: '5672'
65         rabbitmq::package_source: undef
66         rabbitmq::repos_ensure: false
67         rabbitmq_environment:
68           RABBITMQ_NODENAME: "rabbit@%{::hostname}"
69           RABBITMQ_SERVER_ERL_ARGS: '"+K true +A30 +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>>}]"'
70         rabbitmq_kernel_variables:
71           inet_dist_listen_min: '35672'
72           inet_dist_listen_max: '35672'
73         rabbitmq_config_variables:
74           tcp_listen_options: '[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]'
75           cluster_partition_handling: 'pause_minority'
76           loopback_users: '[]'
77         rabbitmq::erlang_cookie:
78           yaql:
79             expression: $.data.passwords.where($ != '').first()
80             data:
81               passwords:
82                 - {get_param: RabbitCookie}
83                 - {get_param: [DefaultPasswords, rabbit_cookie]}
84         # NOTE: bind IP is found in Heat replacing the network name with the
85         # local node IP for the given network; replacement examples
86         # (eg. for internal_api):
87         # internal_api -> IP
88         # internal_api_uri -> [IP]
89         # internal_api_subnet - > IP/CIDR
90         rabbitmq::node_ip_address: {get_param: [ServiceNetMap, RabbitmqNetwork]}
91       step_config: |
92         include ::tripleo::profile::base::rabbitmq