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
This commit is contained in:
Dmitriy R 2018-07-17 17:14:44 +03:00 committed by Jean-Philippe Evrard
parent be50506cf4
commit 3d06e07f9c
10 changed files with 55 additions and 22 deletions

View File

@ -50,6 +50,7 @@ masakari_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/ga
# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
masakari_venv_download: "{{ not masakari_developer_mode | bool }}"
masakari_venv_tag: untagged
# Name of the virtual env to deploy into
masakari_bin: "/openstack/venvs/masakari-{{ masakari_venv_tag }}/bin"
@ -124,3 +125,10 @@ masakari_services:
# pip packages required by this role. The value is picked up
# by the py_pkgs lookup.
masakari_role_project_group: masakari_all
## Configuration for RPC communications
masakari_rabbitmq_userid: masakari
masakari_rabbitmq_vhost: /masakari
masakari_rabbitmq_port: 5672
# Comma separated list of hosts
masakari_rabbitmq_servers: "{{ rabbitmq_all|default('127.0.0.1') }}"

View File

@ -0,0 +1,25 @@
---
component_skel:
masakari_engine:
belongs_to:
- masakari_all
masakari_api:
belongs_to:
- masakari_all
container_skel:
masakari_container:
belongs_to:
- instance_ha_containers
- masakari-infra_hosts
contains:
- masakari_engine
- masakari_api
physical_skel:
instance_ha_containers:
belongs_to:
- all_containers
masakari_hosts:
belongs_to:
- hosts

View File

@ -0,0 +1,3 @@
masakari_container_mysql_password:
masakari_rabbitmq_password:
masakari_service_password:

View File

@ -18,6 +18,9 @@
name: "{{ item.value.service_name }}"
state: restarted
daemon_reload: yes
with_dict: "{{ masakari-services }}"
with_dict: "{{ masakari_services }}"
when: inventory_hostname in groups[item.value.group]
- meta: noop
listen: Manage LB
when: false

View File

@ -124,9 +124,9 @@
section: masakari
option: need_service_restart
value: True
when: (masakari_get_venv | changed) or
(masakari_venv_dir | changed) or
(install_packages | changed) or
when: (masakari_get_venv is changed) or
(masakari_venv_dir is changed) or
(install_packages is changed) or
(ansible_local is not defined) or
('openstack_ansible' not in ansible_local) or
('masakari' not in ansible_local['openstack_ansible']) or

View File

@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.1.101
ansible_host: 10.1.0.2
ansible_become: True
ansible_user: root

View File

@ -24,14 +24,15 @@ memcached_all
[keystone_all]
infra1
[masakari_all]
masakari1
[masakari_all:children]
masakari_api
masakari_engine
[utility_all]
masakari1
[masakari_api]
masakari
[masakari_all]
masakari1
[masakari_engine]
masakari1

View File

@ -26,3 +26,4 @@
until: result.status == 200
retries: 5
delay: 10

View File

@ -18,6 +18,7 @@ passenv =
HTTPS_PROXY
no_proxy
NO_PROXY
USER
whitelist_externals =
bash
setenv =

View File

@ -14,15 +14,6 @@
# limitations under the License.
- project:
check:
jobs:
- openstack-ansible-linters
- openstack-ansible-functional-centos-7:
voting: false
- openstack-ansible-functional-opensuse-423:
voting: false
- openstack-ansible-functional-ubuntu-xenial:
voting: false
gate:
jobs:
- openstack-ansible-linters
templates:
- openstack-ansible-role-jobs