Remove duplicate docker/puppet services.yaml
Move to one common services.yaml not only reduces the duplication, but it should improve performance for the docker/services.yaml case, because we were creating two ResourceChains with $many services which we know can be really slow (especially since we seem to be missing concurrent: true on one) Change-Id: I76f188438bfc6449b152c2861d99738e6eb3c61b
This commit is contained in:
parent
cf17396a37
commit
316cc2572d
1
common/README
Normal file
1
common/README
Normal file
@ -0,0 +1 @@
|
|||||||
|
This will contain some common templates but it needs to be added to the RPM spec first
|
@ -1,105 +0,0 @@
|
|||||||
heat_template_version: pike
|
|
||||||
|
|
||||||
description: >
|
|
||||||
Utility stack to convert an array of services into a set of combined
|
|
||||||
role configs.
|
|
||||||
|
|
||||||
parameters:
|
|
||||||
Services:
|
|
||||||
default: []
|
|
||||||
description: |
|
|
||||||
List nested stack service templates.
|
|
||||||
type: comma_delimited_list
|
|
||||||
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: {}
|
|
||||||
description: Mapping of service -> default password. Used to help
|
|
||||||
pass top level passwords managed by Heat into services.
|
|
||||||
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:
|
|
||||||
|
|
||||||
PuppetServices:
|
|
||||||
type: ../../puppet/services/services.yaml
|
|
||||||
properties:
|
|
||||||
Services: {get_param: Services}
|
|
||||||
ServiceNetMap: {get_param: ServiceNetMap}
|
|
||||||
EndpointMap: {get_param: EndpointMap}
|
|
||||||
DefaultPasswords: {get_param: DefaultPasswords}
|
|
||||||
RoleName: {get_param: RoleName}
|
|
||||||
RoleParameters: {get_param: RoleParameters}
|
|
||||||
|
|
||||||
ServiceChain:
|
|
||||||
type: OS::Heat::ResourceChain
|
|
||||||
properties:
|
|
||||||
resources: {get_param: Services}
|
|
||||||
concurrent: true
|
|
||||||
resource_properties:
|
|
||||||
ServiceNetMap: {get_param: ServiceNetMap}
|
|
||||||
EndpointMap: {get_param: EndpointMap}
|
|
||||||
DefaultPasswords: {get_param: DefaultPasswords}
|
|
||||||
RoleName: {get_param: RoleName}
|
|
||||||
RoleParameters: {get_param: RoleParameters}
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
role_data:
|
|
||||||
description: Combined Role data for this set of services.
|
|
||||||
value:
|
|
||||||
service_names:
|
|
||||||
{get_attr: [PuppetServices, role_data, service_names]}
|
|
||||||
monitoring_subscriptions:
|
|
||||||
{get_attr: [PuppetServices, role_data, monitoring_subscriptions]}
|
|
||||||
logging_sources:
|
|
||||||
{get_attr: [PuppetServices, role_data, logging_sources]}
|
|
||||||
logging_groups:
|
|
||||||
{get_attr: [PuppetServices, role_data, logging_groups]}
|
|
||||||
service_config_settings:
|
|
||||||
{get_attr: [PuppetServices, role_data, service_config_settings]}
|
|
||||||
config_settings:
|
|
||||||
{get_attr: [PuppetServices, role_data, config_settings]}
|
|
||||||
global_config_settings:
|
|
||||||
{get_attr: [PuppetServices, role_data, global_config_settings]}
|
|
||||||
step_config:
|
|
||||||
{get_attr: [ServiceChain, role_data, step_config]}
|
|
||||||
puppet_config: {get_attr: [ServiceChain, role_data, puppet_config]}
|
|
||||||
kolla_config:
|
|
||||||
map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
|
|
||||||
docker_config:
|
|
||||||
{get_attr: [ServiceChain, role_data, docker_config]}
|
|
||||||
docker_puppet_tasks:
|
|
||||||
{get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
|
|
||||||
host_prep_tasks:
|
|
||||||
yaql:
|
|
||||||
# Note we use distinct() here to filter any identical tasks
|
|
||||||
expression: $.data.where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
|
|
||||||
data: {get_attr: [ServiceChain, role_data]}
|
|
||||||
upgrade_tasks:
|
|
||||||
yaql:
|
|
||||||
# Note we use distinct() here to filter any identical tasks, e.g yum update for all services
|
|
||||||
expression: $.data.where($ != null).select($.get('upgrade_tasks')).where($ != null).flatten().distinct()
|
|
||||||
data: {get_attr: [ServiceChain, role_data]}
|
|
||||||
upgrade_batch_tasks:
|
|
||||||
yaql:
|
|
||||||
# Note we use distinct() here to filter any identical tasks, e.g yum update for all services
|
|
||||||
expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
|
|
||||||
data: {get_attr: [ServiceChain, role_data]}
|
|
||||||
service_metadata_settings:
|
|
||||||
get_attr: [PuppetServices, role_data, service_metadata_settings]
|
|
@ -35,8 +35,6 @@ resource_registry:
|
|||||||
OS::TripleO::PostDeploySteps: ../docker/post.yaml
|
OS::TripleO::PostDeploySteps: ../docker/post.yaml
|
||||||
OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml
|
OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml
|
||||||
|
|
||||||
OS::TripleO::Services: ../docker/services/services.yaml
|
|
||||||
|
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
# Defaults to 'tripleoupstream'. Specify a local docker registry
|
# Defaults to 'tripleoupstream'. Specify a local docker registry
|
||||||
# Example: 192.168.24.1:8787/tripleoupstream
|
# Example: 192.168.24.1:8787/tripleoupstream
|
||||||
|
@ -2,7 +2,6 @@ resource_registry:
|
|||||||
# This can be used when you don't want to run puppet on the host,
|
# This can be used when you don't want to run puppet on the host,
|
||||||
# e.g atomic, but it has been replaced with OS::TripleO::Services::Docker
|
# e.g atomic, but it has been replaced with OS::TripleO::Services::Docker
|
||||||
# OS::TripleO::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
|
# OS::TripleO::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
|
||||||
OS::TripleO::Services::Docker: ../puppet/services/docker.yaml
|
|
||||||
# The compute node still needs extra initialization steps
|
# The compute node still needs extra initialization steps
|
||||||
OS::TripleO::Compute::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
|
OS::TripleO::Compute::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
|
||||||
|
|
||||||
@ -51,8 +50,6 @@ resource_registry:
|
|||||||
OS::TripleO::PostDeploySteps: ../docker/post.yaml
|
OS::TripleO::PostDeploySteps: ../docker/post.yaml
|
||||||
OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml
|
OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml
|
||||||
|
|
||||||
OS::TripleO::Services: ../docker/services/services.yaml
|
|
||||||
|
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
# To specify a local docker registry, enable these
|
# To specify a local docker registry, enable these
|
||||||
# where 192.168.24.1 is the host running docker-distribution
|
# where 192.168.24.1 is the host running docker-distribution
|
||||||
|
@ -106,7 +106,7 @@ resource_registry:
|
|||||||
OS::TripleO::UpgradeConfig: puppet/upgrade_config.yaml
|
OS::TripleO::UpgradeConfig: puppet/upgrade_config.yaml
|
||||||
|
|
||||||
# services
|
# services
|
||||||
OS::TripleO::Services: puppet/services/services.yaml
|
OS::TripleO::Services: services.yaml
|
||||||
OS::TripleO::Services::Apache: puppet/services/apache.yaml
|
OS::TripleO::Services::Apache: puppet/services/apache.yaml
|
||||||
OS::TripleO::Services::CACerts: puppet/services/ca-certs.yaml
|
OS::TripleO::Services::CACerts: puppet/services/ca-certs.yaml
|
||||||
OS::TripleO::Services::CephMds: OS::Heat::None
|
OS::TripleO::Services::CephMds: OS::Heat::None
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#FIXME move into common when specfile adds it
|
||||||
heat_template_version: pike
|
heat_template_version: pike
|
||||||
|
|
||||||
description: >
|
description: >
|
||||||
@ -127,3 +128,17 @@ outputs:
|
|||||||
expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
|
expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
|
||||||
data: {get_attr: [ServiceChain, role_data]}
|
data: {get_attr: [ServiceChain, role_data]}
|
||||||
service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]}
|
service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]}
|
||||||
|
|
||||||
|
# Keys to support docker/services
|
||||||
|
puppet_config: {get_attr: [ServiceChain, role_data, puppet_config]}
|
||||||
|
kolla_config:
|
||||||
|
map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
|
||||||
|
docker_config:
|
||||||
|
{get_attr: [ServiceChain, role_data, docker_config]}
|
||||||
|
docker_puppet_tasks:
|
||||||
|
{get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
|
||||||
|
host_prep_tasks:
|
||||||
|
yaql:
|
||||||
|
# Note we use distinct() here to filter any identical tasks
|
||||||
|
expression: $.data.where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
|
||||||
|
data: {get_attr: [ServiceChain, role_data]}
|
@ -219,12 +219,10 @@ def validate(filename):
|
|||||||
|
|
||||||
# qdr aliases rabbitmq service to provide alternative messaging backend
|
# qdr aliases rabbitmq service to provide alternative messaging backend
|
||||||
if (filename.startswith('./puppet/services/') and
|
if (filename.startswith('./puppet/services/') and
|
||||||
filename not in ['./puppet/services/services.yaml',
|
filename not in ['./puppet/services/qdr.yaml']):
|
||||||
'./puppet/services/qdr.yaml']):
|
|
||||||
retval = validate_service(filename, tpl)
|
retval = validate_service(filename, tpl)
|
||||||
|
|
||||||
if (filename.startswith('./docker/services/') and
|
if filename.startswith('./docker/services/'):
|
||||||
filename != './docker/services/services.yaml'):
|
|
||||||
retval = validate_docker_service(filename, tpl)
|
retval = validate_docker_service(filename, tpl)
|
||||||
|
|
||||||
if filename.endswith('hyperconverged-ceph.yaml'):
|
if filename.endswith('hyperconverged-ceph.yaml'):
|
||||||
|
Loading…
Reference in New Issue
Block a user