Browse Source

flatten qdrouterd service configs

This change combines the previous puppet and docker files
into a single file that performs the docker service installation
and configuration.

Change-Id: I7b1688a12964d939ece33a7f06d2493bf13c08eb
changes/07/636507/3
Jill Rouleau 3 years ago
parent
commit
479d7f5872
  1. 4
      ci/environments/scenario001-multinode-containers.yaml
  2. 2
      ci/environments/scenario001-standalone.yaml
  3. 2
      ci/environments/scenario003-multinode-containers.yaml
  4. 2
      ci/environments/scenario003-standalone.yaml
  5. 78
      deployment/messaging/rpc-qdrouterd-container-puppet.yaml
  6. 2
      deployment/metrics/qdr-container-puppet.yaml
  7. 62
      deployment/qdr/qdrouterd-container-puppet.yaml
  8. 2
      environments/messaging/rpc-qdrouterd-notify-rabbitmq-hybrid.yaml
  9. 4
      environments/metrics-collectd-qdr.yaml
  10. 2
      environments/services/qdr.yaml
  11. 101
      puppet/services/messaging/rpc-qdrouterd.yaml
  12. 77
      puppet/services/qdr.yaml
  13. 4
      sample-env-generator/messaging.yaml
  14. 2
      tools/yaml-validate.py

4
ci/environments/scenario001-multinode-containers.yaml

@ -6,8 +6,8 @@ resource_registry:
OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml
OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::PankoApi: ../../deployment/panko/panko-api-container-puppet.yaml
OS::TripleO::Services::Collectd: ../../docker/services/metrics/collectd.yaml
OS::TripleO::Services::MetricsQdr: ../../docker/services/metrics/qdr.yaml
OS::TripleO::Services::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml
OS::TripleO::Services::MetricsQdr: ../../deployment/metrics/qdr-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::HAproxy: ../../deployment/haproxy/haproxy-pacemaker-puppet.yaml

2
ci/environments/scenario001-standalone.yaml

@ -19,7 +19,7 @@ resource_registry:
OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml
OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml
OS::TripleO::Services::HeatEngine: ../../deployment/heat/heat-engine-container-puppet.yaml
OS::TripleO::Services::MetricsQdr: ../../docker/services/metrics/qdr.yaml
OS::TripleO::Services::MetricsQdr: ../../deployment/metrics/qdr-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::HAproxy: ../../deployment/haproxy/haproxy-pacemaker-puppet.yaml

2
ci/environments/scenario003-multinode-containers.yaml

@ -7,7 +7,7 @@ resource_registry:
OS::TripleO::Services::MistralEngine: ../../deployment/mistral/mistral-engine-container-puppet.yaml
OS::TripleO::Services::MistralExecutor: ../../deployment/mistral/mistral-executor-container-puppet.yaml
OS::TripleO::Services::MistralEventEngine: ../../deployment/mistral/mistral-event-engine-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../docker/services/messaging/rpc-qdrouterd.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/messaging/rpc-qdrouterd-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml
OS::TripleO::Services::HAproxy: ../../deployment/haproxy/haproxy-pacemaker-puppet.yaml
OS::TripleO::Services::Pacemaker: ../../puppet/services/pacemaker.yaml

2
ci/environments/scenario003-standalone.yaml

@ -12,7 +12,7 @@ resource_registry:
OS::TripleO::Services::MistralEngine: ../../deployment/mistral/mistral-engine-container-puppet.yaml
OS::TripleO::Services::MistralExecutor: ../../deployment/mistral/mistral-executor-container-puppet.yaml
OS::TripleO::Services::MistralEventEngine: ../../deployment/mistral/mistral-event-engine-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../docker/services/messaging/rpc-qdrouterd.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/messaging/rpc-qdrouterd-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml
OS::TripleO::Services::HAproxy: ../../deployment/haproxy/haproxy-pacemaker-puppet.yaml
OS::TripleO::Services::Pacemaker: ../../puppet/services/pacemaker.yaml

78
docker/services/messaging/rpc-qdrouterd.yaml → deployment/messaging/rpc-qdrouterd-container-puppet.yaml

