We make remote network hits to get the GPG keys which are quite
unreliable, and apt_key does not support using a proxy properly [1]
so let's store them inside the role and use them.
The implementation here matches that which was done in the
galera_client role in I520ccbadf3320b0d07fc83e3dbec9ea2bd16ec83
[1] https://github.com/ansible/ansible/issues/31691
Change-Id: I2715c904975b7940af72bd422904e748d3bae953
Previously the 'distro' install method was implemented as the
default for CentOS and SUSE, however, some remnants were left
behind, making the configuration confusing and causing some
issues due to the gpg verification on RedHat trying to use the
RabbitMQ gpg check.
Rather than try and keep the many confusing installation methods
for these distributions, we simply remove the other options and
all the config entries related to it.
As part of this, we need to clean up the functional tests which
previously implemented checks based on the 'file' install type
which is no longer used by any distribution.
Change-Id: I28199ce149f6893d688d11177ec950b17dbf0886
In the past, ansible_hostname could contain a FQDN or a hostname.
This is not the case anymore as fqdns are now stored in facts as
ansible_fqdn while short hostnames are stored in ansible_hostname.
This also simplifies the reading by using json_query.
Change-Id: I0755684846e42b4a17c4e46d70940535daaf73e7
The version of erlang we're using, while functional, is not recommended.
This change updates our version of erlang for rabbitmq to be the
recommended version by changing the pinned version of erlang.
The apt package pinning meta dependency has been removed and put into
the apt task file as an include role. To ensure a more uniform process
for setting the version of erlang used with rabbitmq the new variable
`rabbitmq_erlang_version_spec` has been added. This option has a default
of "null" and is set by distro specific variables when applicable.
Erlang version support matrix: https://www.rabbitmq.com/which-erlang.html
Change-Id: Iced12d4533eec068bd11d8bd235d81308ef40427
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This adds a var similar to what we have in the galera_server role [1],
making the local node's incoming address a var. This allows the
role's consumer to define a different node address than the one used
by ansible in ansible_host.
[1] https://github.com/openstack/openstack-ansible-galera_server/blob/master/defaults/main.yml#L92
Change-Id: I30e51668545095c8f6d91902516767d7bf158202
This patch optimizes the Erlang/RabbitMQ installation on CentOS. It
includes:
* Installing RabbitMQ from RabbitMQ's repository
* Installing Erlang all-in-one from RabbitMQ's repository
* Remove old versionlocks before applying new ones (fixes bug)
The erlang-solutions repository is hosted in eastern Europe and has
high latency to the USA and western Europe. Installing from that
repository brings in over 80 individual packages, which causes
additional delays in the role.
The Erlang all-in-one package from RabbitMQ's repository contains
only the Erlang bits that RabbitMQ needs. Also, it has HiPE enabled
by default, which is recommended by RabbitMQ developers for
better performance.
Closes-Bug: 1712596
Change-Id: I1bfcc96f353bd27b0004d93e250bb041eee48bdb
This patch increases the default ulimit for RabbitMQ to 65536. This
lines up well with other deployments (see bug report).
Closes-Bug: 1714511
Change-Id: I55ec4590c2c382bf26e9178ce9500fddcd6128dc
It may be required to override the repo information
in its entirety, rather than just the URL. This
patch allows that to be done.
Change-Id: Ib49c057465a2a7e394a830a33a03ad9de3150899
The RabbitMQ community and project recommend erlang 19.3.x for the best,
most stable, results. This change downloads the recommended version of
erlang [ https://www.rabbitmq.com/which-erlang.html ] from ESL and moves
the erlang packages for distros into a specific list installed only when
the ``rabbitmq_install_method`` variable is not set to "file".
Change-Id: Ief57b1fdcb791f0f8ed20c1cbb54ea19d4373f81
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Deployers can override the `rabbitmq_disable_non_tls_listeners`
variable, setting a value of `True` if they wish to enable this feature.
Change-Id: I4fe39099dbe8973d2655845c19882c404d4f20b1
In some cases, deployers may want to use a repo instead of a deb
file (limited connectivity, repo mgmt tools already in place, ...)
This commit introduces this behavior in an optional manner: The
default behavior is still using a deb file. If using an external
repository, the repo used will be RabbitMQ recommended one hosted
on packagecloud.io.
Change-Id: If366d7411cffd59e4988ceba6fc47eac2b384ddf
This commit removes the container_name var reference from
defaults/main.yml, and replaces it with ansible_hostname instead. This
helps when installing this role on a non-OpenStack-Ansible deployment
which does not have container_name set.
Change-Id: I7da72c45b50bff5722e1e5c1900c8aa56759eb7f
Previously the role assumed that all deployers wanted
all queues to be HA. Performance testing by Mirantis and
Intel has suggested that throughput increases can be dramatic
when disabling HA queues, see:
http://docs.openstack.org/developer/performance-docs/test_results/mq/rabbitmq/index.html
Therefore, we should allow deployers to set their own
policies when desired.
Change-Id: I156b8618e78d74823ec568053157afc853baad84
Closes-Bug: #1607830
The ``rabbitmq_server`` role now supports configuring HiPE compilation
of the RabbitMQ server Erlang code. This configuration option may improve
server performance for some workloads and hardware. Deployers can
override the ``rabbitmq_hipe_compile`` variable, setting a value of
``True`` if they wish to enable this feature.
Change-Id: I433d94eff00ac82a9069f9092faa87d449190442
The rabbitmq_plugins variable was mentioned as a loop item but was not
actually being used within the task to enable the management plugin.
It can now be overridden to enable or disable any RabbitMQ plugins.
Change-Id: I35f82427be464c811ee098ef676825aaa1e05d8d
Related-Bug: 1617431
1. Add collect_statistics_interval and rates_mode configurations in
rabbitmq.config template which enables to define custom value for
those fields.
2. Add collect_statistics_interval and rates_mode defaults in
defaults/main.yml
Change-Id: Ie349528929398f53a9d87e7fc02e0c95c9d6d4f1
Closes-bug: 1617516
The current method of installing the distribution packages required is
set in the tasks and cannot be changed by a deployer.
Currently the apt task always installs the latest package. This results
in unexpected binary changes when a deployer may simply be trying to
execute a configuration change.
This patch adds the ability for a deployer to change the desired state
so that the results are predictable.
Change-Id: I3227dc6f15e0307926e65427bc635c34e2baa87f
The pycrypto package no longer needs to be installed. It was
previously necessary due to the use of memcache for moving
SSL certificates around. As we're no longer using this
method the package installation and its binary deps may be
removed.
Change-Id: I805edeb47dc888411a785aacdb7d93d0cb05c393
The default value of "rabbitmq_all" remains, but this
change should allow deployers to target the role to multiple
groups now.
Change-Id: Idc1bc44b005f09f9dc7eb9778719a8ba92756c06
Implements: blueprint multi-rabbitmq-clusters
Separate files have been created for vars and tasks related to a
specific package manager. The 'vars_files_var' variable has been created
to store a list of files to search for distro specific variables.
The 'rabbitmq_apt_packages' variable has been deprecated and renamed to
the more generalized 'rabbitmq_dependencies' to better describe its
purpose and to simplify reuse of existing install tasks between multiple
distros.
Change-Id: I1940593978b733501daf5fe25edd393f2f6bee0c
This change ensures that the RabbitMQ ServerName is being set to
the **ansible_hostname** fact. This ensures the RabbitMQ server
has an appropriate server name which is compliant to the RFC.
Change-Id: I1f6a161b3af8fd0edd677ac1c3f396e6e8b5d02e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Change the default install version of RabbitMQ Server to 3.6.1-1.
Additionally, the functional test playbook file has been split into
multiple, more focused, files. Tests to ensure that the expected version
of RabbitMQ Server is running and to upgrade from 3.5.7 to 3.6.1 have
been added.
Change-Id: I8907a3a71334be7b89ad743c3f2031e0a42a00f2
This fix will add ERLANG VM tuning parameters with increased
default settings to support larger installations.
Following overrides have been added:
rabbitmq_async_threads defaults to 128 (from 32)
rabbitmq_process_limit defaults to 1048576 (from 256k)
Closes-Bug: #1549940
DocImpact
Change-Id: Ia0fab288db8aa287e667dfc843f02d7ec318a816
Workarounding the upstream ansible apt module bug
documented here:
https://github.com/ansible/ansible-modules-core/pull/1517
For the next versions of ansible we'll be using, we should
check if the apt bug is fixed. When it's fixed, we could
abandon this change and use the standard apt module
with correct cache handling.
Change-Id: I4b27e630757ca228ed3543bb1d30187d2ee4e73b