Commit Graph

18 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 7582a27761 Drop apt_package_pinning from role requirements
We don't pin packages in masakari role, so dependency on
apt_package_pinning role can be safely removed.

Change-Id: Ife81410d59e8a646aab741bc1a5ef01784bf13b0
Related-Bug: #1979145
2023-04-13 21:32:23 +02:00
Dmitriy Rabotyagov 03fab4c697 Cleanup after repo_build and pip_install retirement
Change-Id: I6da14f03aee7b33cad2818f4cf1affe7504e3348
2020-05-12 22:23:54 +03:00
Jonathan Rosser 786692dda1 Add uwsgi role to role requirements
In order to satisfy linters we need to add uwsgi role into
tests/ansible-role-requrements.yml

Change-Id: I3056d383dc5248acc6c8bd3195b00b47e2ce95f3
2019-09-12 12:37:00 +01:00
melissaml b8d72072d7 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I9bbc60070a94cc60389d562305dccfa67a429ead
2019-07-10 19:33:43 +08:00
Dmitriy Rabotjagov d0e8674f92 Basic implementation of masakari-monitors
With this change masakari-monitors will be installed on hosts
which are in group masakari-monitor (supposed to be nova compute hosts)

hostmonitor depends on pacemaker with corosync, which are implemented by
https://github.com/mit-scripts/ansible-pacemaker-corosync

Masakari api/engine config was simplified and unneccesary defaults
were removed from it.

Role now uses default ``systemd_service`` role for systemctl configuration

Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Implements: blueprint masakari-ansible-plugin
Change-Id: I334877c0111a45d3f3a74e7f56931786f4301713
2018-11-06 19:46:53 +02:00
Jesse Pretorius 77022b2442 Set container_name as host_var in test inventory
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.

Change-Id: I2edf7369d5a111061c4e6590728efd6b72eb3b41
2018-10-22 12:49:22 +01:00
Zuul 846bfaa8ca Merge "use include_tasks instead of include" 2018-08-17 10:24:55 +00:00
Zuul 7e676e98c4 Merge "Trivial: Fix the pep8 warning" 2018-08-17 05:15:15 +00:00
caoyuan 279609fe91 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: Ic3f98a2237ecd69d90818b6de4647481ed434698
2018-08-15 16:57:00 +08:00
wangqi 019de27390 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: Ice8aafef4e92763d137797cf3a12a8b3e50653ee
2018-08-06 07:37:39 +00:00
Jesse Pretorius 8585cb3d3a 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:
- masakari_oslomsg_rpc_setup_host
- masakari_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.

We also rename the ubuntu-16.04.yml file to ubuntu.yml to cover both
xenial and bionic. This has become necessary because the
'Gather variables for each operating system' task in the galera_client
role is picking up this role's vars file instead of its own.

Change-Id: Ibf05d527b6dbed8a10ecf0b64cfb161b66295d35
2018-08-01 18:52:35 +01:00
Andy Smith bb88051ec4 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. The association of the messaging
backend server to the oslo.messaging services will then be transparent
to the masakari service.

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

Change-Id: I127ce216cfb7b4d5755b8f0a68406bbd251fbdd2
2018-07-26 10:42:42 +00:00
Dmitriy R 3d06e07f9c Added required defaults, env example, Manage LB hook
I've decided to add env and required secrets example for easier stratup.
Also added missing variables to defaults, as playbook was just failiing without them.
Variables regarding rabbitmq were missing.
Also, as masakari_venv_download_url is not defined by default,
masakari_venv_download had been set to false.

Handlers were missing Manage LB task and had wrong variable -
masakari-services instead of masakari_services

Functional test was missing USER system environment variable.
Also test inventory had mistakes.

test-masakari-functions.yml wasn't able to pass test due to error.
Functional tests moved to voting.

Change-Id: I6644d576177f441ca59e9221ce9a2e5b7cc0fc46
2018-07-19 06:42:32 +00:00
Jesse Pretorius faf5f262d5 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. The masakari client is not used on the host, so
it serves no purpose. As there are no required packages left, the task to
install them is also removed.

Change-Id: I5f4339b322b967fcfd326c7442d634abf8b6cb05
2018-07-12 17:42:15 +01:00
Jesse Pretorius 056208c580 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 'masakari_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 'masakari_galera_address' which
has been used for a long time, but never documented. A bunch of unused
variables have also been removed.

Change-Id: I6c1e4e32681cbb592f6daa805501031bb84e6e0c
2018-06-28 15:10:47 +01:00
Jean-Philippe Evrard ab6cfd1ef1 Add Maskari base jobs
This introduces the most basic jobs for masakari.

Change-Id: Ie62ea7ec96b8963b5d3815a9241cce964e8fafc2
2018-05-08 15:39:48 +05:30
Jesse Pretorius 487db02028 Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: Ifd50c7b0175b6d53d5bb3e9175bc2b79d39d3721
2018-05-03 09:48:16 +00:00
nirajsingh 130e4c0e29 First commit 2018-04-16 17:02:09 +05:30