Commit Graph

17 Commits

Author SHA1 Message Date
Jonathan Rosser 2766425472 Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: Ibde83024d1c3a7fc2a91ebaa14f33ad1976a7b22
2021-03-17 09:06:32 +00:00
Jonathan Rosser b53e30cdac Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I8c5d46a9d612b6800b6dde37a324e2357cf99217
2021-02-23 09:21:01 +00:00
Dmitriy Rabotyagov 141db60ee6 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald.

Change-Id: I9ee285aeae85ccf6827a652dcd4ff06958141615
2019-07-22 16:40:36 +03:00
Mohammed Naser d784ea1846 Increase default connection count to 4096
The current default is 1024 however this is not sufficent for most
deployments and it will cause a lot of issues if it does hit the
limit as the server will stop responding.

The overhead for this is very low and other deployment tooling
usually sets this to 8192[1], so 4096 is even very conservative.

[1]: https://github.com/saz/puppet-memcached/blob/bb9d55a2/manifests/init.pp#L26

Change-Id: I604f96a9431076e1f630d2045eac4c88a92935c1
2018-06-13 15:52:12 -04:00
Andreas Jaeger 426a4f5f0d
Clean up the role and further isolate the service
This change cleans up the role a little bit making it more consistent.

A new configuration file has been added which will further isolate
our services using a named cgroup; this is similar to what we already do in
our openstack services. By further isolating the service from the system
we get quite a bit more control and accountability.

Change-Id: I02a84a2560853473c986ad0db26874341a23fc82
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-11-29 20:37:56 -06:00
Jesse Pretorius a9acd22e82 Disable PrivateDevices for MemcacheD on CentOS 7
This patch adds the `memcached_disable_privatedevices` variable that
allows deployers to disable PrivateDevices in the systemd unit file.

This is a workaround to fix the systemd/LXC issues with bind
mounting an already bind mounted `/dev/ptmx` inside the LXC
container.

See Launchpad bug, lxc/lxc#1623, or systemd/systemd#6121 for more
details.

The is_metal variable is removed as it is unused.

Related-bug: 1697531
Change-Id: Id7c148bf901354a3dfc2f189ec659f2b92fc7985
2017-06-15 11:56:18 +01:00
Jesse Pretorius d90f57aca9 Optimise the distro package installation
In order to optimise the distro package installation
process the list of packages to install is prepared
for the host, then installed by passing the package
task the full list instead of using a loop.

The package lists in defaults are removed as it is
undesirable to make it easy to override these lists.
This is not provided for in any other roles.

Change-Id: I71307d2a808fdc0f76e376a84651dad86b3f8b69
2017-06-08 17:00:26 +01:00
Jesse Pretorius 736969d00c Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: Ib3d6dea38bf4d570e6b9501f9cb89632639d586e
2016-08-30 16:21:01 +01:00
Jesse Pretorius 68e7e05ac8 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: Ieaa9fa9c6e0d0790b79d5d9d50fbe693a6091d2d
2016-08-02 07:48:48 +00:00
Jean-Philippe Evrard 0032fafb32 install_test_packages isn't set in memcached role
We use this variable for apt/yum, but never defined it.
This fixes the undefined variable issue.

Change-Id: Ifd0dc9305d71a231e7c014b4970a8a885678d1f9
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
2016-05-31 11:40:22 +01:00
Jimmy McCrory 42e2291713 Include empty default vars for package lists
The keystone role conditionally includes memcached_server as a
dependency. When that condition is not met, Ansible will skip all of the
tasks within this role, but will still attempt to evaluate the
'with_items' of tasks.

Add 'memcached_packages' and 'memcached_test_packages' to the role's
default variables as empty lists. Under normal circumstances these
will be overridden with variables through the distribution specific var
files.

Change-Id: I7aeaf3a0f7ad42c516d77fc608fdad4b3afe53a8
2016-05-27 17:51:06 -07:00
Matt Thompson f0185d9d88 Updated role using the Multi-Distro framework
This commit updates the memcached_server role to work on Trusty,
Xenial, and CentOS 7.

NOTES:

1. This role no longer creates the memcache user since both Ubuntu and
   CentOS already install a suitable user
2. We have temporarily disabled testing of the log file since CentOS and
   Xenial do not log to file
3. On Ubuntu we drop ulimits into /etc/defaults/memcached, we need to
   figure out how to do the equivalent on CentOS
4. We update tasks/memcached_config.yml to use the correct memcached
   user in limits.conf, however neither these limits or the ones in
   templates/memcached.debian.j2 actually seem to be taking effect.
   More work in an additional review will need to be done to clean this
   all up.

Implements: blueprint multi-platform-host

Change-Id: I4c32f3d60939615c5d0c6fb202e96aacb35ab9b4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-26 16:52:54 +01:00
Travis Truman c99d1debe9 Removing the `verbose` variable
Debug logging enabled by using the `debug` variable should
be sufficient for troubleshooting purposes.

The default logging level has increased from -v to -vv

Change-Id: Iad6785f1b445703fcfd84a5582ca81849d70ceed
2016-05-24 09:22:22 -04:00
Bjoern Teipel 5c2d8c55ec Configure nofile OS limit for memcached server role
This fix adds a new override `memcached_connections` which is
automatically calculated from the number of memcached
connection limit plus additional 1k to configure the OS nofile limit.
Without proper nofile limit configuration, memcached will crash
in order to support higher parallel connection TCP/Memcache counts.

Closes-Bug: #1582288

Change-Id: I558ba329b7247cdfcf660e392c3ae0c4a0d65a53
2016-05-17 12:11:40 -05:00
Jean-Philippe Evrard 2d937511d6 Improved logging for memcached
- Moved to the right folder to get it accessed on bare metal
  when containerized
- Making it work for rsyslog and logrotation's existing
  roles
- Changed the gate tests to reflect path change

Closes-Bug: #1569171

Change-Id: I3a1c2f50ab63b55b39318ba40c0921f6b738cafb
2016-04-13 18:16:07 +01:00
Jean-Philippe Evrard fe8509a241 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: I900ea91ca60973fc72910d649ec1f994373fbe5f
2016-02-15 14:49:43 +01:00
Kevin Carter b818df54e2
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:24:22 -06:00