@ -36,43 +36,70 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
RpcPort:
default: 5672
description: The network port for messaging backend
type: number
RpcUserName:
default: guest
description: The username for messaging backend
type: string
RpcPassword:
description: The password for messaging backend
type: string
hidden: true
RpcUseSSL:
default: false
description: >
Messaging client subscriber parameter to specify
an SSL connection to the messaging host.
type: string
resources:
ContainersCommon:
type: ../containers-common.yaml
QdrouterdBase:
type: ../../../puppet/services/messaging/rpc-qdrouterd.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}
type: ../../docker/services/containers-common.yaml
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]}
service_name: oslo_messaging_rpc
global_config_settings:
oslo_messaging_rpc_scheme: amqp
oslo_messaging_rpc_user_name: {get_param: RpcUserName}
oslo_messaging_rpc_password: {get_param: RpcPassword}
oslo_messaging_rpc_use_ssl: {get_param: RpcUseSSL}
oslo_messaging_rpc_port: {get_param: RpcPort}
messaging_notify_service_name: 'amqp'
messaging_rpc_service_name: 'amqp'
keystone::messaging::amqp::amqp_pre_settled: 'notify'
config_settings:
map_merge:
- {get_attr: [QdrouterdBase, role_data, config_settings]}
- tripleo::oslo_messaging_rpc::firewall_rules:
'109 qdrouterd':
dport:
- 5672
- 31459
- 31460
service_config_settings: {get_attr: [QdrouterdBase, role_data, service_config_settings]}
tripleo::oslo_messaging_rpc::firewall_rules:
'109 qdrouterd':
dport:
- {get_param: RpcPort}
- 31459
- 31460
qdr::listener_addr:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, OsloMessagingRpcNetwork]}
tripleo::profile::base::qdr::qdr_listener_port: {get_param: RpcPort}
tripleo::profile::base::qdr::qdr_username: {get_param: RpcUserName}
tripleo::profile::base::qdr::qdr_password: {get_param: RpcPassword}
tripleo::rabbitmq::firewall_rules:
'109 qdr':
dport:
- {get_param: RpcPort}
service_config_settings: {}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: qdrouterd
step_config:
get_attr: [QdrouterdBase, role_data, step_config]
step_config: |
include ::tripleo::profile::base::qdr
config_image: {get_param: DockerQdrouterdConfigImage}
kolla_config:
/var/lib/kolla/config_files/qdrouterd.json:
@ -124,8 +151,7 @@ outputs:
with_items:
- { 'path': /var/log/containers/qdrouterd, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/qdrouterd, 'setype': svirt_sandbox_file_t }
metadata_settings:
get_attr: [QdrouterdBase, role_data, metadata_settings]
metadata_settings: {}
post_upgrade_tasks:
- when: step|int == 1
import_role:

2
docker/services/metrics/qdr.yaml → deployment/metrics/qdr-container-puppet.yaml

@ -116,7 +116,7 @@ parameters:
resources:
ContainersCommon:
type: ../containers-common.yaml
type: ../../docker/services/containers-common.yaml
outputs:

62
docker/services/qdrouterd.yaml → deployment/qdr/qdrouterd-container-puppet.yaml

@ -36,35 +36,60 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
RabbitUserName:
default: guest
description: The username for RabbitMQ
type: string
RabbitPassword:
description: The password for RabbitMQ
type: string
hidden: true
RabbitClientPort:
description: Set rabbit subscriber port, change this if using SSL
default: 5672
type: number
MonitoringSubscriptionQdr:
default: 'overcloud-qdr'
type: string
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}
type: ../../docker/services/containers-common.yaml
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]}
service_config_settings: {get_attr: [QdrouterdBase, role_data, service_config_settings]}
service_name: rabbitmq
monitoring_subscription: {get_param: MonitoringSubscriptionQdr}
global_config_settings:
messaging_notify_service_name: 'amqp'
messaging_rpc_service_name: 'amqp'
keystone::messaging::amqp::amqp_pre_settled: 'notify'
config_settings:
tripleo::rabbitmq::firewall_rules:
'109 qdr':
dport:
- {get_param: RabbitClientPort}
qdr::listener_addr:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, QdrNetwork]}
# cannot pass qdr::listener_port directly because it needs to be a string
# we do the conversion in the puppet layer
tripleo::profile::base::qdr::qdr_listener_port: {get_param: RabbitClientPort}
tripleo::profile::base::qdr::qdr_username: {get_param: RabbitUserName}
tripleo::profile::base::qdr::qdr_password: {get_param: RabbitPassword}
service_config_settings: {}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: qdrouterd
step_config:
get_attr: [QdrouterdBase, role_data, step_config]
step_config: |
include ::tripleo::profile::base::qdr
config_image: {get_param: DockerQdrouterdConfigImage}
kolla_config:
/var/lib/kolla/config_files/qdrouterd.json:
@ -124,8 +149,7 @@ outputs:
Log files from qrouterd containers can be found under
/var/log/containers/qrouterd.
ignore_errors: true
metadata_settings:
get_attr: [QdrouterdBase, role_data, metadata_settings]
metadata_settings: {}
post_upgrade_tasks:
- when: step|int == 1
import_role:

2
environments/messaging/rpc-qdrouterd-notify-rabbitmq-hybrid.yaml

@ -19,4 +19,4 @@ parameter_defaults:
resource_registry:
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../docker/services/messaging/rpc-qdrouterd.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/messaging/rpc-qdrouterd-container-puppet.yaml

4
environments/metrics-collectd-qdr.yaml

@ -4,8 +4,8 @@
resource_registry:
OS::TripleO::Services::MetricsQdr: ../docker/services/metrics/qdr.yaml
OS::TripleO::Services::Collectd: ../docker/services/metrics/collectd.yaml
OS::TripleO::Services::Collectd: ../deployment/metrics/collectd-container-puppet.yaml
OS::TripleO::Services::MetricsQdr: ../deployment/metrics/qdr-container-puppet.yaml
parameter_defaults:

2
environments/services/qdr.yaml

