Browse Source

OpenStack containerized qdrouterd service

Add the qdrouterd container as an infrastructure component
that provides a messaging backend for olso.messaging. Currently
the qdr role aliases the rabbitmq service.

This patch:
* Add qdrouterd to docker services
* Update environments docker file
* Add global_config_settings to yaml validate

Change-Id: Ief8c09a2728b6e1a1127a53b6df2affecc0ce3c4
changes/49/479049/14
John Eckersberg 4 years ago
committed by Andrew Smith
parent
commit
6a991f6102
  1. 119
      docker/services/qdrouterd.yaml
  2. 1
      environments/docker.yaml
  3. 3
      tools/yaml-validate.py

119
docker/services/qdrouterd.yaml

@ -0,0 +1,119 @@
heat_template_version: pike
description: >
OpenStack containerized Qpid dispatch router service
parameters:
DockerQdrouterdImage:
description: image
type: string
DockerQdrouterdConfigImage:
description: The container image to use for the qdrouterd config_volume
type: string
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
resources:
ContainersCommon:
type: ./containers-common.yaml
QdrouterdBase:
type: ../../puppet/services/qdr.yaml
properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for the qdrouterd service.
value:
service_name: {get_attr: [QdrouterdBase, role_data, service_name]}
global_config_settings: {get_attr: [QdrouterdBase, role_data, global_config_settings]}
config_settings: {get_attr: [QdrouterdBase, role_data, config_settings]}
step_config: &step_config
get_attr: [QdrouterdBase, role_data, step_config]
service_config_settings: {get_attr: [QdrouterdBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: qdrouterd
step_config: *step_config
config_image: {get_param: DockerQdrouterdConfigImage}
kolla_config:
/var/lib/kolla/config_files/qdrouterd.json:
command: /usr/sbin/qdrouterd -c /etc/qpid-dispatch/qdrouterd.conf
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
permissions:
- path: /var/lib/qdrouterd
owner: qdrouterd:qdrouterd
recurse: true
docker_config:
step_1:
qdrouterd_init_logs:
start_order: 0
detach: false
image: &qdrouterd_image {get_param: DockerQdrouterdImage}
privileged: false
user: root
volumes:
- /var/log/containers/qdrouterd:/var/log/qdrouterd
command: ['/bin/bash', '-c', 'chown -R qdrouterd:qdrouterd /var/log/qdrouterd']
qdrouterd:
start_order: 1
image: *qdrouterd_image
net: host
user: qdrouterd
privileged: false
restart: always
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/qdrouterd.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/qdrouterd/:/var/lib/kolla/config_files/src:ro
- /var/lib/qdrouterd:/var/lib/qdrouterd
- /var/log/containers/qdrouterd:/var/log/qdrouterd
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent logs directory
file:
path: "{{ item }}"
state: directory
with_items:
- /var/log/containers/qdrouterd
- /var/lib/qdrouterd
metadata_settings:
get_attr: [QdrouterdBase, role_data, metadata_settings]

1
environments/docker.yaml

@ -29,6 +29,7 @@ resource_registry:
OS::TripleO::Services::NeutronL3Agent: ../docker/services/neutron-l3.yaml
OS::TripleO::Services::HAproxy: ../docker/services/haproxy.yaml
OS::TripleO::Services::MySQL: ../docker/services/database/mysql.yaml
OS::TripleO::Services::Qdr: ../docker/services/qdrouterd.yaml
OS::TripleO::Services::RabbitMQ: ../docker/services/rabbitmq.yaml
OS::TripleO::Services::Redis: ../docker/services/database/redis.yaml
OS::TripleO::Services::Memcached: ../docker/services/memcached.yaml

3
tools/yaml-validate.py

@ -36,7 +36,8 @@ REQUIRED_DOCKER_SECTIONS = ['service_name', 'docker_config', 'puppet_config',
'config_settings', 'step_config']
OPTIONAL_DOCKER_SECTIONS = ['docker_puppet_tasks', 'upgrade_tasks',
'service_config_settings', 'host_prep_tasks',
'metadata_settings', 'kolla_config']
'metadata_settings', 'kolla_config',
'global_config_settings']
REQUIRED_DOCKER_PUPPET_CONFIG_SECTIONS = ['config_volume', 'step_config',
'config_image']
OPTIONAL_DOCKER_PUPPET_CONFIG_SECTIONS = [ 'puppet_tags', 'volumes' ]

Loading…
Cancel
Save