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
cec8da28
Commit
cec8da28
authored
Mar 10, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change orchestrator type name
parent
b2ee3454
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
__main__.py
deployer/__main__.py
+2
-1
ansible_service.py
deployer/service/ansible_service.py
+2
-2
tosca.py
deployer/service/tosca.py
+1
-1
docker-compose.yml
docker-compose.yml
+7
-7
No files found.
deployer/__main__.py
View file @
cec8da28
...
...
@@ -144,8 +144,9 @@ if __name__ == "__main__":
thread
=
Thread
(
target
=
threaded_function
,
args
=
(
1
,))
thread
.
start
()
start
(
channel
)
except
:
except
Exception
as
e
:
done
=
True
e
=
sys
.
exc_info
()[
0
]
logger
.
info
(
"Error: "
+
str
(
e
))
print
(
e
)
exit
(
-
1
)
deployer/service/ansible_service.py
View file @
cec8da28
...
...
@@ -95,8 +95,8 @@ def write_playbooks_from_tosca_interface(interfaces, tmp_path):
def
run
(
inventory_path
,
playbook_path
):
logger
.
info
(
"Executing playbook: "
+
str
(
playbook_path
))
p
=
Popen
([
"ansible-playbook"
,
"-i"
,
inventory_path
,
playbook_path
],
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
)
p
=
Popen
([
"ansible-playbook"
,
"-i"
,
inventory_path
,
playbook_path
,
'--ssh-common-args=
\'
-o '
'StrictHostKeyChecking=no
\'
'
],
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
)
output
,
err
=
p
.
communicate
()
# print(output.decode('utf-8'))
# print(err.decode('utf-8'))
...
...
deployer/service/tosca.py
View file @
cec8da28
...
...
@@ -6,7 +6,7 @@ logger = logging.getLogger(__name__)
def
get_interfaces
(
tosca_template_dict
):
node_templates
=
tosca_template_dict
[
'topology_template'
][
'node_templates'
]
for
node_name
in
node_templates
:
if
node_templates
[
node_name
][
'type'
]
==
'tosca.nodes.ARTICONF.Orchestrator.Kubernetes'
:
if
node_templates
[
node_name
][
'type'
]
==
'tosca.nodes.ARTICONF.
docker.
Orchestrator.Kubernetes'
:
logger
.
info
(
"Returning interfaces from tosca_template: "
+
str
(
node_templates
[
node_name
][
'interfaces'
]))
return
node_templates
[
node_name
][
'interfaces'
]
...
...
docker-compose.yml
View file @
cec8da28
...
...
@@ -126,13 +126,13 @@ services:
RABBITMQ_HOST
:
rabbit
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
deployer
:
depends_on
:
-
rabbit
-
sure-tosca
image
:
alogo53/deployer:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
#
deployer:
#
depends_on:
#
- rabbit
#
- sure-tosca
#
image: alogo53/deployer:3.0.0
#
environment:
#
RABBITMQ_HOST: rabbit
#volumes:
...
...
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