Commit Graph

29 Commits

Author SHA1 Message Date
Jesse Pretorius
83affc627f Use in-repo GPG keys
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
2018-12-18 12:00:59 +00:00
Mohammed Naser
cfc8423bfd Ensure that RedHat/SUSE only use a distro install
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
2018-11-07 18:58:06 +00:00
Jean-Philippe Evrard
f3978e22c2 Cleanup generation of rabbitmq server data
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
2018-07-12 13:20:30 +02:00
Zuul
ea96b87de5 Merge "Update the version of erlang to support rabbitmq" 2018-06-06 12:28:11 +00:00
Kevin Carter
372ccd1bbd
Update the version of erlang to support rabbitmq
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>
2018-06-05 19:39:56 -05:00
Logan V
b56ff9d141 Variable node address
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
2018-06-05 11:37:44 -05:00
Major Hayden
05370b0394
Optimize CentOS Erlang installation
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
2017-09-12 09:59:47 -06:00
Major Hayden
e9b44a3a2b
Increase RabbitMQ's ulimit to 65536
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
2017-09-01 08:40:38 -05:00
Jesse Pretorius
9edd9e72d6 Allow RabbitMQ/Erlang repo overrides without extra-vars
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
2017-08-09 09:29:31 +00:00
Kevin Carter
83a95efda1
Install specific version of Erlang from ESL
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>
2017-06-14 12:47:04 -05:00
Andrey
84d75078cf Allow configuration of listening on non-ssl port
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
2017-01-19 15:23:13 -05:00
Jean-Philippe Evrard
84ede176b9 Add repo installation method
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
2016-12-15 10:26:42 +00:00
Matt Thompson
ab268645d9 Remove container_name reference
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
2016-11-24 12:07:40 -05:00
Travis Truman
75d8dac4d0 Rabbit policies now overrideable by deployers
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
2016-09-07 12:32:25 -04:00
Jenkins
4debe62fee Merge "Enable HiPE compile configuration" 2016-09-07 07:12:59 +00:00
Travis Truman
37c741e545 Enable HiPE compile configuration
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
2016-09-06 14:36:23 -04:00
Jimmy McCrory
c1a97ab6b2 Allow configuration of rabbitmq plugins
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
2016-09-06 09:51:47 -07:00
Satheesh Kumar Ulaganathan
9ccc0ee3f1 Add collect_statistics_interval, rates_mode in rabbitmq.config template
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
2016-08-29 10:58:48 -07:00
Jesse Pretorius
8adfab58c0 Add ability to change apt/yum package state
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
2016-08-02 15:31:16 +01:00
Jesse Pretorius
32d01caa60 Remove unnecessary package installation
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
2016-07-19 08:31:44 +00:00
Travis Truman
e4644a19fc Make rabbitmq inventory group configurable
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
2016-07-14 08:14:30 -04:00
Jimmy McCrory
d6a1f3d619 Multi-distro framework for rabbitmq_server role
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
2016-05-13 15:04:24 -07:00
Kevin Carter
0679db0690
Fix server/hostname for RFC 1034/1035
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>
2016-04-17 01:58:06 -05:00
Travis Truman
f7f4e6a583 Removing unused default role variable
Change-Id: I52be3d82e11d3c74f5ec974e0dcc7a6bb4b628b8
2016-03-09 10:58:19 -05:00
Jimmy McCrory
e4b7ae1787 Upgrade RabbitMQ Server to 3.6.1-1
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
2016-03-07 19:11:21 -08:00
Bjoern Teipel
a90cd7e343 Adding ERLANG VM tuning parameters
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
2016-02-26 20:01:03 -06:00
Jean-Philippe Evrard
d33d9ec606 Only update apt cache if necessary
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
2016-02-15 14:49:43 +01:00
Jesse Pretorius
7162d0302e Update RabbitMQ to v3.6.0-1
Change-Id: I1529ef969605dab7ec6adfe23f02a1637d6a9ff0
2016-02-01 09:11:36 +00:00
Kevin Carter
ee03bfc5ba
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:25:11 -06:00