kolla_builder: use any templates except puppet

We have more and more services that use containers now, and not only
OpenShift, k8s. We now have Skydive and probably more services in
extraconfig/services that will come in the future.

This patch will use all but puppet templates to determines where are the
containers that we want to prepare with kolla.

Change-Id: I16a9e8533ba8cf1553ccac8c43f7556a71bd5b15
This commit is contained in:
Emilien Macchi 2018-06-14 14:37:55 -07:00
parent 33e8979c7f
commit 6079a5899e
2 changed files with 11 additions and 8 deletions

View File

@ -90,13 +90,9 @@ def build_service_filter(environment, roles_data):
# enabled services
return enabled_services
# Use the template path to determine if it represents a
# containerized service
containerized_services_path = ['/docker/services/',
'/services/kubernetes',
'/services/openshift']
for service, env_path in environment.get('resource_registry', {}).items():
if any(p in env_path for p in containerized_services_path):
if not any(p in env_path for p in ['/puppet/services',
'OS::Heat::None']):
containerized_services.add(service)
return containerized_services.intersection(enabled_services)

View File

@ -685,6 +685,7 @@ class TestPrepare(base.TestCase):
'OS::TripleO::Services::NovaCompute',
'OS::TripleO::Services::OpenShift::Master',
'OS::TripleO::Services::Kubernetes::Worker',
'OS::TripleO::Services::SkydiveAgent',
]),
kb.build_service_filter({
'resource_registry': {
@ -697,7 +698,11 @@ class TestPrepare(base.TestCase):
'OS::TripleO::Services::OpenShift::Master':
'extraconfig/services/openshift-master.yaml',
'OS::TripleO::Services::Kubernetes::Worker':
'extraconfig/services/kubernetes-worker.yaml'
'extraconfig/services/kubernetes-worker.yaml',
'OS::TripleO::Services::SkydiveAgent':
'extraconfig/services/skydive-agent.yaml',
'OS::TripleO::Services::Noop':
'OS::Heat::None'
}
}, [
{
@ -706,7 +711,9 @@ class TestPrepare(base.TestCase):
'ServicesDefault': [
'OS::TripleO::Services::NeutronApi',
'OS::TripleO::Services::NovaApi',
'OS::TripleO::Services::OpenShift::Master'
'OS::TripleO::Services::OpenShift::Master',
'OS::TripleO::Services::SkydiveAgent',
'OS::TripleO::Services::Noop'
]
}, {
'name': 'Compute',