Add qdrouterd role for rpc messaging backend deployment

This patch introduces the qdrouterd role for deployment as
a direct messaging bus for oslo.messaging rpc communications.
The qdrouterd is deployed as infrastructure in a manner similar
to the rabbitmq server.

This patch:
* Add to role requirements
* Add to inventory
* Add to playbooks
* Add experimental aio job

Change-Id: If9eed3d5848939eac005651336a1305433d96dbf
This commit is contained in:
Andy Smith 2018-12-10 14:23:33 -05:00
parent 817c95fdac
commit 35777b93ef
11 changed files with 132 additions and 6 deletions

View File

@ -150,6 +150,10 @@
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-plugins
version: master
- name: qdrouterd
scm: git
src: https://git.openstack.org/openstack/ansible-role-qdrouterd
version: master
- name: rabbitmq_server
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-rabbitmq_server

View File

@ -0,0 +1,3 @@
oslomsg-rpc_hosts:
aio1:
ip: 172.29.236.100

View File

@ -0,0 +1,36 @@
---
# Copyright 2018, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
component_skel:
qdrouterd:
belongs_to:
- qdrouterd_all
container_skel:
qdrouterd_container:
belongs_to:
- oslomsg-rpc_containers
contains:
- qdrouterd
physical_skel:
oslomsg-rpc_containers:
belongs_to:
- all_containers
oslomsg-rpc_hosts:
belongs_to:
- hosts

View File

@ -39,3 +39,15 @@ memcached_servers: >-
| list
| join(',')
}}
## Qdrouterd options
qdrouterd_host_group: "qdrouterd_all"
qdrouterd_port: "{{ (qdrouterd_use_ssl | bool) | ternary(31459, 31460) }}"
qdrouterd_use_ssl: False
qdrouterd_servers: >-
{{
groups[qdrouterd_host_group]
| map('extract', hostvars, 'ansible_host')
| list | join(',')
}}

View File

@ -14,14 +14,14 @@
## Main
# RPC
oslomsg_rpc_transport: rabbit
oslomsg_rpc_port: "{{ rabbitmq_port }}"
oslomsg_rpc_servers: "{{ rabbitmq_servers }}"
oslomsg_rpc_use_ssl: "{{ rabbitmq_use_ssl }}"
oslomsg_rpc_host_group: "{{ rabbitmq_host_group }}"
oslomsg_rpc_transport: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary('amqp', 'rabbit') }}"
oslomsg_rpc_port: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_port, rabbitmq_port) }}"
oslomsg_rpc_servers: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_servers, rabbitmq_servers) }}"
oslomsg_rpc_use_ssl: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_use_ssl, rabbitmq_use_ssl) }}"
oslomsg_rpc_host_group: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_host_group, rabbitmq_host_group) }}"
# Notify
oslomsg_notify_transport: rabbit
oslomsg_notify_transport: "{{ (groups[rabbitmq_host_group] | length > 0) | ternary('rabbit', 'none') }}"
oslomsg_notify_port: "{{ rabbitmq_port }}"
oslomsg_notify_servers: "{{ rabbitmq_servers }}"
oslomsg_notify_use_ssl: "{{ rabbitmq_use_ssl }}"

View File

@ -18,6 +18,8 @@ hosts
[memcached]
[qdrouterd_all]
[rabbitmq_all]
[repo_all]

View File

@ -0,0 +1,53 @@
---
# Copyright 2018, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Create and configure qdrouterd container
hosts: "{{ qdrouterd_host_group | default('qdrouterd_all') }}"
serial: 1
gather_facts: "{{ osa_gather_facts | default(True) }}"
user: root
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- qdrouterd
pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars:
extra_container_config_no_restart:
- "lxc.start.order=19"
when: not is_metal
- include_tasks: common-tasks/unbound-clients.yml
when:
- hostvars['localhost']['resolvconf_enabled'] | bool
roles:
- role: "system_crontab_coordination"
- name: Install qdrouterd server
hosts: "{{ qdrouterd_host_group | default('qdrouterd_all') }}"
serial: 20%
user: root
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- qdrouterd
roles:
- role: "qdrouterd"
post_tasks:
- include_tasks: "common-tasks/rsyslog-client.yml"
vars:
rsyslog_client_log_rotate_file: qdrouterd_log_rotate
rsyslog_client_log_dir: "/var/log/qdrouterd"
rsyslog_client_config_name: "99-qdrouterd-rsyslog-client.conf"

View File

@ -23,6 +23,7 @@
- import_playbook: utility-install.yml
- import_playbook: memcached-install.yml
- import_playbook: galera-install.yml
- import_playbook: qdrouterd-install.yml
- import_playbook: rabbitmq-install.yml
- import_playbook: etcd-install.yml
- import_playbook: ceph-install.yml

View File

@ -361,7 +361,13 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'orchestration_hosts',
'os-infra_containers',
'os-infra_hosts',
'oslomsg-rpc_all',
'oslomsg-rpc_containers',
'oslomsg-rpc_hosts',
'pkg_repo',
'qdrouterd',
'qdrouterd_all',
'qdrouterd_container',
'rabbit_mq_container',
'rabbitmq',
'rabbitmq_all',

View File

@ -152,6 +152,14 @@
action: deploy
scenario: aio_octavia
- job:
name: openstack-ansible-deploy-aio_qdrouterd-ubuntu-bionic
parent: openstack-ansible-deploy-aio
nodeset: ubuntu-bionic
vars:
action: deploy
scenario: aio_qdrouterd
- job:
name: openstack-ansible-deploy-translations-ubuntu-bionic
parent: openstack-ansible-deploy-aio

View File

@ -33,6 +33,7 @@
- openstack-ansible-deploy-barbican-ubuntu-bionic
- openstack-ansible-deploy-aio_congress-ubuntu-bionic
- openstack-ansible-deploy-aio_octavia-ubuntu-bionic
- openstack-ansible-deploy-aio_qdrouterd-ubuntu-bionic
- openstack-ansible-deploy_with_ansible_devel-aio-ubuntu-bionic
- openstack-ansible-deploy_with_ansible_next-aio-ubuntu-bionic
- openstack-ansible-deploy-blazar-ubuntu-bionic