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
acd049d1
Commit
acd049d1
authored
May 14, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renames
parent
ef7d6bba
Changes
32
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
327 additions
and
335 deletions
+327
-335
application_example_2_topologies.yaml
TOSCA/application_example_2_topologies.yaml
+10
-10
application_example_outputs.yaml
TOSCA/application_example_outputs.yaml
+10
-10
application_example_planed.yaml
TOSCA/application_example_planed.yaml
+9
-9
application_example_provisioned.yaml
TOSCA/application_example_provisioned.yaml
+10
-10
application_example_updated.yaml
TOSCA/application_example_updated.yaml
+3
-3
compute.yaml
TOSCA/compute.yaml
+1
-1
kubernetes.yaml
TOSCA/kubernetes.yaml
+1
-1
lifeWatch_vre1.yaml
TOSCA/lifeWatch_vre1.yaml
+2
-2
topology.yaml
TOSCA/topology.yaml
+1
-1
artifacts.yaml
TOSCA/types/artifacts.yaml
+1
-1
capabilities.yaml
TOSCA/types/capabilities.yaml
+4
-4
data.yml
TOSCA/types/data.yml
+2
-2
interfaces.yml
TOSCA/types/interfaces.yml
+4
-4
nodes.yaml
TOSCA/types/nodes.yaml
+31
-31
policies.yaml
TOSCA/types/policies.yaml
+6
-6
Constants.java
...rc/main/java/nl/uva/sne/drip/commons/utils/Constants.java
+6
-6
__main__.py
deployer/__main__.py
+56
-78
properties.ini
deployer/properties.ini
+11
-0
ansible_service.py
deployer/service/ansible_service.py
+13
-14
tosca_helper.py
deployer/service/tosca_helper.py
+3
-4
docker-compose-test.yml
docker-compose/docker-compose-test.yml
+1
-1
docker-compose.yml
docker-compose/docker-compose.yml
+47
-48
nginx.conf
docker-compose/nginx.conf
+33
-27
message_delete_request.json
example_messages/message_delete_request.json
+10
-10
message_delete_response.json
example_messages/message_delete_response.json
+10
-10
message_deploy_request.json
example_messages/message_deploy_request.json
+10
-10
message_example_provisioned.json
example_messages/message_example_provisioned.json
+9
-9
message_plan_request.json
example_messages/message_plan_request.json
+1
-1
message_plan_response.json
example_messages/message_plan_response.json
+9
-9
message_provision_request.json
example_messages/message_provision_request.json
+9
-9
vre_demo.ipynb
jupyter_notebooks/vre_demo.ipynb
+3
-3
test_default_api.py
sure_tosca-client_python_stubs/test/test_default_api.py
+1
-1
No files found.
TOSCA/application_example_2_topologies.yaml
View file @
acd049d1
...
@@ -12,7 +12,7 @@ topology_template:
...
@@ -12,7 +12,7 @@ topology_template:
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
"
dumy.yaml"
create
:
"
dumy.yaml"
type
:
"
tosca.nodes.
ARTICONF
.VM.Compute"
type
:
"
tosca.nodes.
QC
.VM.Compute"
compute_1
:
compute_1
:
properties
:
properties
:
disk_size
:
"
10000
MB"
disk_size
:
"
10000
MB"
...
@@ -23,11 +23,11 @@ topology_template:
...
@@ -23,11 +23,11 @@ topology_template:
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
"
dumy.yaml"
create
:
"
dumy.yaml"
type
:
"
tosca.nodes.
ARTICONF
.VM.Compute"
type
:
"
tosca.nodes.
QC
.VM.Compute"
kubernetes
:
kubernetes
:
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM.topology"
capability
:
"
tosca.capabilities.
QC
.VM.topology"
node
:
"
topology"
node
:
"
topology"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
interfaces
:
interfaces
:
...
@@ -41,14 +41,14 @@ topology_template:
...
@@ -41,14 +41,14 @@ topology_template:
delete
:
delete
:
inputs
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
type
:
"
tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
type
:
"
tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
topology
:
topology
:
properties
:
properties
:
domain
:
"
Frankfurt"
domain
:
"
Frankfurt"
provider
:
"
EC2"
provider
:
"
EC2"
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM"
capability
:
"
tosca.capabilities.
QC
.VM"
node
:
"
compute_1"
node
:
"
compute_1"
relationship
:
"
tosca.relationships.DependsOn"
relationship
:
"
tosca.relationships.DependsOn"
interfaces
:
interfaces
:
...
@@ -73,14 +73,14 @@ topology_template:
...
@@ -73,14 +73,14 @@ topology_template:
inputs
:
inputs
:
code_type
:
"
SEQ"
code_type
:
"
SEQ"
object_type
:
"
SubTopology"
object_type
:
"
SubTopology"
type
:
"
tosca.nodes.
ARTICONF
.VM.topology"
type
:
"
tosca.nodes.
QC
.VM.topology"
topology_1
:
topology_1
:
properties
:
properties
:
domain
:
"
Frankfurt"
domain
:
"
Frankfurt"
provider
:
"
EC2"
provider
:
"
EC2"
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM"
capability
:
"
tosca.capabilities.
QC
.VM"
node
:
"
compute_1"
node
:
"
compute_1"
relationship
:
"
tosca.relationships.DependsOn"
relationship
:
"
tosca.relationships.DependsOn"
interfaces
:
interfaces
:
...
@@ -105,7 +105,7 @@ topology_template:
...
@@ -105,7 +105,7 @@ topology_template:
inputs
:
inputs
:
code_type
:
"
SEQ"
code_type
:
"
SEQ"
object_type
:
"
SubTopology"
object_type
:
"
SubTopology"
type
:
"
tosca.nodes.
ARTICONF
.VM.topology"
type
:
"
tosca.nodes.
QC
.VM.topology"
artifacts
:
artifacts
:
provisioned_files
:
provisioned_files
:
required
:
false
required
:
false
...
@@ -116,10 +116,10 @@ topology_template:
...
@@ -116,10 +116,10 @@ topology_template:
-
"
30001:8080"
-
"
30001:8080"
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
"
tosca.capabilities.
ARTICONF
.docker.Orchestrator"
capability
:
"
tosca.capabilities.
QC
.docker.Orchestrator"
node
:
"
kubernetes"
node
:
"
kubernetes"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
type
:
"
tosca.nodes.
ARTICONF
.Container.Application.Docker"
type
:
"
tosca.nodes.
QC
.Container.Application.Docker"
artifacts
:
artifacts
:
image
:
image
:
file
:
"
alogo53/ws-pema-lifewatch"
file
:
"
alogo53/ws-pema-lifewatch"
...
...
TOSCA/application_example_outputs.yaml
View file @
acd049d1
...
@@ -11,7 +11,7 @@ topology_template:
...
@@ -11,7 +11,7 @@ topology_template:
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
"
dumy.yaml"
create
:
"
dumy.yaml"
type
:
"
tosca.nodes.
ARTICONF
.VM.Compute"
type
:
"
tosca.nodes.
QC
.VM.Compute"
compute_1
:
compute_1
:
properties
:
properties
:
disk_size
:
"
10000
MB"
disk_size
:
"
10000
MB"
...
@@ -22,11 +22,11 @@ topology_template:
...
@@ -22,11 +22,11 @@ topology_template:
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
"
dumy.yaml"
create
:
"
dumy.yaml"
type
:
"
tosca.nodes.
ARTICONF
.VM.Compute"
type
:
"
tosca.nodes.
QC
.VM.Compute"
kubernetes
:
kubernetes
:
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM.topology"
capability
:
"
tosca.capabilities.
QC
.VM.topology"
node
:
"
topology"
node
:
"
topology"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
interfaces
:
interfaces
:
...
@@ -40,14 +40,14 @@ topology_template:
...
@@ -40,14 +40,14 @@ topology_template:
delete
:
delete
:
inputs
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
type
:
"
tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
type
:
"
tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
topology
:
topology
:
properties
:
properties
:
domain
:
"
Frankfurt"
domain
:
"
Frankfurt"
provider
:
"
EC2"
provider
:
"
EC2"
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM"
capability
:
"
tosca.capabilities.
QC
.VM"
node
:
"
compute_1"
node
:
"
compute_1"
relationship
:
"
tosca.relationships.DependsOn"
relationship
:
"
tosca.relationships.DependsOn"
interfaces
:
interfaces
:
...
@@ -72,14 +72,14 @@ topology_template:
...
@@ -72,14 +72,14 @@ topology_template:
inputs
:
inputs
:
code_type
:
"
SEQ"
code_type
:
"
SEQ"
object_type
:
"
SubTopology"
object_type
:
"
SubTopology"
type
:
"
tosca.nodes.
ARTICONF
.VM.topology"
type
:
"
tosca.nodes.
QC
.VM.topology"
topology_1
:
topology_1
:
properties
:
properties
:
domain
:
"
Frankfurt"
domain
:
"
Frankfurt"
provider
:
"
EC2"
provider
:
"
EC2"
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM"
capability
:
"
tosca.capabilities.
QC
.VM"
node
:
"
compute_1"
node
:
"
compute_1"
relationship
:
"
tosca.relationships.DependsOn"
relationship
:
"
tosca.relationships.DependsOn"
interfaces
:
interfaces
:
...
@@ -104,7 +104,7 @@ topology_template:
...
@@ -104,7 +104,7 @@ topology_template:
inputs
:
inputs
:
code_type
:
"
SEQ"
code_type
:
"
SEQ"
object_type
:
"
SubTopology"
object_type
:
"
SubTopology"
type
:
"
tosca.nodes.
ARTICONF
.VM.topology"
type
:
"
tosca.nodes.
QC
.VM.topology"
artifacts
:
artifacts
:
provisioned_files
:
provisioned_files
:
required
:
false
required
:
false
...
@@ -115,10 +115,10 @@ topology_template:
...
@@ -115,10 +115,10 @@ topology_template:
-
"
30001:8080"
-
"
30001:8080"
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
"
tosca.capabilities.
ARTICONF
.docker.Orchestrator"
capability
:
"
tosca.capabilities.
QC
.docker.Orchestrator"
node
:
"
kubernetes"
node
:
"
kubernetes"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
type
:
"
tosca.nodes.
ARTICONF
.Container.Application.Docker"
type
:
"
tosca.nodes.
QC
.Container.Application.Docker"
artifacts
:
artifacts
:
image
:
image
:
file
:
"
alogo53/ws-pema-lifewatch"
file
:
"
alogo53/ws-pema-lifewatch"
...
...
TOSCA/application_example_planed.yaml
View file @
acd049d1
...
@@ -11,7 +11,7 @@ topology_template:
...
@@ -11,7 +11,7 @@ topology_template:
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
"
dumy.yaml"
create
:
"
dumy.yaml"
type
:
"
tosca.nodes.
ARTICONF
.VM.Compute"
type
:
"
tosca.nodes.
QC
.VM.Compute"
compute_1
:
compute_1
:
properties
:
properties
:
disk_size
:
"
10000
MB"
disk_size
:
"
10000
MB"
...
@@ -22,11 +22,11 @@ topology_template:
...
@@ -22,11 +22,11 @@ topology_template:
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
"
dumy.yaml"
create
:
"
dumy.yaml"
type
:
"
tosca.nodes.
ARTICONF
.VM.Compute"
type
:
"
tosca.nodes.
QC
.VM.Compute"
kubernetes
:
kubernetes
:
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM.topology"
capability
:
"
tosca.capabilities.
QC
.VM.topology"
node
:
"
topology"
node
:
"
topology"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
interfaces
:
interfaces
:
...
@@ -40,18 +40,18 @@ topology_template:
...
@@ -40,18 +40,18 @@ topology_template:
delete
:
delete
:
inputs
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
type
:
"
tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
type
:
"
tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
topology
:
topology
:
properties
:
properties
:
domain
:
"
Frankfurt"
domain
:
"
Frankfurt"
provider
:
"
EC2"
provider
:
"
EC2"
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM"
capability
:
"
tosca.capabilities.
QC
.VM"
node
:
"
compute"
node
:
"
compute"
relationship
:
"
tosca.relationships.DependsOn"
relationship
:
"
tosca.relationships.DependsOn"
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.
ARTICONF
.VM"
capability
:
"
tosca.capabilities.
QC
.VM"
node
:
"
compute_1"
node
:
"
compute_1"
relationship
:
"
tosca.relationships.DependsOn"
relationship
:
"
tosca.relationships.DependsOn"
interfaces
:
interfaces
:
...
@@ -76,7 +76,7 @@ topology_template:
...
@@ -76,7 +76,7 @@ topology_template:
inputs
:
inputs
:
code_type
:
"
SEQ"
code_type
:
"
SEQ"
object_type
:
"
SubTopology"
object_type
:
"
SubTopology"
type
:
"
tosca.nodes.
ARTICONF
.VM.topology"
type
:
"
tosca.nodes.
QC
.VM.topology"
artifacts
:
artifacts
:
provisioned_files
:
provisioned_files
:
required
:
false
required
:
false
...
@@ -87,10 +87,10 @@ topology_template:
...
@@ -87,10 +87,10 @@ topology_template:
-
"
30001:8080"
-
"
30001:8080"
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
"
tosca.capabilities.
ARTICONF
.docker.Orchestrator"
capability
:
"
tosca.capabilities.
QC
.docker.Orchestrator"
node
:
"
kubernetes"
node
:
"
kubernetes"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
type
:
"
tosca.nodes.
ARTICONF
.Container.Application.Docker"
type
:
"
tosca.nodes.
QC
.Container.Application.Docker"
artifacts
:
artifacts
:
image
:
image
:
file
:
"
alogo53/ws-pema-lifewatch"
file
:
"
alogo53/ws-pema-lifewatch"
...
...
TOSCA/application_example_provisioned.yaml
View file @
acd049d1
This diff is collapsed.
Click to expand it.
TOSCA/application_example_updated.yaml
View file @
acd049d1
...
@@ -18,7 +18,7 @@ topology_template:
...
@@ -18,7 +18,7 @@ topology_template:
node_templates
:
node_templates
:
mongo
:
mongo
:
type
:
tosca.nodes.
ARTICONF
.Container.Application.Docker
type
:
tosca.nodes.
QC
.Container.Application.Docker
properties
:
properties
:
ports
:
ports
:
-
"
30001:27017"
-
"
30001:27017"
...
@@ -67,13 +67,13 @@ topology_template:
...
@@ -67,13 +67,13 @@ topology_template:
policies
:
policies
:
-
scalability
:
-
scalability
:
type
:
tosca.policies.
ARTICONF
.Performance.CPU
type
:
tosca.policies.
QC
.Performance.CPU
targets
:
[
mongo
]
targets
:
[
mongo
]
properties
:
properties
:
constraint_name
:
cpu_load
constraint_name
:
cpu_load
max_value
:
90
max_value
:
90
-
faultTolerance
:
-
faultTolerance
:
type
:
tosca.policies.
ARTICONF
.FaultTolerance
type
:
tosca.policies.
QC
.FaultTolerance
targets
:
[
mongo
]
targets
:
[
mongo
]
properties
:
properties
:
level
:
1
level
:
1
TOSCA/compute.yaml
View file @
acd049d1
...
@@ -17,7 +17,7 @@ topology_template:
...
@@ -17,7 +17,7 @@ topology_template:
num_cores
:
2
num_cores
:
2
os
:
Ubuntu 18.04
os
:
Ubuntu 18.04
user_name
:
vm_user
user_name
:
vm_user
type
:
tosca.nodes.
ARTICONF
.VM.Compute
type
:
tosca.nodes.
QC
.VM.Compute
...
...
TOSCA/kubernetes.yaml
View file @
acd049d1
...
@@ -13,7 +13,7 @@ topology_template:
...
@@ -13,7 +13,7 @@ topology_template:
delete
:
delete
:
inputs
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
type
:
"
tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
type
:
"
tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
description
:
"
TOSCA
example"
description
:
"
TOSCA
example"
imports
:
imports
:
-
nodes
:
"
https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
-
nodes
:
"
https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
...
...
TOSCA/lifeWatch_vre1.yaml
View file @
acd049d1
...
@@ -18,7 +18,7 @@ topology_template:
...
@@ -18,7 +18,7 @@ topology_template:
node_templates
:
node_templates
:
ws-pema
:
ws-pema
:
type
:
tosca.nodes.
ARTICONF
.Container.Application.Docker
type
:
tosca.nodes.
QC
.Container.Application.Docker
properties
:
properties
:
ports
:
ports
:
-
"
30001:8080"
-
"
30001:8080"
...
@@ -59,7 +59,7 @@ topology_template:
...
@@ -59,7 +59,7 @@ topology_template:
topology
:
topology
:
type
:
tosca.nodes.
ARTICONF
.VM.topology
type
:
tosca.nodes.
QC
.VM.topology
interfaces
:
interfaces
:
CloudsStorm
:
CloudsStorm
:
provision
:
provision
:
...
...
TOSCA/topology.yaml
View file @
acd049d1
...
@@ -17,5 +17,5 @@ topology_template:
...
@@ -17,5 +17,5 @@ topology_template:
properties
:
properties
:
domain
:
Frankfurt
domain
:
Frankfurt
provider
:
EC2
provider
:
EC2
type
:
tosca.nodes.
ARTICONF
.VM.topology
type
:
tosca.nodes.
QC
.VM.topology
tosca_definitions_version
:
tosca_simple_yaml_1_0
tosca_definitions_version
:
tosca_simple_yaml_1_0
TOSCA/types/artifacts.yaml
View file @
acd049d1
...
@@ -3,7 +3,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
...
@@ -3,7 +3,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
artifacts
:
artifacts
:
tosca.datatypes.
ARTICONF
.CloudStorm.Deployment
:
tosca.datatypes.
QC
.CloudStorm.Deployment
:
derived_from
:
tosca.artifacts.Deployment
derived_from
:
tosca.artifacts.Deployment
file_contents
:
file_contents
:
type
:
string
type
:
string
...
...
TOSCA/types/capabilities.yaml
View file @
acd049d1
...
@@ -2,28 +2,28 @@ tosca_definitions_version: tosca_simple_yaml_1_0
...
@@ -2,28 +2,28 @@ tosca_definitions_version: tosca_simple_yaml_1_0
capability_types
:
capability_types
:
tosca.capabilities.
ARTICONF
.docker.Orchestrator
:
tosca.capabilities.
QC
.docker.Orchestrator
:
derived_from
:
tosca.capabilities.Container
derived_from
:
tosca.capabilities.Container
properties
:
properties
:
some_properties
:
some_properties
:
type
:
string
type
:
string
required
:
no
required
:
no
tosca.capabilities.
ARTICONF
.VM
:
tosca.capabilities.
QC
.VM
:
derived_from
:
tosca.capabilities.Compute
derived_from
:
tosca.capabilities.Compute
properties
:
properties
:
some_properties
:
some_properties
:
type
:
string
type
:
string
required
:
no
required
:
no
tosca.capabilities.
ARTICONF
.VM.topology
:
tosca.capabilities.
QC
.VM.topology
:
derived_from
:
tosca.capabilities.Compute
derived_from
:
tosca.capabilities.Compute
properties
:
properties
:
some_properties
:
some_properties
:
type
:
string
type
:
string
required
:
no
required
:
no
tosca.capabilities.
ARTICONF
.Useless
:
tosca.capabilities.
QC
.Useless
:
properties
:
properties
:
some_properties
:
some_properties
:
type
:
string
type
:
string
...
...
TOSCA/types/data.yml
View file @
acd049d1
...
@@ -3,7 +3,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
...
@@ -3,7 +3,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
data_types
:
data_types
:
tosca.datatypes.
ARTICONF
.Credential
:
tosca.datatypes.
QC
.Credential
:
derived_from
:
tosca.datatypes.Credential
derived_from
:
tosca.datatypes.Credential
properties
:
properties
:
cloud_provider_name
:
cloud_provider_name
:
...
@@ -11,7 +11,7 @@ data_types:
...
@@ -11,7 +11,7 @@ data_types:
required
:
true
required
:
true
tosca.datatypes.
ARTICONF
.coordinates
:
tosca.datatypes.
QC
.coordinates
:
derived_from
:
tosca.datatypes.Root
derived_from
:
tosca.datatypes.Root
properties
:
properties
:
longitude
:
longitude
:
...
...
TOSCA/types/interfaces.yml
View file @
acd049d1
tosca_definitions_version
:
tosca_simple_yaml_1_0
tosca_definitions_version
:
tosca_simple_yaml_1_0
interface_types
:
interface_types
:
tosca.interfaces.
ARTICONF
.CloudsStorm
:
tosca.interfaces.
QC
.CloudsStorm
:
description
:
Interface for VM topology management with CloudsStorm. More at https://cloudsstorm.github.io/
description
:
Interface for VM topology management with CloudsStorm. More at https://cloudsstorm.github.io/
derived_from
:
tosca.interfaces.node.lifecycle.Standard
derived_from
:
tosca.interfaces.node.lifecycle.Standard
inputs
:
inputs
:
...
@@ -62,7 +62,7 @@ interface_types:
...
@@ -62,7 +62,7 @@ interface_types:
description
:
Provision the defined objects (resources). ObjectType can be SubTopology or VM.
description
:
Provision the defined objects (resources). ObjectType can be SubTopology or VM.
tosca.interfaces.
ARTICONF
.Standard
:
tosca.interfaces.
QC
.Standard
:
derived_from
:
tosca.interfaces.node.lifecycle.Standard
derived_from
:
tosca.interfaces.node.lifecycle.Standard
inputs
:
inputs
:
inventory_file
:
inventory_file
:
...
@@ -75,8 +75,8 @@ interface_types:
...
@@ -75,8 +75,8 @@ interface_types:
type
:
string
type
:
string
required
:
false
required
:
false
tosca.interfaces.
ARTICONF
.Kubernetes
:
tosca.interfaces.
QC
.Kubernetes
:
derived_from
:
tosca.interfaces.
ARTICONF
.Standard
derived_from
:
tosca.interfaces.
QC
.Standard
inputs
:
inputs
:
replicas
:
replicas
:
type
:
integer
type
:
integer
...
...
TOSCA/types/nodes.yaml
View file @
acd049d1
...
@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
...
@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
node_types
:
node_types
:
tosca.nodes.
ARTICONF
.Root
:
tosca.nodes.
QC
.Root
:
description
:
root ARTICONF node
description
:
root ARTICONF node
attributes
:
attributes
:
current_state
:
current_state
:
...
@@ -15,8 +15,8 @@ node_types:
...
@@ -15,8 +15,8 @@ node_types:
description
:
the current state of the node
description
:
the current state of the node
tosca.nodes.
ARTICONF
.Container.Application.Docker
:
tosca.nodes.
QC
.Container.Application.Docker
:
derived_from
:
tosca.nodes.
ARTICONF
.Application
derived_from
:
tosca.nodes.
QC
.Application
description
:
description of container
description
:
description of container
properties
:
properties
:
ports
:
ports
:
...
@@ -41,8 +41,8 @@ node_types:
...
@@ -41,8 +41,8 @@ node_types:
required
:
false
required
:
false
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
tosca.capabilities.
ARTICONF
.docker.Orchestrator
capability
:
tosca.capabilities.
QC
.docker.Orchestrator
node
:
tosca.nodes.
ARTICONF
.docker.Orchestrator
node
:
tosca.nodes.
QC
.docker.Orchestrator
relationship
:
tosca.relationships.HostedOn
relationship
:
tosca.relationships.HostedOn
attributes
:
attributes
:
service_url
:
service_url
:
...
@@ -51,7 +51,7 @@ node_types:
...
@@ -51,7 +51,7 @@ node_types:
description
:
url of the service
description
:
url of the service
interfaces
:
interfaces
:
Kubernetes
:
Kubernetes
:
type
:
tosca.interfaces.
ARTICONF
.Kubernetes
type
:
tosca.interfaces.
QC
.Kubernetes
delete
:
delete
:
inputs
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
repository
:
https://github.com/skoulouzis/playbooks.git
...
@@ -83,17 +83,17 @@ node_types:
...
@@ -83,17 +83,17 @@ node_types:
tosca.nodes.
ARTICONF
.docker.Orchestrator
:
tosca.nodes.
QC
.docker.Orchestrator
:
derived_from
:
tosca.nodes.
ARTICONF
.Application
derived_from
:
tosca.nodes.
QC
.Application
description
:
a container orchestrator
description
:
a container orchestrator
requirements
:
requirements
:
-
host
:
-
host
:
capability
:
tosca.capabilities.
ARTICONF
.VM.topology
capability
:
tosca.capabilities.
QC
.VM.topology
node
:
tosca.nodes.
ARTICONF
.VM.topology
node
:
tosca.nodes.
QC
.VM.topology
relationship
:
tosca.relationships.HostedOn
relationship
:
tosca.relationships.HostedOn
capabilities
:
capabilities
:
orchestrator
:
orchestrator
:
type
:
tosca.capabilities.
ARTICONF
.docker.Orchestrator
type
:
tosca.capabilities.
QC
.docker.Orchestrator
host
:
host
:
type
:
tosca.capabilities.Container.Docker
type
:
tosca.capabilities.Container.Docker
container
:
container
:
...
@@ -113,8 +113,8 @@ node_types:
...
@@ -113,8 +113,8 @@ node_types:
-
greater_or_equal
:
1
-
greater_or_equal
:
1
tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes
:
tosca.nodes.
QC
.docker.Orchestrator.Kubernetes
:
derived_from
:
tosca.nodes.
ARTICONF
.docker.Orchestrator
derived_from
:
tosca.nodes.
QC
.docker.Orchestrator
description
:
Kubernetes orchestrator
description
:
Kubernetes orchestrator
attributes
:
attributes
:
tokens
:
tokens
:
...
@@ -129,7 +129,7 @@ node_types:
...
@@ -129,7 +129,7 @@ node_types:
description
:
the dashboard access url
description
:
the dashboard access url
interfaces
:
interfaces
:
Standard
:
Standard
:
type
:
tosca.interfaces.
ARTICONF
.Standard
type
:
tosca.interfaces.
QC
.Standard
create
:
create
:
inputs
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
repository
:
https://github.com/skoulouzis/playbooks.git
...
@@ -151,19 +151,19 @@ node_types:
...
@@ -151,19 +151,19 @@ node_types:
-
k8s_delete.yaml
-
k8s_delete.yaml
tosca.nodes.
ARTICONF
.VM.topology
:
tosca.nodes.
QC
.VM.topology
:
derived_from
:
tosca.nodes.
ARTICONF
.Infrastructure
derived_from
:
tosca.nodes.
QC
.Infrastructure
description
:
topology of VMs
description
:
topology of VMs
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
tosca.capabilities.
ARTICONF
.VM
capability
:
tosca.capabilities.
QC
.VM
node
:
tosca.nodes.
ARTICONF
.Infrastructure
node
:
tosca.nodes.
QC
.Infrastructure
relationship
:
tosca.relationships.DependsOn
relationship
:
tosca.relationships.DependsOn
capabilities
:
capabilities
:
scalable
:
scalable
:
type
:
tosca.capabilities.Scalable
type
:
tosca.capabilities.Scalable
topology
:
topology
:
type
:
tosca.capabilities.
ARTICONF
.VM.topology
type
:
tosca.capabilities.
QC
.VM.topology
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
...
@@ -184,12 +184,12 @@ node_types:
...
@@ -184,12 +184,12 @@ node_types:
default
:
"
EC2"
default
:
"
EC2"
description
:
The name of the provider e.g. EC2, ExoGENI etc.
description
:
The name of the provider e.g. EC2, ExoGENI etc.
coordinates
:
coordinates
:
type
:
tosca.datatypes.
ARTICONF
.coordinates
type
:
tosca.datatypes.
QC
.coordinates
required
:
false
required
:
false
description
:
The coordinates of the domain
description
:
The coordinates of the domain
attributes
:
attributes
:
ssh_keys
:
ssh_keys
:
type
:
tosca.datatypes.
ARTICONF
.Credential
type
:
tosca.datatypes.
QC
.Credential
required
:
false
required
:
false
artifacts
:
artifacts
:
provisioned_files
:
provisioned_files
:
...
@@ -197,7 +197,7 @@ node_types:
...
@@ -197,7 +197,7 @@ node_types:
required
:
false
required
:
false
interfaces
:
interfaces
:
CloudsStorm
:
CloudsStorm
:
type
:
tosca.interfaces.
ARTICONF
.CloudsStorm
type
:
tosca.interfaces.
QC
.CloudsStorm
provision
:
provision
:
inputs
:
inputs
:
code_type
:
SEQ
code_type
:
SEQ
...
@@ -219,12 +219,12 @@ node_types:
...
@@ -219,12 +219,12 @@ node_types:
code_type
:
SEQ
code_type
:
SEQ
object_type
:
SubTopology
object_type
:
SubTopology
tosca.nodes.
ARTICONF
.VM.Compute
:
tosca.nodes.
QC
.VM.Compute
:
derived_from
:
tosca.nodes.
ARTICONF
.Infrastructure
derived_from
:
tosca.nodes.
QC
.Infrastructure
description
:
vm
description
:
vm
capabilities
:
capabilities
:
compute
:
compute
:
type
:
tosca.capabilities.
ARTICONF
.VM
type
:
tosca.capabilities.
QC
.VM
properties
:
properties
:
num_cores
:
num_cores
:
type
:
integer
type
:
integer
...
@@ -283,17 +283,17 @@ node_types:
...
@@ -283,17 +283,17 @@ node_types:
required
:
true
required
:
true
default
:
"
vm"
default
:
"
vm"
root_key_pair
:
root_key_pair
:
type
:
tosca.datatypes.
ARTICONF
.Credential
type
:
tosca.datatypes.
QC
.Credential
required
:
false
required
:
false
user_key_pair
:
user_key_pair
:
type
:
tosca.datatypes.
ARTICONF
.Credential
type
:
tosca.datatypes.
QC
.Credential
required
:
false
required
:
false
interfaces
:
interfaces
:
Standard
:
Standard
:
create
:
dumy.yaml
create
:
dumy.yaml
tosca.nodes.
ARTICONF
.Infrastructure
:
tosca.nodes.
QC
.Infrastructure
:
derived_from
:
tosca.nodes.
ARTICONF
.Root
derived_from
:
tosca.nodes.
QC
.Root
description
:
Base infrastructure node
description
:
Base infrastructure node
capabilities
:
capabilities
:
compute
:
compute
:
...
@@ -301,6 +301,6 @@ node_types:
...
@@ -301,6 +301,6 @@ node_types:
node
:
node
:
type
:
tosca.capabilities.Node
type
:
tosca.capabilities.Node
tosca.nodes.
ARTICONF
.Application
:
tosca.nodes.
QC
.Application
:
derived_from
:
tosca.nodes.
ARTICONF
.Root
derived_from
:
tosca.nodes.
QC
.Root
description
:
Base application node
description
:
Base application node
TOSCA/types/policies.yaml
View file @
acd049d1
...
@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
...
@@ -2,7 +2,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
policy_types
:
policy_types
:
tosca.policies.
ARTICONF
.Performance
:
tosca.policies.
QC
.Performance
:
derived_from
:
tosca.policies.Performance
derived_from
:
tosca.policies.Performance
description
:
QoS constraint
description
:
QoS constraint
properties
:
properties
:
...
@@ -19,19 +19,19 @@ policy_types:
...
@@ -19,19 +19,19 @@ policy_types:
required
:
false
required
:
false
description
:
the maximum acceptable value
description
:
the maximum acceptable value
tosca.policies.
ARTICONF
.Performance.CPU
:
tosca.policies.
QC
.Performance.CPU
:
derived_from
:
tosca.policies.
ARTICONF
.Performance
derived_from
:
tosca.policies.
QC
.Performance
description
:
CPU load constraint as percentage
description
:
CPU load constraint as percentage
tosca.policies.
ARTICONF
.Performance.Mem
:
tosca.policies.
QC
.Performance.Mem
:
derived_from
:
tosca.policies.Performance
derived_from
:
tosca.policies.Performance
description
:
Memory load constraint as percentage
description
:
Memory load constraint as percentage
tosca.policies.
ARTICONF
.Performance.Disk
:
tosca.policies.
QC
.Performance.Disk
:
derived_from
:
tosca.policies.Performance
derived_from
:
tosca.policies.Performance
description
:
Disk size as MB
description
:
Disk size as MB
tosca.policies.
ARTICONF
.FaultTolerance
:
tosca.policies.
QC
.FaultTolerance
:
derived_from
:
tosca.policies.Root
derived_from
:
tosca.policies.Root
description
:
the level of acceptable faults
description
:
the level of acceptable faults
properties
:
properties
:
...
...
commons/src/main/java/nl/uva/sne/drip/commons/utils/Constants.java
View file @
acd049d1
...
@@ -21,16 +21,16 @@ package nl.uva.sne.drip.commons.utils;
...
@@ -21,16 +21,16 @@ package nl.uva.sne.drip.commons.utils;
*/
*/
public
class
Constants
{
public
class
Constants
{
public
static
final
String
VM_CAPABILITY
=
"tosca.capabilities.
ARTICONF
.VM"
;
public
static
final
String
VM_CAPABILITY
=
"tosca.capabilities.
QC
.VM"
;
public
static
final
String
VM_TYPE
=
"tosca.nodes.
ARTICONF
.VM.Compute"
;
public
static
final
String
VM_TYPE
=
"tosca.nodes.
QC
.VM.Compute"
;
public
static
final
String
VM_NUM_OF_CORES
=
"num_cores"
;
public
static
final
String
VM_NUM_OF_CORES
=
"num_cores"
;
public
static
final
String
MEM_SIZE
=
"mem_size"
;
public
static
final
String
MEM_SIZE
=
"mem_size"
;
public
static
final
String
DISK_SIZE
=
"disk_size"
;
public
static
final
String
DISK_SIZE
=
"disk_size"
;
public
static
final
String
VM_OS
=
"os"
;
public
static
final
String
VM_OS
=
"os"
;
public
static
final
String
VM_TOPOLOGY
=
"tosca.nodes.
ARTICONF
.VM.topology"
;
public
static
final
String
VM_TOPOLOGY
=
"tosca.nodes.
QC
.VM.topology"
;
public
static
final
String
APPLICATION_TYPE
=
"tosca.nodes.
ARTICONF
.Application"
;
public
static
final
String
APPLICATION_TYPE
=
"tosca.nodes.
QC
.Application"
;
public
static
final
String
CLOUD_STORM_INTERFACE
=
"tosca.interfaces.
ARTICONF
.CloudsStorm"
;
public
static
final
String
CLOUD_STORM_INTERFACE
=
"tosca.interfaces.
QC
.CloudsStorm"
;
public
static
final
String
ENCODED_FILE_DATATYPE
=
"tosca.datatypes.
ARTICONF
.encodedFile"
;
public
static
final
String
ENCODED_FILE_DATATYPE
=
"tosca.datatypes.
QC
.encodedFile"
;
public
static
final
String
CLOUD_STORM_FILES_ZIP_SUFIX
=
"cloudStromFiles.zip"
;
public
static
final
String
CLOUD_STORM_FILES_ZIP_SUFIX
=
"cloudStromFiles.zip"
;
public
static
enum
NODE_STATES
{
public
static
enum
NODE_STATES
{
...
...
deployer/__main__.py
View file @
acd049d1
# To change this license header, choose License Headers in Project Properties.
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# To change this template file, choose Tools | Templates
# and open the template in the editor.
# and open the template in the editor.
import
configparser
import
json
import
json
import
logging
import
os
import
os
import
os.path
import
sys
import
tempfile
import
tempfile
import
time
import
time
import
logging
import
pika
import
yaml
import
sys
from
time
import
sleep
from
concurrent.futures
import
thread
from
threading
import
Thread
from
threading
import
Thread
from
time
import
sleep
from
service
import
ansible_service
from
service.deploy_service
import
DeployService
from
service.tosca_helper
import
ToscaHelper
import
pika
import
sure_tosca_client
import
sure_tosca_client
import
yaml
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -31,14 +30,7 @@ done = False
...
@@ -31,14 +30,7 @@ done = False
# logger.handler_set = True
# logger.handler_set = True
def
init_chanel
(
args
):
def
init_chanel
(
rabbitmq_host
,
queue_name
):
global
rabbitmq_host
if
len
(
args
)
>
1
:
rabbitmq_host
=
args
[
1
]
queue_name
=
args
[
2
]
# deployer
else
:
rabbitmq_host
=
'127.0.0.1'
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
host
=
rabbitmq_host
))
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
host
=
rabbitmq_host
))
channel
=
connection
.
channel
()
channel
=
connection
.
channel
()
channel
.
queue_declare
(
queue
=
queue_name
)
channel
.
queue_declare
(
queue
=
queue_name
)
...
@@ -66,12 +58,13 @@ def on_request(ch, method, props, body):
...
@@ -66,12 +58,13 @@ def on_request(ch, method, props, body):
ch
.
basic_ack
(
delivery_tag
=
method
.
delivery_tag
)
ch
.
basic_ack
(
delivery_tag
=
method
.
delivery_tag
)
def
init_sure_tosca_client
(
sure_tosca_base_path
):
configuration
=
sure_tosca_client
.
Configuration
()
def
save_tosca_template
(
tosca_template_dict
):
sure_tosca_client
.
configuration
.
host
=
sure_tosca_base_path
tmp_path
=
tempfile
.
mkdtemp
()
api_client
=
sure_tosca_client
.
ApiClient
(
configuration
=
configuration
)
tosca_template_path
=
tmp_path
+
os
.
path
.
sep
+
'toscaTemplate.yml'
sure_tosca_client_api
=
sure_tosca_client
.
api
.
default_api
.
DefaultApi
(
api_client
=
api_client
)
# noqa: E501
with
open
(
tosca_template_path
,
'w'
)
as
outfile
:
return
sure_tosca_client_api
yaml
.
dump
(
tosca_template_dict
,
outfile
,
default_flow_style
=
False
)
return
tosca_template_path
def
handle_delivery
(
message
):
def
handle_delivery
(
message
):
...
@@ -85,35 +78,16 @@ def handle_delivery(message):
...
@@ -85,35 +78,16 @@ def handle_delivery(message):
tosca_file_name
=
'tosca_template'
tosca_file_name
=
'tosca_template'
tosca_template_dict
=
parsed_json_message
[
'toscaTemplate'
]
tosca_template_dict
=
parsed_json_message
[
'toscaTemplate'
]
print
(
yaml
.
dump
(
tosca_template_dict
))
tosca_template_path
=
save_tosca_template
(
tosca_template_dict
)
sure_tosca_client
.
upload_tosca_template
()
tosca_helper
=
ToscaHelper
(
sure_tosca_base_url
,
tosca_template_path
)
# tosca_interfaces = tosca.get_interfaces(tosca_template_dict)
# nodes_to_deploy = tosca_helper.get_application_nodes()
# tmp_path = tempfile.mkdtemp()
nodes_pairs
=
tosca_helper
.
get_deployment_node_pairs
()
# vms = tosca.get_vms(tosca_template_dict)
# inventory_path = ansible_service.write_inventory_file(tmp_path, vms)
deployService
=
DeployService
(
semaphore_base_url
=
semaphore_base_url
,
semaphore_username
=
semaphore_username
,
# paths = ansible_service.write_playbooks_from_tosca_interface(tosca_interfaces, tmp_path)
semaphore_password
=
semaphore_password
)
for
node_pair
in
nodes_pairs
:
# tokens = {}
deployService
.
deploy
(
node_pair
)
# for playbook_path in paths:
# out, err = ansible_service.run(inventory_path, playbook_path)
# api_key, join_token, discovery_token_ca_cert_hash = ansible_service.parse_api_tokens(out.decode("utf-8"))
# if api_key:
# tokens['api_key'] = api_key
# if join_token:
# tokens['join_token'] = join_token
# if discovery_token_ca_cert_hash:
# tokens['discovery_token_ca_cert_hash'] = discovery_token_ca_cert_hash
#
# ansible_playbook_path = k8s_service.write_ansible_k8s_files(tosca_template_dict, tmp_path)
# out, err = ansible_service.run(inventory_path, ansible_playbook_path)
# dashboard_token = ansible_service.parse_dashboard_tokens(out.decode("utf-8"))
# tokens['dashboard_token'] = dashboard_token
#
# tosca_template_dict = tosca.add_tokens(tokens, tosca_template_dict)
# tosca_template_dict = tosca.add_dashboard_url(k8s_service.get_dashboard_url(vms), tosca_template_dict)
# tosca_template_dict = tosca.add_service_url(k8s_service.get_service_urls(vms, tosca_template_dict),
# tosca_template_dict)
response
=
{
'toscaTemplate'
:
tosca_template_dict
}
response
=
{
'toscaTemplate'
:
tosca_template_dict
}
output_current_milli_time
=
int
(
round
(
time
.
time
()
*
1000
))
output_current_milli_time
=
int
(
round
(
time
.
time
()
*
1000
))
...
@@ -131,29 +105,33 @@ def threaded_function(args):
...
@@ -131,29 +105,33 @@ def threaded_function(args):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
if
sys
.
argv
[
1
]
==
"test_local"
:
tosca_path
=
"../TOSCA/"
global
channel
,
queue_name
,
connection
,
rabbitmq_host
,
sure_tosca_base_url
,
semaphore_base_url
,
semaphore_username
,
\
input_tosca_file_path
=
tosca_path
+
'/application_example_provisioned.yaml'
semaphore_password
with
open
(
input_tosca_file_path
)
as
f
:
config
=
configparser
.
ConfigParser
()
# use safe_load instead load
config
.
read
(
'properties.ini'
)
tosca_template_json
=
yaml
.
safe_load
(
f
)
sure_tosca_base_url
=
config
[
'tosca-sure'
][
'base_url'
]
semaphore_base_url
=
config
[
'semaphore'
][
'base_url'
]
else
:
semaphore_username
=
config
[
'semaphore'
][
'username'
]
logger
.
info
(
"Input args: "
+
sys
.
argv
[
0
]
+
' '
+
sys
.
argv
[
1
]
+
' '
+
sys
.
argv
[
2
])
semaphore_password
=
config
[
'semaphore'
][
'password'
]
global
channel
,
queue_name
,
connection
,
sure_tosca_client
channel
,
connection
=
init_chanel
(
sys
.
argv
)
rabbitmq_host
=
config
[
'message_broker'
][
'host'
]
queue_name
=
sys
.
argv
[
2
]
queue_name
=
config
[
'message_broker'
][
'queue_name'
]
sure_tosca_base_url
=
sys
.
argv
[
3
]
# "http://localhost:8081/tosca-sure/1.0.0/"
sure_tosca_client
=
init_sure_tosca_client
(
sure_tosca_base_url
)
logger
.
info
(
'Properties sure_tosca_base_url: '
+
sure_tosca_base_url
+
', semaphore_base_url: '
+
semaphore_base_url
logger
.
info
(
"Awaiting RPC requests"
)
+
', rabbitmq_host: '
+
rabbitmq_host
+
', queue_name: '
+
queue_name
)
try
:
thread
=
Thread
(
target
=
threaded_function
,
args
=
(
1
,))
channel
,
connection
=
init_chanel
(
rabbitmq_host
,
queue_name
)
thread
.
start
()
start
(
channel
)
logger
.
info
(
"Awaiting RPC requests"
)
except
Exception
as
e
:
try
:
done
=
True
thread
=
Thread
(
target
=
threaded_function
,
args
=
(
1
,))
e
=
sys
.
exc_info
()[
0
]
thread
.
start
()
logger
.
info
(
"Error: "
+
str
(
e
))
start
(
channel
)
print
(
e
)
except
Exception
as
e
:
exit
(
-
1
)
done
=
True
e
=
sys
.
exc_info
()[
0
]
logger
.
info
(
"Error: "
+
str
(
e
))
print
(
e
)
exit
(
-
1
)
deployer/properties.ini
0 → 100644
View file @
acd049d1
[tosca-sure]
base_url
=
http://localhost:8081/tosca-sure/1.0.0
[semaphore]
username
=
admin
password
=
password
base_url
=
http://localhost:3000/api
[message_broker]
host
=
localhost
queue_name
=
deployer
\ No newline at end of file
deployer/service/ansible_service.py
View file @
acd049d1
...
@@ -31,27 +31,27 @@ class AnsibleService:
...
@@ -31,27 +31,27 @@ class AnsibleService:
def
execute
(
self
,
nodes_pair
):
def
execute
(
self
,
nodes_pair
):
vms
=
nodes_pair
[
0
]
vms
=
nodes_pair
[
0
]
orchestrator
=
nodes_pair
[
1
]
application
=
nodes_pair
[
1
]
name
=
orchestrator
.
name
name
=
application
.
name
desired_state
=
None
desired_state
=
None
interfaces
=
orchestrator
.
node_template
.
interfaces
interfaces
=
application
.
node_template
.
interfaces
if
'current_state'
in
orchestrator
.
node_template
.
attributes
:
if
'current_state'
in
application
.
node_template
.
attributes
:
current_state
=
orchestrator
.
node_template
.
attributes
[
'current_state'
]
current_state
=
application
.
node_template
.
attributes
[
'current_state'
]
if
'desired_state'
in
orchestrator
.
node_template
.
attributes
:
if
'desired_state'
in
application
.
node_template
.
attributes
:
desired_state
=
orchestrator
.
node_template
.
attributes
[
'desired_state'
]
desired_state
=
application
.
node_template
.
attributes
[
'desired_state'
]
if
desired_state
:
if
desired_state
:
project_id
=
self
.
semaphore_helper
.
create_project
(
orchestrator
.
name
)
project_id
=
self
.
semaphore_helper
.
create_project
(
application
.
name
)
inventory_contents
=
yaml
.
dump
(
self
.
build_yml_inventory
(
vms
),
default_flow_style
=
False
)
inventory_contents
=
yaml
.
dump
(
self
.
build_yml_inventory
(
vms
),
default_flow_style
=
False
)
private_key
=
self
.
get_private_key
(
vms
)
private_key
=
self
.
get_private_key
(
vms
)
key_id
=
self
.
semaphore_helper
.
create_ssh_key
(
orchestrator
.
name
,
project_id
,
private_key
)
key_id
=
self
.
semaphore_helper
.
create_ssh_key
(
application
.
name
,
project_id
,
private_key
)
inventory_id
=
self
.
semaphore_helper
.
create_inventory
(
orchestrator
.
name
,
project_id
,
key_id
,
inventory_contents
)
inventory_id
=
self
.
semaphore_helper
.
create_inventory
(
application
.
name
,
project_id
,
key_id
,
inventory_contents
)
if
'RUNNING'
==
desired_state
:
if
'RUNNING'
==
desired_state
:
standard
=
interfaces
[
'Standard'
]
standard
=
interfaces
[
'Standard'
]
create
=
standard
[
'create'
]
create
=
standard
[
'create'
]
inputs
=
create
[
'inputs'
]
inputs
=
create
[
'inputs'
]
git_url
=
inputs
[
'repository'
]
git_url
=
inputs
[
'repository'
]
playbook_names
=
inputs
[
'
playbook
s'
]
playbook_names
=
inputs
[
'
resource
s'
]
for
playbook_name
in
playbook_names
:
for
playbook_name
in
playbook_names
:
task_id
=
self
.
run_task
(
name
,
project_id
,
key_id
,
git_url
,
inventory_id
,
playbook_name
)
task_id
=
self
.
run_task
(
name
,
project_id
,
key_id
,
git_url
,
inventory_id
,
playbook_name
)
if
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
.
status
!=
'success'
:
if
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
.
status
!=
'success'
:
...
@@ -61,7 +61,7 @@ class AnsibleService:
...
@@ -61,7 +61,7 @@ class AnsibleService:
configure
=
standard
[
'configure'
]
configure
=
standard
[
'configure'
]
inputs
=
configure
[
'inputs'
]
inputs
=
configure
[
'inputs'
]
git_url
=
inputs
[
'repository'
]
git_url
=
inputs
[
'repository'
]
playbook_names
=
inputs
[
'
playbook
s'
]
playbook_names
=
inputs
[
'
resource
s'
]
for
playbook_name
in
playbook_names
:
for
playbook_name
in
playbook_names
:
task_id
=
self
.
run_task
(
name
,
project_id
,
key_id
,
git_url
,
inventory_id
,
playbook_name
)
task_id
=
self
.
run_task
(
name
,
project_id
,
key_id
,
git_url
,
inventory_id
,
playbook_name
)
if
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
.
status
!=
'success'
:
if
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
.
status
!=
'success'
:
...
@@ -100,8 +100,7 @@ class AnsibleService:
...
@@ -100,8 +100,7 @@ class AnsibleService:
def
run_task
(
self
,
name
,
project_id
,
key_id
,
git_url
,
inventory_id
,
playbook_name
):
def
run_task
(
self
,
name
,
project_id
,
key_id
,
git_url
,
inventory_id
,
playbook_name
):
logger
.
info
(
'project_id: '
+
str
(
project_id
)
+
' task name: '
+
str
(
name
)
+
' git url: '
+
git_url
+
' playbook: '
+
playbook_name
)
logger
.
info
(
'project_id: '
+
str
(
project_id
)
+
' task name: '
+
str
(
name
)
+
' git url: '
+
git_url
+
' playbook: '
+
playbook_name
)
if
not
self
.
repository_id
:
self
.
repository_id
=
self
.
semaphore_helper
.
create_repository
(
name
,
project_id
,
key_id
,
git_url
)
self
.
repository_id
=
self
.
semaphore_helper
.
create_repository
(
name
,
project_id
,
key_id
,
git_url
)
template_id
=
self
.
semaphore_helper
.
create_template
(
project_id
,
key_id
,
inventory_id
,
self
.
repository_id
,
template_id
=
self
.
semaphore_helper
.
create_template
(
project_id
,
key_id
,
inventory_id
,
self
.
repository_id
,
playbook_name
)
playbook_name
)
task_id
=
self
.
semaphore_helper
.
execute_task
(
project_id
,
template_id
,
playbook_name
)
task_id
=
self
.
semaphore_helper
.
execute_task
(
project_id
,
template_id
,
playbook_name
)
...
...
deployer/service/tosca_helper.py
View file @
acd049d1
...
@@ -36,7 +36,7 @@ class ToscaHelper:
...
@@ -36,7 +36,7 @@ class ToscaHelper:
return
interface_types
return
interface_types
def
get_application_nodes
(
self
):
def
get_application_nodes
(
self
):
return
self
.
tosca_client
.
get_node_templates
(
self
.
doc_id
,
type_name
=
'tosca.nodes.
ARTICONF
.Application'
)
return
self
.
tosca_client
.
get_node_templates
(
self
.
doc_id
,
type_name
=
'tosca.nodes.
QC
.Application'
)
def
get_deployment_node_pairs
(
self
):
def
get_deployment_node_pairs
(
self
):
nodes_to_deploy
=
self
.
get_application_nodes
()
nodes_to_deploy
=
self
.
get_application_nodes
()
...
@@ -48,12 +48,11 @@ class ToscaHelper:
...
@@ -48,12 +48,11 @@ class ToscaHelper:
# But the topology is directly connected to the orchestrator not the VMs.
# But the topology is directly connected to the orchestrator not the VMs.
# So we explicitly get the VMs
# So we explicitly get the VMs
# I don't like this solution but I can't think of something better.
# I don't like this solution but I can't think of something better.
if
related_node
.
node_template
.
type
==
'tosca.nodes.
ARTICONF
.VM.topology'
:
if
related_node
.
node_template
.
type
==
'tosca.nodes.
QC
.VM.topology'
:
vms
=
self
.
tosca_client
.
get_node_templates
(
self
.
doc_id
,
type_name
=
'tosca.nodes.
ARTICONF
.VM.Compute'
)
vms
=
self
.
tosca_client
.
get_node_templates
(
self
.
doc_id
,
type_name
=
'tosca.nodes.
QC
.VM.Compute'
)
related_node
=
vms
related_node
=
vms
pair
=
(
related_node
,
node
)
pair
=
(
related_node
,
node
)
nodes_pairs
.
append
(
pair
)
nodes_pairs
.
append
(
pair
)
return
nodes_pairs
return
nodes_pairs
@
classmethod
@
classmethod
...
...
docker-compose/docker-compose-test.yml
View file @
acd049d1
...
@@ -25,7 +25,7 @@ services:
...
@@ -25,7 +25,7 @@ services:
-
"
3306:3306"
-
"
3306:3306"
semaphore
:
semaphore
:
image
:
semaphore
image
:
qcdis/docker_ansible_
semaphore
environment
:
environment
:
SEMAPHORE_DB_USER
:
semaphore
SEMAPHORE_DB_USER
:
semaphore
SEMAPHORE_DB_PASS
:
semaphore
SEMAPHORE_DB_PASS
:
semaphore
...
...
docker-compose/docker-compose.yml
View file @
acd049d1
version
:
'
3'
version
:
'
3'
services
:
services
:
nginx
:
#
nginx:
image
:
nginx
#
image: nginx
volumes
:
#
volumes:
-
./nginx.conf:/etc/nginx/nginx.conf
#
- ./nginx.conf:/etc/nginx/nginx.conf
-
./cert.pem:/etc/nginx/cert
/cert.pem
#- ./cert.pem:/etc/nginx
/cert.pem
-
./privkey.pem:/etc/nginx/cert
/privkey.pem
#- ./privkey.pem:/etc/nginx
/privkey.pem
#- ./www:/data/www
#
#
- ./www:/data/www
ports
:
#
ports:
-
"
3000
0:80"
#- "8
0:80"
-
"
30001
:443"
#- "443
:443"
rabbit
:
rabbit
:
image
:
rabbitmq:3.8-management
image
:
rabbitmq:3.8-management
#
ports:
ports
:
#
- "5671-5672:5671-5672"
-
"
5671-5672:5671-5672"
#
- "15672:15672"
-
"
15672:15672"
#
- "4369:4369"
-
"
4369:4369"
#
- "15671:15671"
-
"
15671:15671"
mysql
:
mysql
:
image
:
mysql:5.6
image
:
mysql:5.6
...
@@ -31,7 +31,7 @@ services:
...
@@ -31,7 +31,7 @@ services:
#- "3306:3306"
#- "3306:3306"
semaphore
:
semaphore
:
image
:
semaphore
image
:
qcdis/docker_ansible_
semaphore
environment
:
environment
:
SEMAPHORE_DB_USER
:
semaphore
SEMAPHORE_DB_USER
:
semaphore
SEMAPHORE_DB_PASS
:
semaphore
SEMAPHORE_DB_PASS
:
semaphore
...
@@ -45,29 +45,28 @@ services:
...
@@ -45,29 +45,28 @@ services:
SEMAPHORE_ADMIN
:
admin
SEMAPHORE_ADMIN
:
admin
SEMAPHORE_WEB_ROOT
:
http://0.0.0.0:3000
SEMAPHORE_WEB_ROOT
:
http://0.0.0.0:3000
ports
:
ports
:
-
"
3000
2
:3000"
-
"
3000:3000"
depends_on
:
depends_on
:
-
mysql
-
mysql
mongo
:
mongo
:
image
:
mongo:4
image
:
mongo:4
#
ports:
ports
:
#
- "27017:27017"
-
"
27017:27017"
manager
:
#
manager:
depends_on
:
#
depends_on:
-
rabbit
#
- rabbit
-
mongo
#
- mongo
-
sure-tosca
#
- sure-tosca
image
:
qcdis/manager:3.0.0
#
image: qcdis/manager:3.0.0
environment
:
#
environment:
RABBITMQ_HOST
:
rabbit
#
RABBITMQ_HOST: rabbit
MONGO_HOST
:
mongo
#
MONGO_HOST: mongo
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
#
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
ports
:
#
ports:
-
"
8080:8080"
#
- "8080:8080"
sure-tosca
:
sure-tosca
:
image
:
qcdis/sure-tosca:3.0.0
image
:
qcdis/sure-tosca:3.0.0
...
@@ -82,23 +81,23 @@ services:
...
@@ -82,23 +81,23 @@ services:
environment
:
environment
:
RABBITMQ_HOST
:
rabbit
RABBITMQ_HOST
:
rabbit
provisioner
:
#
provisioner:
depends_on
:
#
depends_on:
-
rabbit
#
- rabbit
-
sure-tosca
#
- sure-tosca
image
:
qcdis/provisioner:3.0.0
#
image: qcdis/provisioner:3.0.0
environment
:
#
environment:
RABBITMQ_HOST
:
rabbit
#
RABBITMQ_HOST: rabbit
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
#
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
deployer
:
#
deployer:
depends_on
:
#
depends_on:
-
rabbit
#
- rabbit
-
sure-tosca
#
- sure-tosca
image
:
qcdis/deployer:3.0.0
#
image: qcdis/deployer:3.0.0
environment
:
#
environment:
RABBITMQ_HOST
:
rabbit
#
RABBITMQ_HOST: rabbit
SURE_TOSCA_BASE_PATH
:
http://sure-tosca:8081/tosca-sure/1.0.0
#
SURE_TOSCA_BASE_PATH: http://sure-tosca:8081/tosca-sure/1.0.0
docker-compose/nginx.conf
View file @
acd049d1
...
@@ -12,13 +12,13 @@ http {
...
@@ -12,13 +12,13 @@ http {
# this is necessary for us to be able to disable request buffering in all cases
# this is necessary for us to be able to disable request buffering in all cases
proxy_http_version
1
.1
;
proxy_http_version
1
.1
;
upstream
semaphore
{
#
upstream semaphore {
server
semaphore
:
3000
;
#
server semaphore:3000;
}
#
}
# upstream
sure-tosca
{
# upstream
manager
{
# server
sure-tosca:8081
;
# server
manager:8080
;
# }
# }
server
{
server
{
listen
[::]:80
default_server
;
listen
[::]:80
default_server
;
...
@@ -27,9 +27,6 @@ http {
...
@@ -27,9 +27,6 @@ http {
}
}
server
{
server
{
# auth_basic "User's Area";
# auth_basic_user_file /etc/nginx/htpasswd;
listen
443
ssl
;
listen
443
ssl
;
server_name
_
;
server_name
_
;
...
@@ -37,8 +34,8 @@ http {
...
@@ -37,8 +34,8 @@ http {
add_header
Strict-Transport-Security
"max-age=31536000"
always
;
add_header
Strict-Transport-Security
"max-age=31536000"
always
;
# SSL
# SSL
# ssl_certificate /etc/nginx/cert
/cert.pem;
ssl_certificate
/etc/nginx
/cert.pem
;
# ssl_certificate_key /etc/nginx/cert
/privkey.pem;
ssl_certificate_key
/etc/nginx
/privkey.pem
;
# Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
# Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
ssl_protocols
TLSv1.1
TLSv1.2
;
ssl_protocols
TLSv1.1
TLSv1.2
;
...
@@ -53,7 +50,7 @@ http {
...
@@ -53,7 +50,7 @@ http {
chunked_transfer_encoding
on
;
chunked_transfer_encoding
on
;
location
/
{
location
/
{
proxy_pass
http://semaphore/
;
proxy_pass
http://semaphore
:3000
/
;
proxy_set_header
Host
$http_host
;
proxy_set_header
Host
$http_host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
...
@@ -64,17 +61,16 @@ http {
...
@@ -64,17 +61,16 @@ http {
proxy_request_buffering
off
;
proxy_request_buffering
off
;
}
}
location
/api/ws
{
# location /api/ws {
proxy_pass
http://semaphore/api/ws
;
# proxy_pass http://semaphore:3000/api/ws;
proxy_http_version
1
.1
;
# proxy_http_version 1.1;
proxy_set_header
Upgrade
$http_upgrade
;
# proxy_set_header Upgrade $http_upgrade;
proxy_set_header
Connection
"upgrade"
;
# proxy_set_header Connection "upgrade";
proxy_set_header
Origin
""
;
# proxy_set_header Origin "";
}
# }
location
/
tosca-sure/1.0.0
/
{
location
/
manger
/
{
proxy_pass
http://
sure-tosca:8081/tosca-sure/1.0.0
/
;
proxy_pass
http://
manager:8080/manger
/
;
proxy_set_header
Host
$http_host
;
proxy_set_header
Host
$http_host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
...
@@ -85,8 +81,20 @@ http {
...
@@ -85,8 +81,20 @@ http {
proxy_request_buffering
off
;
proxy_request_buffering
off
;
}
}
location
/manager/
{
location
/manger/swagger-ui.html
{
proxy_pass
http:///manager:8080/manager
;
proxy_pass
http://manager:8080/swagger-ui.html/
;
proxy_set_header
Host
$http_host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Proto
$scheme
;
proxy_buffering
off
;
proxy_request_buffering
off
;
}
location
/tosca-sure/1.0.0/
{
proxy_pass
http://sure-tosca:8081/tosca-sure/1.0.0/
;
proxy_set_header
Host
$http_host
;
proxy_set_header
Host
$http_host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
...
@@ -97,6 +105,4 @@ http {
...
@@ -97,6 +105,4 @@ http {
proxy_request_buffering
off
;
proxy_request_buffering
off
;
}
}
}
}
}
}
example_messages/message_delete_request.json
View file @
acd049d1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"user_key_pair"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"user_key_pair"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM.topology"
,
"capability"
:
"tosca.capabilities.
QC
.VM.topology"
,
"node"
:
"topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
"type"
:
"tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
},
},
"topology"
:
{
"topology"
:
{
"properties"
:
{
"properties"
:
{
...
@@ -121,14 +121,14 @@
...
@@ -121,14 +121,14 @@
"requirements"
:
[
"requirements"
:
[
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
},
},
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute_1"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.topology"
,
"type"
:
"tosca.nodes.
QC
.VM.topology"
,
"attributes"
:
{
"attributes"
:
{
"credential"
:
{
"credential"
:
{
"cloud_provider_name"
:
"EC2"
,
"cloud_provider_name"
:
"EC2"
,
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
"encoding"
:
"base64"
,
"encoding"
:
"base64"
,
"file_contents"
:
"XXXXXXXXXXXXXXXXXx"
,
"file_contents"
:
"XXXXXXXXXXXXXXXXXx"
,
"file_ext"
:
"zip"
,
"file_ext"
:
"zip"
,
"type"
:
"tosca.datatypes.
ARTICONF
.encodedFile"
"type"
:
"tosca.datatypes.
QC
.encodedFile"
}
}
}
}
},
},
...
@@ -199,13 +199,13 @@
...
@@ -199,13 +199,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.docker.Orchestrator"
,
"capability"
:
"tosca.capabilities.
QC
.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
,
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
,
"artifacts"
:
{
"artifacts"
:
{
"image"
:
{
"image"
:
{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"file"
:
"alogo53/ws-pema-lifewatch"
,
...
...
example_messages/message_delete_response.json
View file @
acd049d1
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"host_name"
:
"vm0"
,
"host_name"
:
"vm0"
,
"node_type"
:
"t2.micro"
,
"node_type"
:
"t2.micro"
,
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"host_name"
:
"vm1"
,
"host_name"
:
"vm1"
,
"node_type"
:
"t2.micro"
,
"node_type"
:
"t2.micro"
,
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM.topology"
,
"capability"
:
"tosca.capabilities.
QC
.VM.topology"
,
"node"
:
"topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
"type"
:
"tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
},
},
"topology"
:
{
"topology"
:
{
"properties"
:
{
"properties"
:
{
...
@@ -114,14 +114,14 @@
...
@@ -114,14 +114,14 @@
"requirements"
:
[
"requirements"
:
[
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
},
},
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute_1"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.topology"
,
"type"
:
"tosca.nodes.
QC
.VM.topology"
,
"attributes"
:
{
"attributes"
:
{
"credential"
:
{
"credential"
:
{
"cloud_provider_name"
:
"EC2"
,
"cloud_provider_name"
:
"EC2"
,
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
"provisioned_files"
:
{
"provisioned_files"
:
{
"file_ext"
:
"zip"
,
"file_ext"
:
"zip"
,
"file_contents"
:
"XXXXXXXXXXXXXXXXXXXx"
,
"file_contents"
:
"XXXXXXXXXXXXXXXXXXXx"
,
"type"
:
"tosca.datatypes.
ARTICONF
.encodedFile"
,
"type"
:
"tosca.datatypes.
QC
.encodedFile"
,
"encoding"
:
"base64"
"encoding"
:
"base64"
}
}
}
}
...
@@ -192,13 +192,13 @@
...
@@ -192,13 +192,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.docker.Orchestrator"
,
"capability"
:
"tosca.capabilities.
QC
.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
,
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
,
"artifacts"
:
{
"artifacts"
:
{
"image"
:
{
"image"
:
{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"file"
:
"alogo53/ws-pema-lifewatch"
,
...
...
example_messages/message_deploy_request.json
View file @
acd049d1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"user_key_pair"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"user_key_pair"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM.topology"
,
"capability"
:
"tosca.capabilities.
QC
.VM.topology"
,
"node"
:
"topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
...
@@ -121,7 +121,7 @@
...
@@ -121,7 +121,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
,
"type"
:
"tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
,
"attributes"
:
{
"attributes"
:
{
"desired_state"
:
"RUNNING"
"desired_state"
:
"RUNNING"
}
}
...
@@ -134,14 +134,14 @@
...
@@ -134,14 +134,14 @@
"requirements"
:
[
"requirements"
:
[
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
},
},
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute_1"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.topology"
,
"type"
:
"tosca.nodes.
QC
.VM.topology"
,
"attributes"
:
{
"attributes"
:
{
"credential"
:
{
"credential"
:
{
"cloud_provider_name"
:
"ExoGENI"
,
"cloud_provider_name"
:
"ExoGENI"
,
...
@@ -175,7 +175,7 @@
...
@@ -175,7 +175,7 @@
"provisioned_files"
:
{
"provisioned_files"
:
{
"file_ext"
:
"zip"
,
"file_ext"
:
"zip"
,
"file_contents"
:
"XXXXXXXX"
,
"file_contents"
:
"XXXXXXXX"
,
"type"
:
"tosca.datatypes.
ARTICONF
.encodedFile"
,
"type"
:
"tosca.datatypes.
QC
.encodedFile"
,
"encoding"
:
"base64"
"encoding"
:
"base64"
}
}
}
}
...
@@ -189,13 +189,13 @@
...
@@ -189,13 +189,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.docker.Orchestrator"
,
"capability"
:
"tosca.capabilities.
QC
.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
,
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
,
"attributes"
:
{
"attributes"
:
{
"desired_state"
:
"RUNNING"
"desired_state"
:
"RUNNING"
},
},
...
...
example_messages/message_example_provisioned.json
View file @
acd049d1
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"user_key_pair"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
,
"type"
:
"tosca.nodes.
QC
.VM.Compute"
,
"attributes"
:
{
"attributes"
:
{
"user_key_pair"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"protocol"
:
"ssh"
,
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM.topology"
,
"capability"
:
"tosca.capabilities.
QC
.VM.topology"
,
"node"
:
"topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
"type"
:
"tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
},
},
"topology"
:
{
"topology"
:
{
"properties"
:
{
"properties"
:
{
...
@@ -113,14 +113,14 @@
...
@@ -113,14 +113,14 @@
"requirements"
:
[
"requirements"
:
[
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
},
},
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute_1"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.topology"
,
"type"
:
"tosca.nodes.
QC
.VM.topology"
,
"attributes"
:
{
"attributes"
:
{
"credential"
:
{
"credential"
:
{
"cloud_provider_name"
:
"EC2"
,
"cloud_provider_name"
:
"EC2"
,
...
@@ -183,13 +183,13 @@
...
@@ -183,13 +183,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.docker.Orchestrator"
,
"capability"
:
"tosca.capabilities.
QC
.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
,
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
,
"artifacts"
:
{
"artifacts"
:
{
"image"
:
{
"image"
:
{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"file"
:
"alogo53/ws-pema-lifewatch"
,
...
...
example_messages/message_plan_request.json
View file @
acd049d1
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"30001:8080"
"30001:8080"
]
]
},
},
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
,
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
,
"artifacts"
:
{
"artifacts"
:
{
"image"
:
{
"image"
:
{
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
,
...
...
example_messages/message_plan_response.json
View file @
acd049d1
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
"os"
:
"Ubuntu 18.04"
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
"user_name"
:
"vm_user"
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
"type"
:
"tosca.nodes.
QC
.VM.Compute"
},
},
"compute_1"
:
{
"compute_1"
:
{
"interfaces"
:
{
"interfaces"
:
{
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
"os"
:
"Ubuntu 18.04"
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
"user_name"
:
"vm_user"
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
"type"
:
"tosca.nodes.
QC
.VM.Compute"
},
},
"kubernetes"
:
{
"kubernetes"
:
{
"interfaces"
:
{
"interfaces"
:
{
...
@@ -77,13 +77,13 @@
...
@@ -77,13 +77,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM.topology"
,
"capability"
:
"tosca.capabilities.
QC
.VM.topology"
,
"node"
:
"topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
"type"
:
"tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
},
},
"topology"
:
{
"topology"
:
{
"artifacts"
:
{
"artifacts"
:
{
...
@@ -133,20 +133,20 @@
...
@@ -133,20 +133,20 @@
"requirements"
:
[
"requirements"
:
[
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
},
},
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute_1"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.VM.topology"
"type"
:
"tosca.nodes.
QC
.VM.topology"
},
},
"ws-pema"
:
{
"ws-pema"
:
{
"artifacts"
:
{
"artifacts"
:
{
...
@@ -164,13 +164,13 @@
...
@@ -164,13 +164,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.docker.Orchestrator"
,
"capability"
:
"tosca.capabilities.
QC
.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
}
}
}
}
}
}
...
...
example_messages/message_provision_request.json
View file @
acd049d1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
"type"
:
"tosca.nodes.
QC
.VM.Compute"
},
},
"compute_1"
:
{
"compute_1"
:
{
"properties"
:
{
"properties"
:
{
...
@@ -37,13 +37,13 @@
...
@@ -37,13 +37,13 @@
"create"
:
"dumy.yaml"
"create"
:
"dumy.yaml"
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.Compute"
"type"
:
"tosca.nodes.
QC
.VM.Compute"
},
},
"kubernetes"
:
{
"kubernetes"
:
{
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM.topology"
,
"capability"
:
"tosca.capabilities.
QC
.VM.topology"
,
"node"
:
"topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes"
"type"
:
"tosca.nodes.
QC
.docker.Orchestrator.Kubernetes"
},
},
"topology"
:
{
"topology"
:
{
"properties"
:
{
"properties"
:
{
...
@@ -81,14 +81,14 @@
...
@@ -81,14 +81,14 @@
"requirements"
:
[
"requirements"
:
[
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
},
},
{
{
"vm"
:
{
"vm"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.VM"
,
"capability"
:
"tosca.capabilities.
QC
.VM"
,
"node"
:
"compute_1"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
"relationship"
:
"tosca.relationships.DependsOn"
}
}
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
}
}
}
}
},
},
"type"
:
"tosca.nodes.
ARTICONF
.VM.topology"
,
"type"
:
"tosca.nodes.
QC
.VM.topology"
,
"attributes"
:
{
"attributes"
:
{
"credential"
:
{
"credential"
:
{
"cloud_provider_name"
:
"EC2"
,
"cloud_provider_name"
:
"EC2"
,
...
@@ -156,13 +156,13 @@
...
@@ -156,13 +156,13 @@
"requirements"
:
[
"requirements"
:
[
{
{
"host"
:
{
"host"
:
{
"capability"
:
"tosca.capabilities.
ARTICONF
.docker.Orchestrator"
,
"capability"
:
"tosca.capabilities.
QC
.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
"relationship"
:
"tosca.relationships.HostedOn"
}
}
}
}
],
],
"type"
:
"tosca.nodes.
ARTICONF
.Container.Application.Docker"
,
"type"
:
"tosca.nodes.
QC
.Container.Application.Docker"
,
"artifacts"
:
{
"artifacts"
:
{
"image"
:
{
"image"
:
{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"file"
:
"alogo53/ws-pema-lifewatch"
,
...
...
jupyter_notebooks/vre_demo.ipynb
View file @
acd049d1
...
@@ -311,7 +311,7 @@
...
@@ -311,7 +311,7 @@
"\n",
"\n",
"\n",
"\n",
"for node_name in tosca_dict['topology_template']['node_templates']:\n",
"for node_name in tosca_dict['topology_template']['node_templates']:\n",
" if tosca_dict['topology_template']['node_templates'][node_name]['type'] == 'tosca.nodes.
ARTICONF
.VM.Compute':\n",
" if tosca_dict['topology_template']['node_templates'][node_name]['type'] == 'tosca.nodes.
QC
.VM.Compute':\n",
" print(node_name+': '+tosca_dict['topology_template']['node_templates'][node_name]['attributes']['public_ip'])"
" print(node_name+': '+tosca_dict['topology_template']['node_templates'][node_name]['attributes']['public_ip'])"
]
]
},
},
...
@@ -349,12 +349,12 @@
...
@@ -349,12 +349,12 @@
"nx.draw(graph, with_labels=True)\n",
"nx.draw(graph, with_labels=True)\n",
"\n",
"\n",
"for node_name in tosca_dict['topology_template']['node_templates']:\n",
"for node_name in tosca_dict['topology_template']['node_templates']:\n",
" if tosca_dict['topology_template']['node_templates'][node_name]['type'] == 'tosca.nodes.
ARTICONF
.docker.Orchestrator.Kubernetes':\n",
" if tosca_dict['topology_template']['node_templates'][node_name]['type'] == 'tosca.nodes.
QC
.docker.Orchestrator.Kubernetes':\n",
" for token in tosca_dict['topology_template']['node_templates'][node_name]['attributes']['tokens']:\n",
" for token in tosca_dict['topology_template']['node_templates'][node_name]['attributes']['tokens']:\n",
" if token['user'] == 'dashboard_token':\n",
" if token['user'] == 'dashboard_token':\n",
" print(node_name+': '+' dashboard_token: '+token['token'])\n",
" print(node_name+': '+' dashboard_token: '+token['token'])\n",
" print(node_name+': '+str(tosca_dict['topology_template']['node_templates'][node_name]['attributes']['dashboard_url']))\n",
" print(node_name+': '+str(tosca_dict['topology_template']['node_templates'][node_name]['attributes']['dashboard_url']))\n",
" if tosca_dict['topology_template']['node_templates'][node_name]['type'] == 'tosca.nodes.
ARTICONF
.Container.Application.Docker':\n",
" if tosca_dict['topology_template']['node_templates'][node_name]['type'] == 'tosca.nodes.
QC
.Container.Application.Docker':\n",
" print(node_name+': '+str(tosca_dict['topology_template']['node_templates'][node_name]['attributes']['service_url']))\n",
" print(node_name+': '+str(tosca_dict['topology_template']['node_templates'][node_name]['attributes']['service_url']))\n",
" "
" "
]
]
...
...
sure_tosca-client_python_stubs/test/test_default_api.py
View file @
acd049d1
...
@@ -104,7 +104,7 @@ class TestDefaultApi(unittest.TestCase):
...
@@ -104,7 +104,7 @@ class TestDefaultApi(unittest.TestCase):
file_id
=
self
.
upload_tosca_template
(
'application_example_provisioned.yaml'
)
file_id
=
self
.
upload_tosca_template
(
'application_example_provisioned.yaml'
)
node_templates
=
self
.
api
.
get_node_templates
(
file_id
)
node_templates
=
self
.
api
.
get_node_templates
(
file_id
)
self
.
assertIsNotNone
(
node_templates
)
self
.
assertIsNotNone
(
node_templates
)
nodes_to_deploy
=
self
.
api
.
get_node_templates
(
file_id
,
type_name
=
'tosca.nodes.
ARTICONF
.Application'
)
nodes_to_deploy
=
self
.
api
.
get_node_templates
(
file_id
,
type_name
=
'tosca.nodes.
QC
.Application'
)
...
...
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