Commit 8edc8b29 authored by Spiros Koulouzis's avatar Spiros Koulouzis

always set namespace

parent 8e9dc5fb
...@@ -62,10 +62,8 @@ class AnsibleService: ...@@ -62,10 +62,8 @@ class AnsibleService:
environment_id=environment_id) environment_id=environment_id)
if self.semaphore_helper.get_task(project_id, task_id).status != 'success': if self.semaphore_helper.get_task(project_id, task_id).status != 'success':
break break
logger.info('playbook: ' + playbook_name + ' task_id: ' + str(task_id)) # logger.info('playbook: ' + playbook_name + ' task_id: ' + str(task_id))
tasks_outputs[task_id] = self.semaphore_helper.get_task_outputs(project_id, task_id) tasks_outputs[task_id] = self.semaphore_helper.get_task_outputs(project_id, task_id)
for out in tasks_outputs[task_id]:
logger.info('out: ' + out.output)
if 'configure' in interface and self.semaphore_helper.get_task(project_id, task_id).status == 'success': if 'configure' in interface and self.semaphore_helper.get_task(project_id, task_id).status == 'success':
configure = interface['configure'] configure = interface['configure']
...@@ -80,10 +78,8 @@ class AnsibleService: ...@@ -80,10 +78,8 @@ class AnsibleService:
environment_id=environment_id) environment_id=environment_id)
if self.semaphore_helper.get_task(project_id, task_id).status != 'success': if self.semaphore_helper.get_task(project_id, task_id).status != 'success':
break break
logger.info('playbook: ' + playbook_name + ' task_id: ' + str(task_id)) # logger.info('playbook: ' + playbook_name + ' task_id: ' + str(task_id))
tasks_outputs[task_id] = self.semaphore_helper.get_task_outputs(project_id, task_id) tasks_outputs[task_id] = self.semaphore_helper.get_task_outputs(project_id, task_id)
for out in tasks_outputs[task_id]:
logger.info('out: ' + out.output)
return tasks_outputs return tasks_outputs
def build_yml_inventory(self, vms): def build_yml_inventory(self, vms):
......
...@@ -50,7 +50,7 @@ class DeployService: ...@@ -50,7 +50,7 @@ class DeployService:
source = nodes_pair[1] source = nodes_pair[1]
env_vars = {'K8s_NAMESPACE': 'default'} env_vars = {'K8s_NAMESPACE': 'default'}
if source.node_template.type == 'tosca.nodes.QC.Container.Application.Docker': if source.node_template.type == 'tosca.nodes.QC.Container.Application.Docker':
env_vars = {'DOCKER_IMAGE':source.node_template.artifacts['image']['file']} env_vars['DOCKER_IMAGE'] = source.node_template.artifacts['image']['file']
env_vars['DOCKER_SERVICE_NAME'] = source.name env_vars['DOCKER_SERVICE_NAME'] = source.name
env_vars['CONTAINER_PORT'] = source.node_template.properties['ports'][0].split(':')[1] env_vars['CONTAINER_PORT'] = source.node_template.properties['ports'][0].split(':')[1]
return env_vars return env_vars
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment