summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-17 09:46:33 +0000
committerGerrit Code Review <review@openstack.org>2017-06-17 09:46:33 +0000
commitcb0ae4a630f69bc8d2899f02f1e5ee98daa48ffc (patch)
treecbcf5a756e6493147fc5ac89fc9a05147a4cd68f
parentad3d0da798addf6905957029bdbdfe2d509cc008 (diff)
parent316cc2572d0a255d466fb7f9aa74de3b8ccb6831 (diff)
Merge "Remove duplicate docker/puppet services.yaml"
-rw-r--r--common/README1
-rw-r--r--docker/services/services.yaml105
-rw-r--r--environments/docker-services-tls-everywhere.yaml2
-rw-r--r--environments/docker.yaml3
-rw-r--r--overcloud-resource-registry-puppet.j2.yaml2
-rw-r--r--services.yaml (renamed from puppet/services/services.yaml)15
-rwxr-xr-xtools/yaml-validate.py6
7 files changed, 19 insertions, 115 deletions
diff --git a/common/README b/common/README
new file mode 100644
index 0000000..6a52311
--- /dev/null
+++ b/common/README
@@ -0,0 +1 @@
This will contain some common templates but it needs to be added to the RPM spec first
diff --git a/docker/services/services.yaml b/docker/services/services.yaml
deleted file mode 100644
index 2ad3b63..0000000
--- a/docker/services/services.yaml
+++ /dev/null
@@ -1,105 +0,0 @@
1heat_template_version: pike
2
3description: >
4 Utility stack to convert an array of services into a set of combined
5 role configs.
6
7parameters:
8 Services:
9 default: []
10 description: |
11 List nested stack service templates.
12 type: comma_delimited_list
13 ServiceNetMap:
14 default: {}
15 description: Mapping of service_name -> network name. Typically set
16 via parameter_defaults in the resource registry. This
17 mapping overrides those in ServiceNetMapDefaults.
18 type: json
19 EndpointMap:
20 default: {}
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
23 type: json
24 DefaultPasswords:
25 default: {}
26 description: Mapping of service -> default password. Used to help
27 pass top level passwords managed by Heat into services.
28 type: json
29 RoleName:
30 default: ''
31 description: Role name on which the service is applied
32 type: string
33 RoleParameters:
34 default: {}
35 description: Parameters specific to the role
36 type: json
37
38resources:
39
40 PuppetServices:
41 type: ../../puppet/services/services.yaml
42 properties:
43 Services: {get_param: Services}
44 ServiceNetMap: {get_param: ServiceNetMap}
45 EndpointMap: {get_param: EndpointMap}
46 DefaultPasswords: {get_param: DefaultPasswords}
47 RoleName: {get_param: RoleName}
48 RoleParameters: {get_param: RoleParameters}
49
50 ServiceChain:
51 type: OS::Heat::ResourceChain
52 properties:
53 resources: {get_param: Services}
54 concurrent: true
55 resource_properties:
56 ServiceNetMap: {get_param: ServiceNetMap}
57 EndpointMap: {get_param: EndpointMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
59 RoleName: {get_param: RoleName}
60 RoleParameters: {get_param: RoleParameters}
61
62outputs:
63 role_data:
64 description: Combined Role data for this set of services.
65 value:
66 service_names:
67 {get_attr: [PuppetServices, role_data, service_names]}
68 monitoring_subscriptions:
69 {get_attr: [PuppetServices, role_data, monitoring_subscriptions]}
70 logging_sources:
71 {get_attr: [PuppetServices, role_data, logging_sources]}
72 logging_groups:
73 {get_attr: [PuppetServices, role_data, logging_groups]}
74 service_config_settings:
75 {get_attr: [PuppetServices, role_data, service_config_settings]}
76 config_settings:
77 {get_attr: [PuppetServices, role_data, config_settings]}
78 global_config_settings:
79 {get_attr: [PuppetServices, role_data, global_config_settings]}
80 step_config:
81 {get_attr: [ServiceChain, role_data, step_config]}
82 puppet_config: {get_attr: [ServiceChain, role_data, puppet_config]}
83 kolla_config:
84 map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
85 docker_config:
86 {get_attr: [ServiceChain, role_data, docker_config]}
87 docker_puppet_tasks:
88 {get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
89 host_prep_tasks:
90 yaql:
91 # Note we use distinct() here to filter any identical tasks
92 expression: $.data.where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
93 data: {get_attr: [ServiceChain, role_data]}
94 upgrade_tasks:
95 yaql:
96 # Note we use distinct() here to filter any identical tasks, e.g yum update for all services
97 expression: $.data.where($ != null).select($.get('upgrade_tasks')).where($ != null).flatten().distinct()
98 data: {get_attr: [ServiceChain, role_data]}
99 upgrade_batch_tasks:
100 yaql:
101 # Note we use distinct() here to filter any identical tasks, e.g yum update for all services
102 expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
103 data: {get_attr: [ServiceChain, role_data]}
104 service_metadata_settings:
105 get_attr: [PuppetServices, role_data, service_metadata_settings]
diff --git a/environments/docker-services-tls-everywhere.yaml b/environments/docker-services-tls-everywhere.yaml
index 2740664..f1e3d96 100644
--- a/environments/docker-services-tls-everywhere.yaml
+++ b/environments/docker-services-tls-everywhere.yaml
@@ -35,8 +35,6 @@ resource_registry:
35 OS::TripleO::PostDeploySteps: ../docker/post.yaml 35 OS::TripleO::PostDeploySteps: ../docker/post.yaml
36 OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml 36 OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml
37 37
38 OS::TripleO::Services: ../docker/services/services.yaml
39
40parameter_defaults: 38parameter_defaults:
41 # Defaults to 'tripleoupstream'. Specify a local docker registry 39 # Defaults to 'tripleoupstream'. Specify a local docker registry
42 # Example: 192.168.24.1:8787/tripleoupstream 40 # Example: 192.168.24.1:8787/tripleoupstream
diff --git a/environments/docker.yaml b/environments/docker.yaml
index 4e938e6..104f8fc 100644
--- a/environments/docker.yaml
+++ b/environments/docker.yaml
@@ -2,7 +2,6 @@ resource_registry:
2 # This can be used when you don't want to run puppet on the host, 2 # This can be used when you don't want to run puppet on the host,
3 # e.g atomic, but it has been replaced with OS::TripleO::Services::Docker 3 # e.g atomic, but it has been replaced with OS::TripleO::Services::Docker
4 # OS::TripleO::NodeUserData: ../docker/firstboot/setup_docker_host.yaml 4 # OS::TripleO::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
5 OS::TripleO::Services::Docker: ../puppet/services/docker.yaml
6 # The compute node still needs extra initialization steps 5 # The compute node still needs extra initialization steps
7 OS::TripleO::Compute::NodeUserData: ../docker/firstboot/setup_docker_host.yaml 6 OS::TripleO::Compute::NodeUserData: ../docker/firstboot/setup_docker_host.yaml
8 7
@@ -60,8 +59,6 @@ resource_registry:
60 OS::TripleO::PostDeploySteps: ../docker/post.yaml 59 OS::TripleO::PostDeploySteps: ../docker/post.yaml
61 OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml 60 OS::TripleO::PostUpgradeSteps: ../docker/post-upgrade.yaml
62 61
63 OS::TripleO::Services: ../docker/services/services.yaml
64
65parameter_defaults: 62parameter_defaults:
66 # To specify a local docker registry, enable these 63 # To specify a local docker registry, enable these
67 # where 192.168.24.1 is the host running docker-distribution 64 # where 192.168.24.1 is the host running docker-distribution
diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml
index 10a19f9..4aee571 100644
--- a/overcloud-resource-registry-puppet.j2.yaml
+++ b/overcloud-resource-registry-puppet.j2.yaml
@@ -106,7 +106,7 @@ resource_registry:
106 OS::TripleO::UpgradeConfig: puppet/upgrade_config.yaml 106 OS::TripleO::UpgradeConfig: puppet/upgrade_config.yaml
107 107
108 # services 108 # services
109 OS::TripleO::Services: puppet/services/services.yaml 109 OS::TripleO::Services: services.yaml
110 OS::TripleO::Services::Apache: puppet/services/apache.yaml 110 OS::TripleO::Services::Apache: puppet/services/apache.yaml
111 OS::TripleO::Services::CACerts: puppet/services/ca-certs.yaml 111 OS::TripleO::Services::CACerts: puppet/services/ca-certs.yaml
112 OS::TripleO::Services::CephMds: OS::Heat::None 112 OS::TripleO::Services::CephMds: OS::Heat::None
diff --git a/puppet/services/services.yaml b/services.yaml
index 0e7b6d2..724727b 100644
--- a/puppet/services/services.yaml
+++ b/services.yaml
@@ -1,3 +1,4 @@
1#FIXME move into common when specfile adds it
1heat_template_version: pike 2heat_template_version: pike
2 3
3description: > 4description: >
@@ -127,3 +128,17 @@ outputs:
127 expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct() 128 expression: $.data.where($ != null).select($.get('upgrade_batch_tasks')).where($ != null).flatten().distinct()
128 data: {get_attr: [ServiceChain, role_data]} 129 data: {get_attr: [ServiceChain, role_data]}
129 service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]} 130 service_metadata_settings: {get_attr: [ServiceServerMetadataHook, metadata]}
131
132 # Keys to support docker/services
133 puppet_config: {get_attr: [ServiceChain, role_data, puppet_config]}
134 kolla_config:
135 map_merge: {get_attr: [ServiceChain, role_data, kolla_config]}
136 docker_config:
137 {get_attr: [ServiceChain, role_data, docker_config]}
138 docker_puppet_tasks:
139 {get_attr: [ServiceChain, role_data, docker_puppet_tasks]}
140 host_prep_tasks:
141 yaql:
142 # Note we use distinct() here to filter any identical tasks
143 expression: $.data.where($ != null).select($.get('host_prep_tasks')).where($ != null).flatten().distinct()
144 data: {get_attr: [ServiceChain, role_data]}
diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py
index 92d76d2..0fd4bcc 100755
--- a/tools/yaml-validate.py
+++ b/tools/yaml-validate.py
@@ -219,12 +219,10 @@ def validate(filename):
219 219
220 # qdr aliases rabbitmq service to provide alternative messaging backend 220 # qdr aliases rabbitmq service to provide alternative messaging backend
221 if (filename.startswith('./puppet/services/') and 221 if (filename.startswith('./puppet/services/') and
222 filename not in ['./puppet/services/services.yaml', 222 filename not in ['./puppet/services/qdr.yaml']):
223 './puppet/services/qdr.yaml']):
224 retval = validate_service(filename, tpl) 223 retval = validate_service(filename, tpl)
225 224
226 if (filename.startswith('./docker/services/') and 225 if filename.startswith('./docker/services/'):
227 filename != './docker/services/services.yaml'):
228 retval = validate_docker_service(filename, tpl) 226 retval = validate_docker_service(filename, tpl)
229 227
230 if filename.endswith('hyperconverged-ceph.yaml'): 228 if filename.endswith('hyperconverged-ceph.yaml'):