Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
8edc8b29
Commit
8edc8b29
authored
Jun 16, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always set namespace
parent
8e9dc5fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
ansible_service.py
deployer/service/ansible_service.py
+2
-6
deploy_service.py
deployer/service/deploy_service.py
+1
-1
No files found.
deployer/service/ansible_service.py
View file @
8edc8b29
...
...
@@ -62,10 +62,8 @@ class AnsibleService:
environment_id
=
environment_id
)
if
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
.
status
!=
'success'
:
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
)
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'
:
configure
=
interface
[
'configure'
]
...
...
@@ -80,10 +78,8 @@ class AnsibleService:
environment_id
=
environment_id
)
if
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
.
status
!=
'success'
:
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
)
for
out
in
tasks_outputs
[
task_id
]:
logger
.
info
(
'out: '
+
out
.
output
)
return
tasks_outputs
def
build_yml_inventory
(
self
,
vms
):
...
...
deployer/service/deploy_service.py
View file @
8edc8b29
...
...
@@ -50,7 +50,7 @@ class DeployService:
source
=
nodes_pair
[
1
]
env_vars
=
{
'K8s_NAMESPACE'
:
'default'
}
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
[
'CONTAINER_PORT'
]
=
source
.
node_template
.
properties
[
'ports'
][
0
]
.
split
(
':'
)[
1
]
return
env_vars
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment