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
6c4561c2
Commit
6c4561c2
authored
Apr 02, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to start ansible task
parent
1b7baef7
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
77 additions
and
31 deletions
+77
-31
application_example_2_topologies.yaml
TOSCA/application_example_2_topologies.yaml
+1
-1
application_example_planed.yaml
TOSCA/application_example_planed.yaml
+1
-1
application_example_provisioned.yaml
TOSCA/application_example_provisioned.yaml
+1
-1
kubernetes.yaml
TOSCA/kubernetes.yaml
+1
-1
nodes.yaml
TOSCA/types/nodes.yaml
+1
-1
requirements.txt
deployer/requirements.txt
+1
-1
ansible_service.py
deployer/service/ansible_service.py
+51
-16
semaphore_helper.py
deployer/service/semaphore_helper.py
+3
-0
message_delete_request.json
example_messages/message_delete_request.json
+1
-1
message_delete_response.json
example_messages/message_delete_response.json
+1
-1
message_deploy_request.json
example_messages/message_deploy_request.json
+1
-1
message_plan_response.json
example_messages/message_plan_response.json
+1
-1
message_provision_request.json
example_messages/message_provision_request.json
+1
-1
message_provision_response.json
example_messages/message_provision_response.json
+7
-1
misc.xml
semaphore-python-client-generated/.idea/misc.xml
+1
-1
semaphore-python-client-generated.iml
...ent-generated/.idea/semaphore-python-client-generated.iml
+4
-2
No files found.
TOSCA/application_example_2_topologies.yaml
View file @
6c4561c2
...
...
@@ -36,7 +36,7 @@ topology_template:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_dashboard.yaml"
create
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
k8s_install.y
ml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
install_k8s.ya
ml"
delete
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
...
...
TOSCA/application_example_planed.yaml
View file @
6c4561c2
...
...
@@ -36,7 +36,7 @@ topology_template:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_dashboard.yaml"
create
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
k8s_install.y
ml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
install_k8s.ya
ml"
delete
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
...
...
TOSCA/application_example_provisioned.yaml
View file @
6c4561c2
...
...
@@ -66,7 +66,7 @@ topology_template:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_dashboard.yaml"
create
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
k8s_install.y
ml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
install_k8s.ya
ml"
delete
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
...
...
TOSCA/kubernetes.yaml
View file @
6c4561c2
...
...
@@ -9,7 +9,7 @@ topology_template:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_dashboard.yaml"
create
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
k8s_install.y
ml"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/
install_k8s.ya
ml"
delete
:
inputs
:
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/k8s_delete.yaml"
...
...
TOSCA/types/nodes.yaml
View file @
6c4561c2
...
...
@@ -135,7 +135,7 @@ node_types:
create
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
playbook
:
k8s_install.y
ml
playbook
:
install_k8s.ya
ml
configure
:
inputs
:
repository
:
https://github.com/skoulouzis/playbooks.git
...
...
deployer/requirements.txt
View file @
6c4561c2
...
...
@@ -5,7 +5,7 @@ requests==2.23.0
wheel==0.34.2
pyyaml==5.3.1
matplotlib==3.2.1
# ansible==2.9.6
certifi==2019.11.28
six==1.14.0
python_dateutil==2.8.1
...
...
deployer/service/ansible_service.py
View file @
6c4561c2
import
base64
import
logging
import
os
from
time
import
sleep
import
yaml
from
service.semaphore_helper
import
SemaphoreHelper
yaml
.
Dumper
.
ignore_aliases
=
lambda
*
args
:
True
logger
=
logging
.
getLogger
(
__name__
)
if
not
getattr
(
logger
,
'handler_set'
,
None
):
...
...
@@ -30,14 +32,14 @@ class AnsibleService:
orchestartor
=
nodes_pair
[
1
]
desired_state
=
None
interfaces
=
orchestartor
.
node_template
.
interfaces
if
'current_state'
in
orchestartor
.
attributes
:
current_state
=
orchestartor
.
attributes
[
'current_state'
]
if
'desired_state'
in
orchestartor
.
attributes
:
desired_state
=
orchestartor
.
attributes
[
'desired_state'
]
if
'current_state'
in
orchestartor
.
node_template
.
attributes
:
current_state
=
orchestartor
.
node_template
.
attributes
[
'current_state'
]
if
'desired_state'
in
orchestartor
.
node_template
.
attributes
:
desired_state
=
orchestartor
.
node_template
.
attributes
[
'desired_state'
]
if
desired_state
:
project_id
=
self
.
semaphore_helper
.
create_project
(
orchestartor
.
name
)
inventory_contents
=
self
.
build_yml_inventory
(
vms
)
inventory_contents
=
yaml
.
dump
(
self
.
build_yml_inventory
(
vms
),
default_flow_style
=
False
)
private_key
=
self
.
get_private_key
(
vms
)
key_id
=
self
.
semaphore_helper
.
create_ssh_key
(
orchestartor
.
name
,
project_id
,
private_key
)
inventory_id
=
self
.
semaphore_helper
.
create_inventory
(
orchestartor
.
name
,
project_id
,
key_id
,
inventory_contents
)
...
...
@@ -48,16 +50,49 @@ class AnsibleService:
git_url
=
inputs
[
'repository'
]
playbook_name
=
inputs
[
'playbook'
]
# repository_id = self.semaphore_helper.create_repository(orchestartor.name, project_id, key_id, git_url)
# template_id = self.semaphore_helper.create_template(project_id, key_id, inventory_id, repository_id, playbook_name)
# task_id = self.semaphore_helper.execute_task(project_id, template_id, playbook_name)
repository_id
=
self
.
semaphore_helper
.
create_repository
(
orchestartor
.
name
,
project_id
,
key_id
,
git_url
)
template_id
=
self
.
semaphore_helper
.
create_template
(
project_id
,
key_id
,
inventory_id
,
repository_id
,
playbook_name
)
task_id
=
self
.
semaphore_helper
.
execute_task
(
project_id
,
template_id
,
playbook_name
)
for
x
in
range
(
0
,
3
):
task
=
self
.
semaphore_helper
.
get_task
(
project_id
,
task_id
)
print
(
task
)
sleep
(
0.5
)
pass
def
get_path
(
self
,
file_name
):
tosca_path
=
"../../../ansible_playbooks"
input_tosca_file_path
=
tosca_path
+
'/'
+
file_name
if
not
os
.
path
.
exists
(
input_tosca_file_path
):
tosca_path
=
"../../ansible_playbooks"
input_tosca_file_path
=
tosca_path
+
'/'
+
file_name
return
input_tosca_file_path
def
build_yml_inventory
(
self
,
vms
):
# loader = DataLoader()
# inventory = InventoryManager(loader=loader)
# variable_manager = VariableManager()
# with open(r'/home/alogo/Downloads/inventory.yaml') as file:
# # The FullLoader parameter handles the conversion from YAML
# # scalar values to Python the dictionary format
# data = yaml.load(file)
inventory
=
{}
all
=
{}
vars
=
{
'ansible_ssh_common_args'
:
'-o StrictHostKeyChecking=no'
}
vars
[
'ansible_ssh_user'
]
=
vms
[
0
]
.
node_template
.
properties
[
'user_name'
]
children
=
{}
for
vm
in
vms
:
attributes
=
vm
.
node_template
.
attributes
role
=
attributes
[
'role'
]
public_ip
=
attributes
[
'public_ip'
]
if
role
not
in
children
:
hosts
=
{}
else
:
hosts
=
children
[
role
]
hosts
[
public_ip
]
=
vars
children
[
role
]
=
hosts
# inventory.add_group(role)
# inventory.add_host(public_ip,group=role)
all
[
'children'
]
=
children
inventory
[
'all'
]
=
all
return
inventory
def
get_private_key
(
self
,
vms
):
private_key
=
vms
[
0
]
.
node_template
.
attributes
[
'user_key_pair'
][
'keys'
][
'private_key'
]
return
base64
.
b64decode
(
private_key
)
.
decode
(
'utf-8'
)
.
replace
(
r'\n'
,
'
\n
'
)
deployer/service/semaphore_helper.py
View file @
6c4561c2
...
...
@@ -96,3 +96,6 @@ class SemaphoreHelper:
self
.
project_api
.
project_project_id_tasks_post
(
project_id
,
task
)
tasks
=
self
.
project_api
.
project_project_id_tasks_get
(
project_id
)
return
tasks
[
len
(
tasks
)
-
1
]
.
id
def
get_task
(
self
,
project_id
,
task_id
):
return
self
.
project_api
.
project_project_id_tasks_task_id_get
(
project_id
,
task_id
)
example_messages/message_delete_request.json
View file @
6c4561c2
This diff is collapsed.
Click to expand it.
example_messages/message_delete_response.json
View file @
6c4561c2
This diff is collapsed.
Click to expand it.
example_messages/message_deploy_request.json
View file @
6c4561c2
This diff is collapsed.
Click to expand it.
example_messages/message_plan_response.json
View file @
6c4561c2
{
"toscaTemplate"
:
{
"description"
:
"TOSCA example"
,
"imports"
:
[{
"nodes"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
},
{
"data"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"
},
{
"capabilities"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"
},
{
"policies"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"
},
{
"interfaces"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"
}],
"tosca_definitions_version"
:
"tosca_simple_yaml_1_0"
,
"topology_template"
:
{
"node_templates"
:
{
"compute"
:
{
"interfaces"
:
{
"Standard"
:
{
"create"
:
"dumy.yaml"
}},
"properties"
:
{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"compute_1"
:
{
"interfaces"
:
{
"Standard"
:
{
"create"
:
"dumy.yaml"
}},
"properties"
:
{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"kubernetes"
:
{
"interfaces"
:
{
"Standard"
:
{
"configure"
:
{
"inputs"
:
{
"playbook"
:
"k8s_dashboard.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"create"
:
{
"inputs"
:
{
"playbook"
:
"
k8s_install.y
ml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"delete"
:
{
"inputs"
:
{
"playbook"
:
"k8s_delete.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}}}},
"requirements"
:
[{
"host"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM.topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
},
"topology"
:
{
"artifacts"
:
{
"provisioned_files"
:
{
"required"
:
false
,
"type"
:
"string"
}},
"interfaces"
:
{
"CloudsStorm"
:
{
"delete"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"hscale"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"provision"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"start"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"stop"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}}}},
"properties"
:
{
"domain"
:
"Frankfurt"
,
"provider"
:
"EC2"
},
"requirements"
:
[{
"vm"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
}},
{
"vm"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.VM.topology"
},
"ws-pema"
:
{
"artifacts"
:
{
"image"
:
{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"repository"
:
"docker_hub"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
}},
"properties"
:
{
"ports"
:
[
"30001:8080"
]},
"requirements"
:
[{
"host"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.Container.Application.Docker"
}}}},
"creationDate"
:
1585660828105
}
{
"toscaTemplate"
:
{
"description"
:
"TOSCA example"
,
"imports"
:
[{
"nodes"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
},
{
"data"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"
},
{
"capabilities"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"
},
{
"policies"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"
},
{
"interfaces"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"
}],
"tosca_definitions_version"
:
"tosca_simple_yaml_1_0"
,
"topology_template"
:
{
"node_templates"
:
{
"compute"
:
{
"interfaces"
:
{
"Standard"
:
{
"create"
:
"dumy.yaml"
}},
"properties"
:
{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"compute_1"
:
{
"interfaces"
:
{
"Standard"
:
{
"create"
:
"dumy.yaml"
}},
"properties"
:
{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"kubernetes"
:
{
"interfaces"
:
{
"Standard"
:
{
"configure"
:
{
"inputs"
:
{
"playbook"
:
"k8s_dashboard.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"create"
:
{
"inputs"
:
{
"playbook"
:
"
install_k8s.ya
ml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"delete"
:
{
"inputs"
:
{
"playbook"
:
"k8s_delete.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}}}},
"requirements"
:
[{
"host"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM.topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
},
"topology"
:
{
"artifacts"
:
{
"provisioned_files"
:
{
"required"
:
false
,
"type"
:
"string"
}},
"interfaces"
:
{
"CloudsStorm"
:
{
"delete"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"hscale"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"provision"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"start"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"stop"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}}}},
"properties"
:
{
"domain"
:
"Frankfurt"
,
"provider"
:
"EC2"
},
"requirements"
:
[{
"vm"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
}},
{
"vm"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.VM.topology"
},
"ws-pema"
:
{
"artifacts"
:
{
"image"
:
{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"repository"
:
"docker_hub"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
}},
"properties"
:
{
"ports"
:
[
"30001:8080"
]},
"requirements"
:
[{
"host"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.Container.Application.Docker"
}}}},
"creationDate"
:
1585660828105
}
example_messages/message_provision_request.json
View file @
6c4561c2
{
"owner"
:
"user"
,
"creationDate"
:
1585660972026
,
"toscaTemplate"
:{
"tosca_definitions_version"
:
"tosca_simple_yaml_1_0"
,
"tosca_default_namespace"
:
null
,
"template_name"
:
null
,
"topology_template"
:{
"description"
:
null
,
"inputs"
:
null
,
"node_templates"
:{
"compute"
:{
"properties"
:{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:{
"Standard"
:{
"create"
:
"dumy.yaml"
}},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"compute_1"
:{
"properties"
:{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:{
"Standard"
:{
"create"
:
"dumy.yaml"
}},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"kubernetes"
:{
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM.topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"interfaces"
:{
"Standard"
:{
"configure"
:{
"inputs"
:{
"playbook"
:
"k8s_dashboard.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"create"
:{
"inputs"
:{
"playbook"
:
"
k8s_install.y
ml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"delete"
:{
"inputs"
:{
"playbook"
:
"k8s_delete.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}}}},
"type"
:
"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
},
"topology"
:{
"properties"
:{
"domain"
:
"Frankfurt"
,
"provider"
:
"EC2"
},
"requirements"
:[{
"vm"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
}},{
"vm"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
}}],
"interfaces"
:{
"CloudsStorm"
:{
"delete"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"hscale"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"provision"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"start"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"stop"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}}}},
"type"
:
"tosca.nodes.ARTICONF.VM.topology"
,
"attributes"
:{
"credential"
:{
"cloud_provider_name"
:
"EC2"
,
"keys"
:{
"aws_access_key_id"
:
"XXXXXXXXXXXX"
},
"token"
:
"XXXXXXXXXXXXX"
,
"token_type"
:
"access_key"
},
"desired_state"
:
"RUNNING"
},
"artifacts"
:{
"provisioned_files"
:{
"required"
:
false
,
"type"
:
"string"
}}},
"ws-pema"
:{
"properties"
:{
"ports"
:[
"30001:8080"
]},
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.Container.Application.Docker"
,
"artifacts"
:{
"image"
:{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"repository"
:
"docker_hub"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
}}}},
"relationship_templates"
:
null
,
"outputs"
:
null
,
"groups"
:
null
,
"substitution_mappings"
:
null
,
"policies"
:
null
},
"template_author"
:
null
,
"template_version"
:
null
,
"description"
:
"TOSCA example"
,
"imports"
:[{
"nodes"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
},{
"data"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"
},{
"capabilities"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"
},{
"policies"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"
},{
"interfaces"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"
}],
"dsl_definitions"
:
null
,
"node_types"
:
null
,
"relationship_types"
:
null
,
"relationship_templates"
:
null
,
"capability_types"
:
null
,
"artifact_types"
:
null
,
"data_types"
:
null
,
"interface_types"
:
null
,
"policy_types"
:
null
,
"group_types"
:
null
,
"repositories"
:
null
}}
{
"owner"
:
"user"
,
"creationDate"
:
1585660972026
,
"toscaTemplate"
:{
"tosca_definitions_version"
:
"tosca_simple_yaml_1_0"
,
"tosca_default_namespace"
:
null
,
"template_name"
:
null
,
"topology_template"
:{
"description"
:
null
,
"inputs"
:
null
,
"node_templates"
:{
"compute"
:{
"properties"
:{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:{
"Standard"
:{
"create"
:
"dumy.yaml"
}},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"compute_1"
:{
"properties"
:{
"disk_size"
:
"10000 MB"
,
"mem_size"
:
"1000 MB"
,
"num_cores"
:
1
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:{
"Standard"
:{
"create"
:
"dumy.yaml"
}},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
},
"kubernetes"
:{
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM.topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"interfaces"
:{
"Standard"
:{
"configure"
:{
"inputs"
:{
"playbook"
:
"k8s_dashboard.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"create"
:{
"inputs"
:{
"playbook"
:
"
install_k8s.ya
ml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}},
"delete"
:{
"inputs"
:{
"playbook"
:
"k8s_delete.yaml"
,
"repository"
:
"https://github.com/skoulouzis/playbooks.git"
}}}},
"type"
:
"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
},
"topology"
:{
"properties"
:{
"domain"
:
"Frankfurt"
,
"provider"
:
"EC2"
},
"requirements"
:[{
"vm"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute"
,
"relationship"
:
"tosca.relationships.DependsOn"
}},{
"vm"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM"
,
"node"
:
"compute_1"
,
"relationship"
:
"tosca.relationships.DependsOn"
}}],
"interfaces"
:{
"CloudsStorm"
:{
"delete"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"hscale"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"provision"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"start"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}},
"stop"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}}}},
"type"
:
"tosca.nodes.ARTICONF.VM.topology"
,
"attributes"
:{
"credential"
:{
"cloud_provider_name"
:
"EC2"
,
"keys"
:{
"aws_access_key_id"
:
"XXXXXXXXXXXX"
},
"token"
:
"XXXXXXXXXXXXX"
,
"token_type"
:
"access_key"
},
"desired_state"
:
"RUNNING"
},
"artifacts"
:{
"provisioned_files"
:{
"required"
:
false
,
"type"
:
"string"
}}},
"ws-pema"
:{
"properties"
:{
"ports"
:[
"30001:8080"
]},
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.Container.Application.Docker"
,
"artifacts"
:{
"image"
:{
"file"
:
"alogo53/ws-pema-lifewatch"
,
"repository"
:
"docker_hub"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
}}}},
"relationship_templates"
:
null
,
"outputs"
:
null
,
"groups"
:
null
,
"substitution_mappings"
:
null
,
"policies"
:
null
},
"template_author"
:
null
,
"template_version"
:
null
,
"description"
:
"TOSCA example"
,
"imports"
:[{
"nodes"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
},{
"data"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"
},{
"capabilities"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"
},{
"policies"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"
},{
"interfaces"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"
}],
"dsl_definitions"
:
null
,
"node_types"
:
null
,
"relationship_types"
:
null
,
"relationship_templates"
:
null
,
"capability_types"
:
null
,
"artifact_types"
:
null
,
"data_types"
:
null
,
"interface_types"
:
null
,
"policy_types"
:
null
,
"group_types"
:
null
,
"repositories"
:
null
}}
example_messages/message_provision_response.json
View file @
6c4561c2
This diff is collapsed.
Click to expand it.
semaphore-python-client-generated/.idea/misc.xml
View file @
6c4561c2
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python
3.8
"
project-jdk-type=
"Python SDK"
/>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python
2.7 (semaphore-python-client-generated)
"
project-jdk-type=
"Python SDK"
/>
</project>
\ No newline at end of file
semaphore-python-client-generated/.idea/semaphore-python-client-generated.iml
View file @
6c4561c2
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"inheritedJdk"
/>
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/venv"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Python 2.7 (semaphore-python-client-generated)"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
<component
name=
"PyDocumentationSettings"
>
...
...
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