Commit Graph

15 Commits

Author SHA1 Message Date
Guilherme Steinmüller 1f61130240 Retire openstack-ansible-os_watcher
Change-Id: I0dfd5318a7b953618673eb4ffd17f89a1cf900c4
2019-04-24 16:51:54 -04:00
Jesse Pretorius 723eb345ea Enable overriding the service setup host python interpreter
In order to enable the service setup host python interpreter to
be changed easily, we make it a variable. This will be useful
when someone sets the service setup host to be the utility
container, because we'll be able to set this var by default.

Change-Id: I25e6d1a047423b719a5f77bb46b529a667dbfa7a
2018-11-30 16:57:34 +00:00
Jesse Pretorius 308665677c Use a common python build/install role
In order to radically simplify how we prepare the service
venvs, we use a common role to do the wheel builds and the
venv preparation. This makes the process far simpler to
understand, because the role does its own building and
installing. It also reduces the code maintenance burden,
because instead of duplicating the build processes in the
repo_build role and the service role - we only have it all
done in a single place.

We also change the role venv tag var to use the integrated
build's common venv tag so that we can remove the role's
venv tag in group_vars in the integrated build. This reduces
memory consumption and also reduces the duplication.

This is by no means the final stop in the simplification
process, but it is a step forward. The will be work to follow
which:

1. Replaces 'developer mode' with an equivalent mechanism
   that uses the common role and is simpler to understand.
   We will also simplify the provisioning of pip install
   arguments when doing this.
2. Simplifies the installation of optional pip packages.
   Right now it's more complicated than it needs to be due
   to us needing to keep the py_pkgs plugin working in the
   integrated build.
3. Deduplicates the distro package installs. Right now the
   role installs the distro packages twice - just before
   building the venv, and during the python_venv_build role
   execution.

Depends-On: https://review.openstack.org/598957
Change-Id: I1c2f5d7ef1bb6913f3809c7fd9d9a36cacd0ab4a
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 18:01:50 +01:00
Jesse Pretorius 2ab1b99446 Move MQ vhost/user creation into role
There is no record for why we implement the MQ vhost/user creation
outside of the role in the playbook, when we could do it inside the
role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement two new variables:
- watcher_oslomsg_rpc_setup_host
- watcher_oslomsg_notify_setup_host

These are used in the role to allow delegation of the MQ vhost/user
setup for each type to any host, but they default to using the first
member of the applicable oslomsg host group.

We also adjust some of the defaults to automatically inherit existing
vars set in group_vars form the integrated build so that we do not
need to do the wiring in the integrated build's group vars. We still
default them in the role too for independent role usage.

Finally, we remove the test mq setup tasks and clean up any unused
or unnecessary variables configured in tests.

Change-Id: I6b781cde4e075dee9d79cf28a55eeda00460c37d
2018-07-27 12:24:39 +01:00
Andy Smith cbe8947272 Update to use oslo.messaging service for RPC and Notify
This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters replace
the rabbitmq values and are used to generate the messaging
transport_url for the service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Add transport_url generation to conf template
* Add oslo.messaging to tests inventory and update tests
* Update readme
* Install extra packages for optional drivers
* Add release note

Change-Id: Ie43bcf4c5a8414072f1917ab8b30a034a514c51b
2018-07-26 09:16:46 +00:00
Jesse Pretorius 4bffc1e91f Execute service setup against a delegated host using Ansible built-in modules
In order to reduce the packages required to pip install on to the hosts,
we allow the service setup to be delegated to a specific host, defaulting
to the deploy host. We also switch as many tasks as possible to using the
built-in Ansible modules which make use of the shade library.

The 'virtualenv' package is now installed appropriately by the openstack_hosts
role, so there's no need to install it any more. The 'httplib2' package is a
legacy Ansible requirement for the get_url/get_uri module which is no longer
needed. The keystone client library is not required any more now that we're
using the upstream modules. As there are no required packages left, the task
to install them is also removed.

