1 heat_template_version: ocata
4 RabbitMQ service configured with Puppet
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.
18 description: Mapping of service endpoint -> protocol. Typically set
19 via parameter_defaults in the resource registry.
23 description: The username for RabbitMQ
26 description: The password for RabbitMQ
31 description: Configures RabbitMQ FD limit
35 description: Enable IPv6 in RabbitMQ
43 The number of HA queues to be configured in rabbit. The default is -1 which
44 translates to "ha-mode all". The special value 0 will be automatically
45 overridden to CEIL(N/2) where N is the number of nodes running rabbitmq.
48 MonitoringSubscriptionRabbitmq:
49 default: 'overcloud-rabbitmq'
56 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
60 description: Role data for the RabbitMQ role.
62 service_name: rabbitmq
63 monitoring_subscription: {get_param: MonitoringSubscriptionRabbitmq}
67 rabbitmq::file_limit: {get_param: RabbitFDLimit}
68 rabbitmq::default_user: {get_param: RabbitUserName}
69 rabbitmq::default_pass: {get_param: RabbitPassword}
70 rabbit_ipv6: {get_param: RabbitIPv6}
71 tripleo.rabbitmq.firewall_rules:
77 rabbitmq::delete_guest_user: false
78 rabbitmq::wipe_db_on_cookie_change: true
79 rabbitmq::port: '5672'
80 rabbitmq::package_provider: yum
81 rabbitmq::package_source: undef
82 rabbitmq::repos_ensure: false
83 rabbitmq::tcp_keepalive: true
87 RABBITMQ_NODENAME: "rabbit@%{::hostname}"
88 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>>}]"'
89 'export ERL_EPMD_ADDRESS': "%{hiera('rabbitmq::interface')}"
90 rabbitmq_kernel_variables:
91 inet_dist_listen_min: '25672'
92 inet_dist_listen_max: '25672'
93 rabbitmq_config_variables:
94 cluster_partition_handling: 'pause_minority'
95 queue_master_locator: '<<"min-masters">>'
97 rabbitmq::erlang_cookie:
99 expression: $.data.passwords.where($ != '').first()
102 - {get_param: RabbitCookie}
103 - {get_param: [DefaultPasswords, rabbit_cookie]}
104 # NOTE: bind IP is found in Heat replacing the network name with the
105 # local node IP for the given network; replacement examples
106 # (eg. for internal_api):
108 # internal_api_uri -> [IP]
109 # internal_api_subnet - > IP/CIDR
110 rabbitmq::interface: {get_param: [ServiceNetMap, RabbitmqNetwork]}
111 rabbitmq::nr_ha_queues: {get_param: RabbitHAQueues}
112 rabbitmq::ssl: {get_param: EnableInternalTLS}
113 rabbitmq::ssl_port: '5672'
114 rabbitmq::ssl_depth: 1
115 rabbitmq::ssl_only: {get_param: EnableInternalTLS}
116 rabbitmq::ssl_interface: {get_param: [ServiceNetMap, RabbitmqNetwork]}
117 # TODO(jaosorior): Remove this once we set a proper default in
119 tripleo::profile::base::rabbitmq::enable_internal_tls: {get_param: EnableInternalTLS}
122 - internal_tls_enabled
123 - generate_service_certificates: true
124 tripleo::profile::base::rabbitmq::certificate_specs:
125 service_certificate: '/etc/pki/tls/certs/rabbitmq.crt'
126 service_key: '/etc/pki/tls/private/rabbitmq.key'
129 template: "%{hiera('fqdn_NETWORK')}"
131 NETWORK: {get_param: [ServiceNetMap, RabbitmqNetwork]}
134 template: "rabbitmq/%{hiera('fqdn_NETWORK')}"
136 NETWORK: {get_param: [ServiceNetMap, RabbitmqNetwork]}
139 include ::tripleo::profile::base::rabbitmq
141 - name: Stop rabbitmq service
143 service: name=rabbitmq-server state=stopped
144 - name: Start rabbitmq service
146 service: name=rabbitmq-server state=started
149 - internal_tls_enabled
152 network: {get_param: [ServiceNetMap, RabbitmqNetwork]}