@ -1,2 +1,2 @@
resource_registry:
OS::TripleO::Services::Qdr: ../../docker/services/qdrouterd.yaml
OS::TripleO::Services::Qdr: ../../deployment/messaging/rpc-qdrouterd-container-puppet.yaml

101
puppet/services/messaging/rpc-qdrouterd.yaml

@ -1,101 +0,0 @@
heat_template_version: rocky
description: >
Qpid dispatch router service for messaging RPCs configured with Puppet
parameters:
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
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
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
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
RpcPort:
default: 5672
description: The network port for messaging backend
type: number
RpcUserName:
default: guest
description: The username for messaging backend
type: string
RpcPassword:
description: The password for messaging backend
type: string
hidden: true
RpcUseSSL:
default: false
description: >
Messaging client subscriber parameter to specify
an SSL connection to the messaging host.
type: string
resources:
QdrouterdServiceBase:
type: ../qdr.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for the OsloMessagingRpc role.
value:
service_name: oslo_messaging_rpc
monitoring_subscription: {get_attr: [QdrouterdServiceBase, role_data, monitoring_subscription]}
global_config_settings:
map_merge:
- get_attr: [QdrouterdServiceBase, role_data, global_config_settings]
- oslo_messaging_rpc_scheme: amqp
oslo_messaging_rpc_user_name: {get_param: RpcUserName}
oslo_messaging_rpc_password: {get_param: RpcPassword}
oslo_messaging_rpc_use_ssl: {get_param: RpcUseSSL}
oslo_messaging_rpc_port: {get_param: RpcPort}
config_settings:
map_merge:
- get_attr: [QdrouterdServiceBase, role_data, config_settings]
- tripleo::oslo_messaging_rpc::firewall_rules:
'109 qdrouterd':
dport:
- {get_param: RpcPort}
- 31459
- 31460
qdr::listener_addr:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, OsloMessagingRpcNetwork]}
tripleo::profile::base::qdr::qdr_listener_port: {get_param: RpcPort}
tripleo::profile::base::qdr::qdr_username: {get_param: RpcUserName}
tripleo::profile::base::qdr::qdr_password: {get_param: RpcPassword}
step_config: |
include ::tripleo::profile::base::qdr

77
puppet/services/qdr.yaml

@ -1,77 +0,0 @@
heat_template_version: rocky
description: >
Qpid dispatch router service configured with Puppet
parameters:
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
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
RabbitUserName:
default: guest
description: The username for RabbitMQ
type: string
RabbitPassword:
description: The password for RabbitMQ
type: string
hidden: true
RabbitClientPort:
description: Set rabbit subscriber port, change this if using SSL
default: 5672
type: number
MonitoringSubscriptionQdr:
default: 'overcloud-qdr'
type: string
outputs:
role_data:
description: Role data for the Qdr role.
value:
service_name: rabbitmq
monitoring_subscription: {get_param: MonitoringSubscriptionQdr}
global_config_settings:
messaging_notify_service_name: 'amqp'
messaging_rpc_service_name: 'amqp'
keystone::messaging::amqp::amqp_pre_settled: 'notify'
config_settings:
tripleo::rabbitmq::firewall_rules:
'109 qdr':
dport:
- {get_param: RabbitClientPort}
qdr::listener_addr:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, QdrNetwork]}
# cannot pass qdr::listener_port directly because it needs to be a string
# we do the conversion in the puppet layer
tripleo::profile::base::qdr::qdr_listener_port: {get_param: RabbitClientPort}
tripleo::profile::base::qdr::qdr_username: {get_param: RabbitUserName}
tripleo::profile::base::qdr::qdr_password: {get_param: RabbitPassword}
step_config: |
include ::tripleo::profile::base::qdr

4
sample-env-generator/messaging.yaml

@ -18,7 +18,7 @@ environments:
name: messaging/rpc-qdrouterd-notify-rabbitmq-hybrid
title: Hybrid qdrouterd for rpc and rabbitmq for notify messaging backend
files:
puppet/services/messaging/rpc-qdrouterd.yaml:
deployment/messaging/rpc-qdrouterd-container-puppet.yaml:
parameters:
- RpcPort
deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml:
@ -28,7 +28,7 @@ environments:
RpcPort: 31459
NotifyPort: 5672
resource_registry:
OS::TripleO::Services::OsloMessagingRpc: ../../docker/services/messaging/rpc-qdrouterd.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/messaging/rpc-qdrouterd-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml
description: |
Include this environment to enable hybrid messaging backends for

2
tools/yaml-validate.py

@ -229,7 +229,7 @@ VALIDATE_PUPPET_OVERRIDE = {
'./deployment/rabbitmq/rabbitmq-messaging-notify-container-puppet.yaml': False,
'./deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml': False,
# docker/services/messaging/*.yaml provide oslo_messaging services
'./docker/services/messaging/rpc-qdrouterd.yaml': False,
'./deployment/messaging/rpc-qdrouterd-container-puppet.yaml': False,
# docker/services/pacemaker/*-rabbitmq.yaml provide oslo_messaging services
'./deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml': False,
'./deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml': False,

Loading…
Cancel
Save