In order to remove the requirement to install the MariaDB client
libraries on all monasca hosts, we need to isolate all DB actions
on monasca_db_setup_host which has those libraries.
Change-Id: I269a933a7e26a3f4564d18d6f05cfce4b4eafe27
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.
Depends-On: https://review.openstack.org/598957
Change-Id: I52ef39767ba8acc80ca0c9503c58efe7548ebba4
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Instead of pip installing onto the host, we use the
influxdb in the monasca venv to do the influxdb database,
user, etc setup. This prevents interference between pip
installed packages and distribution packages, keeping the
line between host installed packages and venv installed
packages clean.
The venv is only deployed on the monasca_api servers, so
we change the group used for executing the tasks to the
right group for it to work.
Change-Id: I6e1f86a789f188dff611d522a3309a355f7cd8e8
This ensures the dependencies on the monasca roles are deployed
after the initial deploy steps of monasca. This allows us to
install on the host the packages required for the extra roles,
until they are fixed. Moreover, the grafana-ansible role is being
moved to ansible-grafana from cloudalchemy repository.
Change-Id: I9381c4994e38933fd12c02c673bfe409daf2a59c
Co-Authored-By: Guilherme Steinmüller <guilhermesp@lsd.ufcg.edu.br>
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.
This should fix it.
Change-Id: Iee01cc384368c76cf191244f4988ef735ee3d5d7
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: I673a465863559d6fc72e4fdcd5da2ab788e561ab
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 'monasca_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 'monasca_galera_address' which
has been used for a long time, but never documented. A bunch of unused
variables have also been removed.
Change-Id: I42fe26054aec078a7a7ef66c20416af2cfb65811
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: I62ae0b1f406f102fcb184913c5a6de54bb84c4c2
Partial-Bug: #1741634
Partial-Bug: #1764470
This reverts commit def3818792.
Those changes are causing troubles when running Zuul functional tests.
Change-Id: I13627b11c2a85b7a7dfc6c9950a36d08b162b9f5
This change fixes monasca modules to work with the latest version
of monascaclient.
Other minor changes:
- Use cryptography instead of pycrypto
- Removed duplicate variable for monasca_api_port
- Added static paths for dashboards
Change-Id: Ib4fe27c276413bb2e1e5da3fe532d824745c5b99
In order to do a developer mode that allows installation of packages
from local file, which take precedence over the developer_mode
constraints, we need to allow the order of the constraints to be
changed.
This patch adds a "pip_install_developer_constraints" var which is used
to set the developer mode constraints. By default this will leave the
same behaviour but will allow additional constraints to be added, or the
developermode constraints file to be overriden altogether.
Change-Id: I9fc7e0d9be83af274bb7cd02fff7010d58e908f1
This patch refactors the whole monasca role by bringing consistency
with the other openstack-ansible roles. Main changes include:
- Install services on its specific cointainer;
- monasca-thresh, monasca-notification and monasca-persister was
not being installed/configured, now it is;
- Tempest tests are ran for the whole monasca-api;
- The service should be fully functional;
- Added documentation.
The extras directory contains the changes necessary to openstack-
ansible to setup monasca.
Change-Id: Ib53d4311c4b4aa722c7cdf7b18632e23b8639a56
Consolidate distro package install tasks into a
single task using the package module and pass
the package list into the name instead of using
a with_items loop.
The minimum Ansible version is raised to 2.2 due to a
known bug [1] in Ansible's apt module which does not
update the cache properly if the cache update and the
install are combined in a single task.
[1] https://github.com/ansible/ansible-modules-core/issues/1497
Change-Id: I5d87e5e5d11bd1dcffb6a6187733f6d8e4e72fbf
We use an SSH bastion host which we do our deployment through. The
deployment host doesn't have direct access to the same network as the
host. As a result the venv local checksum lookup fails.
I have described this here:
https://bugs.launchpad.net/openstack-ansible/+bug/1689283
This is a simple fix for this problem, assuming everything is good it
will need repeating in multiple places in the code base.
Change-Id: I240605a8cd76b6ee2dfebde8eb47d577c4f93c95
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: I619ab58574eedece7e00e323f91aeaec4c5b5a6e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
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: I0280dce05e9f20b035e64b85750c72895e83a4b7
Reinitializes (copies python, etc binaries) into the venv when
dropping a new venv into place. This is needed because the Python
binary packaged with the venv may not match the Python running on
the host it is being installed to. (ie. in the case of a Xenial
repo container and a Trusty target host.)
Change-Id: Ibedc836cbab89d82d59c90165cbe064775164742
Partial-Bug: #1637509
This patch removes some extra tasks for detecting systemd and uses
the fact instead.
Partial-Bug: #1640125
Change-Id: I630b9543d6f57292f523b39b9f862ecea9f87439
Ansible 2.2 now treats the 'name' argument for the pip module
as a list, removing the need for us to implement the join
filter to optimise the install execution.
Change-Id: If930f4ac68cb48148c0962338a5bd346ebea3dbc
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: I213c955f832fd7bd0bc3497d8d8005985ecb04bd
- Making role more compatible with keystone v3
- Replacing variable names with more OSA aligned styling
Change-Id: I5b7230301faedfdfa63f12e51ccadcc16c26639a
Starting in Ansible 2.0, the get_url [1] module provides the
ability for a checksum to be provided to the get_url module
which will be verified against the local destination file
and the task skipped if it matches.
[1] http://docs.ansible.com/ansible/get_url_module.html
This patch implements the use of this functionality.
The ability to ignore a venv download failure is also removed
as this is not necessary or desirable. It is better for the
download to fail and the playbook execution to stop immediately
so that the failure point is exposed.
Change-Id: I26a6f2ade69d7e85340a37cdb373d7564f41b507
- This patch returns status code 200 if keystone auth token is
retrieved.
- Minor adjustments to the keystone middleware sections.
- Adjustments in user naming in service endpoint creations.
Change-Id: Ifbb356634b29f1586c44e1135a761bf1f6adddb0
- This patch is to provide monasca backend services and monasca api,log-api
- Adding the use of dictionary for service group mappings.
- Switching to use tested external roles for backend services.
Change-Id: I7f6335f12a4b3a13acf6b644f16587ab1b46745f
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: Ibf9dda810f366b03c393ea6106c89e6ec49c5ee1