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
6f681612
Commit
6f681612
authored
Apr 15, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deployer works with playbooks. Missing the k8s dashboard
parent
f07e3772
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
140 additions
and
30 deletions
+140
-30
application_example_2_topologies.yaml
TOSCA/application_example_2_topologies.yaml
+31
-0
application_example_updated.yaml
TOSCA/application_example_updated.yaml
+31
-1
lifeWatch_vre1.yaml
TOSCA/lifeWatch_vre1.yaml
+30
-1
nodes.yaml
TOSCA/types/nodes.yaml
+1
-8
requirements.txt
deployer/requirements.txt
+1
-1
deploy_service.py
deployer/service/deploy_service.py
+7
-3
sure_tosca.py
deployer/service/sure_tosca.py
+0
-0
docker-compose.yml
docker-compose.yml
+12
-12
planner.py
planner/planner/planner.py
+8
-0
requirements.txt
planner/requirements.txt
+4
-4
tosca_helper.py
planner/util/tosca_helper.py
+15
-0
No files found.
TOSCA/application_example_2_topologies.yaml
View file @
6f681612
...
...
@@ -124,6 +124,37 @@ topology_template:
file
:
"
alogo53/ws-pema-lifewatch"
repository
:
"
docker_hub"
type
:
"
tosca.artifacts.Deployment.Image.Container.Docker"
interfaces
:
Kubernetes
:
type
:
tosca.interfaces.ARTICONF.Kubernetes
delete
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
delete_service.yml
create
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
create_service.yml
scale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
scale_service.yml
replicas
:
1
autoscale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
autoscale_service.yml
horizontal_pod_autoscaler
:
horizontal_pod_autoscaler.yml
info
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
get_info_service.yml
description
:
"
TOSCA
example"
imports
:
-
nodes
:
"
https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
...
...
TOSCA/application_example_updated.yaml
View file @
6f681612
...
...
@@ -33,7 +33,37 @@ topology_template:
image
:
type
:
tosca.artifacts.Deployment.Image.Container.Docker
file
:
mongo:3
repository
:
docker_hub
repository
:
docker_hub
interfaces
:
Kubernetes
:
delete
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
delete_service.yml
create
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
create_service.yml
scale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
scale_service.yml
replicas
:
1
autoscale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
autoscale_service.yml
horizontal_pod_autoscaler
:
horizontal_pod_autoscaler.yml
info
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
get_info_service.yml
policies
:
-
scalability
:
...
...
TOSCA/lifeWatch_vre1.yaml
View file @
6f681612
...
...
@@ -26,7 +26,36 @@ topology_template:
image
:
type
:
tosca.artifacts.Deployment.Image.Container.Docker
file
:
alogo53/ws-pema-lifewatch
repository
:
docker_hub
repository
:
docker_hub
interfaces
:
Kubernetes
:
delete
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
delete_service.yml
create
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
create_service.yml
scale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
scale_service.yml
replicas
:
1
autoscale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
autoscale_service.yml
horizontal_pod_autoscaler
:
horizontal_pod_autoscaler.yml
info
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
get_info_service.yml
topology
:
...
...
TOSCA/types/nodes.yaml
View file @
6f681612
...
...
@@ -49,13 +49,6 @@ node_types:
type
:
string
required
:
false
description
:
url of the service
interfaces
:
Kubernetes
:
create
:
implementation
:
image
inputs
:
strategy
:
type
:
Recreate
interfaces
:
Kubernetes
:
type
:
tosca.interfaces.ARTICONF.Kubernetes
...
...
@@ -68,7 +61,7 @@ node_types:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbooks
:
-
create_service.yml
-
create_service.yml
scale
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
...
...
deployer/requirements.txt
View file @
6f681612
...
...
@@ -11,4 +11,4 @@ six==1.14.0
python_dateutil==2.8.1
setuptools==46.1.3
urllib3==1.25.8
kubernetes==11.0.0
\ No newline at end of file
deployer/service/deploy_service.py
View file @
6f681612
...
...
@@ -18,7 +18,11 @@ class DeployService:
source
=
nodes_pair
[
1
]
interface_types
=
tosca_helper
.
get_interface_types
(
source
)
if
interface_types
and
'Standard'
in
interface_types
:
ansible_service
=
AnsibleService
(
self
.
semaphore_base_url
,
self
.
semaphore_username
,
self
.
semaphore_password
)
ansible_service
.
execute
(
nodes_pair
)
if
interface_types
:
if
'Standard'
in
interface_types
:
ansible_service
=
AnsibleService
(
self
.
semaphore_base_url
,
self
.
semaphore_username
,
self
.
semaphore_password
)
ansible_service
.
execute
(
nodes_pair
)
else
:
print
(
interface_types
)
return
None
deployer/service/sure_tosca.py
deleted
100644 → 0
View file @
f07e3772
docker-compose.yml
View file @
6f681612
...
...
@@ -20,7 +20,7 @@ services:
-
"
3306:3306"
semaphore
:
image
:
a
nsiblesemaphore/
semaphore
image
:
a
logo53/docker_ansible_
semaphore
environment
:
SEMAPHORE_DB_USER
:
semaphore
SEMAPHORE_DB_PASS
:
semaphore
...
...
@@ -61,7 +61,7 @@ services:
-
rabbit
-
mongo
-
sure-tosca
image
:
manager:3.0.0
image
:
alogo53/manager:3.0.0
#
manager:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
MONGO_HOST
:
mongo
...
...
@@ -78,7 +78,7 @@ services:
depends_on
:
-
rabbit
-
sure-tosca
image
:
planner:3.0.0
image
:
alogo53/planner:3.0.0
#
planner:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
...
...
@@ -86,19 +86,19 @@ services:
depends_on
:
-
rabbit
-
sure-tosca
image
:
provisioner:3.0.0
image
:
alogo53/provisioner:3.0.0
#
provisioner:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
#
deployer:
#
depends_on:
#
- rabbit
#
- sure-tosca
#image:
deployer:3.0.0
#
environment:
#
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
#
deployer:3.0.0
environment
:
RABBITMQ_HOST
:
rabbit
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
#volumes:
...
...
planner/planner/planner.py
View file @
6f681612
...
...
@@ -158,6 +158,7 @@ class Planner:
""" Resolve requirements. Go over all nodes and recursively resolve requirements till node has no
requirements e.g. docker -> k8s -> cluster -> vm """
for
node
in
self
.
tosca_template
.
nodetemplates
:
self
.
add_interfaces
(
node
)
self
.
add_required_nodes
(
node
)
return
self
.
add_required_nodes_to_template
(
self
.
required_nodes
)
...
...
@@ -295,3 +296,10 @@ class Planner:
if
parent_node_type_name
==
self
.
all_node_types
[
tosca_node_type
][
'derived_from'
]:
child_nodes
[
tosca_node_type
]
=
self
.
all_node_types
[
tosca_node_type
]
return
child_nodes
def
add_interfaces
(
self
,
node
):
# node_type_interfaces = tosca_helper.get_node_type_interfaces(node)
# node_template_interfaces = tosca_helper.get_node_template_interfaces(node)
# if not node_template_interfaces and node_type_interfaces:
# tosca_helper.add_interfaces(node,node_type_interfaces)
return
node
planner/requirements.txt
View file @
6f681612
wheel==0.34.
1
wheel==0.34.
2
pika==1.1.0
names==0.3.0
networkx==2.4
pyyaml==5.3
tosca-parser==1.7.0
matplotlib==3.1.2
\ No newline at end of file
pyyaml==5.3.1
tosca-parser==2.0.0
matplotlib==3.2.1
\ No newline at end of file
planner/util/tosca_helper.py
View file @
6f681612
...
...
@@ -270,3 +270,18 @@ def get_node_template_dict(node_template):
# print(node_template.templates)
return
node_template_dict
def
get_node_type_interfaces
(
node
):
node_type_interfaces
=
node
.
type_definition
.
interfaces
return
node_type_interfaces
def
get_node_template_interfaces
(
node
):
node_template_interfaces
=
node
.
interfaces
return
node_template_interfaces
def
add_interfaces
(
node
,
node_type_interfaces
):
# node.interfaces = node_type_interfaces
return
node
\ No newline at end of file
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