https://github.com/goldstrike77/ansible-role-linux-rabbitmq
Ansible role for install and configure RabbitMQ server on the Linux operating system.
https://github.com/goldstrike77/ansible-role-linux-rabbitmq
amqp amqp-0-9-1 ansible ansible-role messaging rabbitmq
Last synced: 7 months ago
JSON representation
Ansible role for install and configure RabbitMQ server on the Linux operating system.
- Host: GitHub
- URL: https://github.com/goldstrike77/ansible-role-linux-rabbitmq
- Owner: goldstrike77
- License: mit
- Created: 2019-09-09T09:22:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-03T01:34:37.000Z (over 4 years ago)
- Last Synced: 2025-01-12T17:47:52.108Z (9 months ago)
- Topics: amqp, amqp-0-9-1, ansible, ansible-role, messaging, rabbitmq
- Language: HTML
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

>__Please note that the original design goal of this role was more concerned with the initial installation and bootstrapping environment, which currently does not involve performing continuous maintenance, and therefore are only suitable for testing and development purposes, should not be used in production environments.__
>__请注意,此角色的最初设计目标更关注初始安装和引导环境,目前不涉及执行连续维护,因此仅适用于测试和开发目的,不应在生产环境中使用。__
___
__Table of Contents__
- [Overview](#overview)
- [Requirements](#requirements)
* [Operating systems](#operating-systems)
* [RabbitMQ Versions](#RabbitMQ-versions)
- [ Role variables](#Role-variables)
* [Main Configuration](#Main-parameters)
* [Other Configuration](#Other-parameters)
- [Dependencies](#dependencies)
- [Example Playbook](#example-playbook)
* [Hosts inventory file](#Hosts-inventory-file)
* [Vars in role configuration](#vars-in-role-configuration)
* [Combination of group vars and playbook](#combination-of-group-vars-and-playbook)
- [License](#license)
- [Author Information](#author-information)
- [Contributors](#Contributors)## Overview
RabbitMQ is an open-source message-broker software (sometimes called message-oriented middleware) that originally implemented the Advanced Message Queuing Protocol (AMQP) and has since been extended with a plug-in architecture to support Streaming Text Oriented Messaging Protocol (STOMP), MQ Telemetry Transport (MQTT), and other protocols.## Requirements
### Operating systems
This Ansible role installs RabbitMQ on linux operating system, including establishing a filesystem structure and server configuration with some common operational features, Will works on the following operating systems:* CentOS 7
### RabbitMQ versions
The following list of supported the RabbitMQ releases:
* RabbitMQ 3.7+
## Role variables
### Main parameters #
There are some variables in defaults/main.yml which can (Or needs to) be overridden:##### General parameters
* `rabbitmq_version`: Specify the RabbitMQ version.
* `rabbitmq_path`: Specify the RabbitMQ data directory.
* `rabbitmq_sa_user`: Specify the RabbitMQ administrator name.
* `rabbitmq_sa_pass`: Specify the RabbitMQ administrator password.##### Listen port
* `rabbitmq_port`: RabbitMQ server listen.##### System Variables
* `rabbitmq_channel_max`: Define the max permissible number of channels per connection.
* `rabbitmq_frame_max`: Define the max permissible size of an AMQP frame in bytes.
* `rabbitmq_handshake_timeout`: Maximum amount of time allowed for the handshake.
* `rabbitmq_heartbeat`: Heartbeat interval in seconds.
* `rabbitmq_tcp_listen_options_backlog`: Connection Backlog.
* `rabbitmq_vm_memory_high_watermark_absolute`: Define an absolute limit of RAM used by the node.
* `rabbitmq_vm_memory_high_watermark_paging_ratio`: Configuring the Paging Threshold.
* `rabbitmq_vm_memory_high_watermark_relative`: Define the memory threshold at which the flow control is triggered can be adjusted.##### Service Mesh
* `environments`: Define the service environment.
* `datacenter`: Define the DataCenter.
* `domain`: Define the Domain.
* `tags`: Define the service custom label.
* `exporter_is_install`: Whether to install prometheus exporter.
* `consul_public_register`: Whether register a exporter service with public consul client.
* `consul_public_exporter_token`: Public Consul client ACL token.
* `consul_public_http_prot`: The consul Hypertext Transfer Protocol.
* `consul_public_clients`: List of public consul clients.
* `consul_public_http_port`: The consul HTTP API port.### Other parameters
There are some variables in vars/main.yml:## Dependencies
- Ansible versions >= 2.8
- Python >= 2.7.5## Example
### Hosts inventory file
See tests/inventory for an example.node01 ansible_host='192.168.1.10' rabbitmq_version='3.8'
### Vars in role configuration
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:```yaml
- hosts: all
roles:
- role: ansible-role-linux-rabbitmq
rabbitmq_version: '3.8'
```### Combination of group vars and playbook
You can also use the group_vars or the host_vars files for setting the variables needed for this role. File you should change: group_vars/all or host_vars/`group_name`.```yaml
rabbitmq_version: '3.8'
rabbitmq_path: '/data'
rabbitmq_sa_user: 'admin'
rabbitmq_sa_pass: 'changeme'
rabbitmq_port:
epmd: '4369'
erlang_dist_client: '35672-35682'
erlang_dist_server: '25672'
exporter: '9419'
https: '15671'
http: '15672'
ssl: '5671'
tcp: '5672'
rabbitmq_channel_max: '128'
rabbitmq_frame_max: '131072'
rabbitmq_handshake_timeout: '10000'
rabbitmq_heartbeat: '60'
rabbitmq_tcp_listen_options_backlog: '4096'
rabbitmq_vm_memory_high_watermark_absolute: '2GB'
rabbitmq_vm_memory_high_watermark_paging_ratio: '0.5'
rabbitmq_vm_memory_high_watermark_relative: '0.4'
rabbitmq_bu_arg:
- vhost: '/'
user: 'example'
pass: 'changeme'
read_priv: '.*'
write_priv: '.*'
configure_priv: '.*'
tags: 'example'
environments: 'Development'
datacenter: 'dc01'
domain: 'local'
tags:
subscription: 'default'
owner: 'nobody'
department: 'Infrastructure'
organization: 'The Company'
region: 'China'
exporter_is_install: false
consul_public_register: false
consul_public_exporter_token: '00000000-0000-0000-0000-000000000000'
consul_public_http_prot: 'https'
consul_public_http_port: '8500'
consul_public_clients:
- '127.0.0.1'
```## License
## Author Information
Please send your suggestions to make this role better.## Contributors
Special thanks to the [Connext Information Technology](http://www.connext.com.cn) for their contributions to this role.