Change-Id: I32752523e9ed484bf0864be4db146bb333f9f55e
2018-07-14 14:43:20 +01:00
Jesse Pretorius 59acdd8c68 Move database creation into role
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement a new variable called 'watcher_db_setup_host'
which is used in the role to allow delegation of the database setup
task to any host, but defaults to the first member of the galera_all
host group. We also document the variable 'watcher_galera_address' which
has been used for a long time, but never documented. A bunch of unused
variables have also been removed.

Change-Id: I3b845ee913e3abc70bbc59b85142ebd55b92de51
2018-06-29 13:23:31 +00:00
Kevin Carter 4746f69e87
Add packages required for osprofiler
The following packages are required in-order to run osprofiler.
these packages will provide deployers the ability to profile
a service on demand should they choose to enable the profile
functionality.

Change-Id: I9a2f8962e303ff96415591b6791a46b002b84e92
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-11 22:59:29 -05:00
Jean-Philippe Evrard f905525ba2 Replace virtualenv-tools by a script
virtualenv-tools has a bug which gets triggered in gates: it can't
change the shebang of a virtualenv python bin/ files if they
were generated with a virtualenv script whose shebang ends with
python2 instead of python.

Because we can't modify virtualenv-tools, we use shell scripts
instead.

Change-Id: I1d6eb2e90ea127d8646a7ced827a6793a86e3ad1
Partial-Bug: #1741634
2018-01-15 14:18:33 +00:00
Jesse Pretorius 4b95f50275 Switch to Cryptography over pycrypto
The keystonemiddleware library recently switched to using the
cryptography library over pycrypto, which was unmaintained. See
Iced7f5115e49ccf4f7f5bf6813cb5988b95c248b

Change-Id: I5b03aee319c0aecca677ede07d44d5ff40a1b61f
Co-Authored-By: Nolan Brubaker <nolan.brubaker@rackspace.com>
2017-06-07 17:51:58 +00:00
Kevin Carter 539cc073ee Ensure the components are isolated from the system
This creates a specific slice which all OpenStack services will operate
from. By creating an independent slice these components will be governed
away from the system slice allowing us to better optimise resource
consumption.

See the following for more information on slices:

* https://www.freedesktop.org/software/systemd/man/systemd.slice.html

See for following for more information on resource controls:

* https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html

Tools like ``systemd-cgtop`` and ``systemd-cgls`` will now give us
insight into specific processes, process groups, and resouce consumption
in ways that we've not had access to before. To enable some of this reporting
the accounting options have been added to the [Service] section of the unit
file.

Change-Id: I1edfb6bd1896f8c2b6f26c77ba02923e69fb2f37
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-03-30 15:07:48 +00:00
Logan V dadc21ff4e Clean up developer mode logic
Fixes the ability to deploy a venv in cases where:
1) developer_mode is not enabled
2) A cached venv is not downloaded from the repo server

Additional cleanup to the developer_mode venv deployment
logic is implemented by adding a *_venv_download var
which is used to decouple developer_mode from the
cached venv extraction process so that a deployer
can force venv builds in-place (disable cached
venv usage) without enabling developer mode
constraints.

Change-Id: I4f0ad47547ef9c85dda33ec93de186125323bc9f
2017-01-13 19:52:42 -06:00
Jesse Pretorius ba39fc1731 Fix linting issues for ansible-lint 3.4.1
Preparing this role for the ansible-lint version bump

Change-Id: Id2e037949562796d2608626ed8b1be7e004c099a
2016-11-09 21:50:56 +00:00
Jesse Pretorius 66e90e0f03 Simplify pip options/constraints mechanism
The current constraints generation for the
installation involves multiple tasks and multiple
variables.

Using multiple tasks extends the installation time
unnecessarily and the additional variables are
unnecessary.

This patch aims to simplify the mechanism and
hopes to speed it up a little.

Change-Id: If468740e7ce07c272f982c2d09709bf0bb2cdfbe
2016-11-02 18:26:42 +00:00
Michael Gugino 76a013f814 Initial commit
This is the initial commit for the watcher role.
2016-08-22 13:37:00 -04:00