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
b4b272bf
Commit
b4b272bf
authored
Mar 11, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added killall apt in playbook
parent
1440e1d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
247 additions
and
18 deletions
+247
-18
message_example_provisioned.json
TOSCA/message_example_provisioned.json
+189
-1
install_k8s.yml
ansible_playbooks/install_k8s.yml
+4
-0
test_deployer.py
deployer/test/test_deployer.py
+35
-10
docker-compose.yml
docker-compose.yml
+19
-7
No files found.
TOSCA/message_example_provisioned.json
View file @
b4b272bf
{
"owner"
:
"user"
,
"creationDate"
:
1580735228286
,
"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"
:
"50000 MB"
,
"mem_size"
:
"6000 MB"
,
"num_cores"
:
2.0
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:{
"Standard"
:{
"create"
:
"dumy.yaml"
}},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
,
"attributes"
:{
"user_key_pair"
:{
"protocol"
:
"ssh"
,
"keys"
:{
"public_key"
:
"c3NoLXJzYSBBQUFBQjNOemFDMXljM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blJEbEt6U0tValg3blo5OTFScXlIRzlzV2JEYWlwY0F0LytBZE5GVVBnQlF1QVZyLzNGZlZUTQpjNEZxSHlkRkZuNTYrcEUySFoyVk1NZ1UrRTgxT1pETzZhNTR1cU1RNGs3TDRnSWNhbFUvZnU0U0dVMFE3S21UQUkwazY0ZVVUdzk0CjljM1Vhd3RWenlHcWcrbGY3TkdXYmhCWEFvR0FUNlFoRzBRZmRYTVVUYmJUOGRVM3VVZkFWTmxsMjBGSmk2Uy9zYlhDUUZBbnFSSWgKL2NrYjJKcDljR1JQdGJhUTZTOEUyU1F5V3BJRlU3L0p5aXVIbEowMVIvMWNMalU2WTlVcTBUemdrK1hheFk2Y2hxckdOYVQ2ZmxHZQpwK01aMVh3VGlwcHZFNzJseFQrRzhib1dhVjVGQ3ltUWJQWUl2VnJCdU5ON2Uya0NnWUVBanlEa0N2U2UyN0tIRXpUVVdlVjg4RDZYCnM4bXNIb3FCdVZIbXpxd0hXOGNURS9id1lCVmgvc2ZVd1VyNCtNRERKUkJMUU4yWFdWVEwwZEUwMkwzQjlVSTI1L0R4MUVaVW5IYnIKVlZZbFB5cjdDWXpzVnZBMGVmeFhBOUdJMEUwUUFBaFo0YTBabWNxRTZoSytRSEJ6K1NiUUxXZzhld24xeFNkRHVQNVFrS0k9Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0t"
}},
"host_name"
:
"vm0"
}},
"compute_1"
:{
"properties"
:{
"disk_size"
:
"50000 MB"
,
"mem_size"
:
"6000 MB"
,
"num_cores"
:
2.0
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:{
"Standard"
:{
"create"
:
"dumy.yaml"
}},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
,
"attributes"
:{
"user_key_pair"
:{
"protocol"
:
"ssh"
,
"keys"
:{
"public_key"
:
"c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FEUlhTTElrMzV5S2Y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0F0LytBZE5GVVBnQlF1QVZyLzNGZlZUTQpjNEZxSHlkRkZuNTYrcEUySFoyVk1NZ1UrRTgxT1pETzZhNTR1cU1RNGs3TDRnSWNhbFUvZnU0U0dVMFE3S21UQUkwazY0ZVVUdzk0CjljM1Vhd3RWenlHcWcrbGY3TkdXYmhCWEFvR0FUNlFoRzBRZmRYTVVUYmJUOGRVM3VVZkFWTmxsMjBGSmk2Uy9zYlhDUUZBbnFSSWgKL2NrYjJKcDljR1JQdGJhUTZTOEUyU1F5V3BJRlU3L0p5aXVIbEowMVIvMWNMalU2WTlVcTBUemdrK1hheFk2Y2hxckdOYVQ2ZmxHZQpwK01aMVh3VGlwcHZFNzJseFQrRzhib1dhVjVGQ3ltUWJQWUl2VnJCdU5ON2Uya0NnWUVBanlEa0N2U2UyN0tIRXpUVVdlVjg4RDZYCnM4bXNIb3FCdVZIbXpxd0hXOGNURS9id1lCVmgvc2ZVd1VyNCtNRERKUkJMUU4yWFdWVEwwZEUwMkwzQjlVSTI1L0R4MUVaVW5IYnIKVlZZbFB5cjdDWXpzVnZBMGVmeFhBOUdJMEUwUUFBaFo0YTBabWNxRTZoSytRSEJ6K1NiUUxXZzhld24xeFNkRHVQNVFrS0k9Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0t"
}},
"host_name"
:
"vm1"
}},
"kubernetes"
:{
"properties"
:{
"min_masters_num"
:
1
,
"min_workers_num"
:
1
},
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.VM.topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"interfaces"
:{
"Kubernetes"
:{
"create"
:{
"inputs"
:{
"playbook"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/ansible_playbooks/create_k8s.yml"
}},
"install"
:{
"inputs"
:{
"playbook"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/ansible_playbooks/install_k8s.yml"
}}}},
"type"
:
"tosca.nodes.ARTICONF.docker.Orchestrator"
},
"logspout"
:{
"properties"
:{
"environment"
:{
"publish"
:
"127.0.0.1:8000:80"
},
"ports"
:[
"8000:80"
],
"volumes"
:[
"/etc/hostname:/etc/host_hostname:ro"
,
"/var/run/docker.sock:/var/run/docker.sock"
]},
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.Container.Application.Docker"
,
"artifacts"
:{
"image"
:{
"file"
:
"gliderlabs/logspout:latest"
,
"repository"
:
"docker_hub"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
}}},
"mysql"
:{
"properties"
:{
"environment"
:{
"MYSQL_DATABASE"
:
"wordpress"
,
"MYSQL_PASSWORD"
:
"wordpress"
,
"MYSQL_ROOT_PASSWORD"
:
"somewordpress"
,
"MYSQL_USER"
:
"wordpress"
},
"ports"
:[
"3306:3306"
],
"volumes"
:[
"db_data:/var/lib/mysql"
]},
"requirements"
:[{
"host"
:{
"capability"
:
"tosca.capabilities.ARTICONF.docker.Orchestrator"
,
"node"
:
"kubernetes"
,
"relationship"
:
"tosca.relationships.HostedOn"
}}],
"type"
:
"tosca.nodes.ARTICONF.Container.Application.Docker"
,
"artifacts"
:{
"image"
:{
"file"
:
"mysql:5.7"
,
"repository"
:
"docker_hub"
,
"type"
:
"tosca.artifacts.Deployment.Image.Container.Docker"
}}},
"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"
:{
"provision"
:{
"inputs"
:{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}}}},
"type"
:
"tosca.nodes.ARTICONF.VM.topology"
,
"attributes"
:{
"credential"
:{
"cloud_provider_name"
:
"EC2"
,
"keys"
:{
"aws_access_key_id"
:
"XXXXXXXXXXXXX"
},
"token"
:
"XXXXXXXX"
,
"token_type"
:
"access_key"
},
"status"
:
"running"
}}},
"relationship_templates"
:
null
,
"outputs"
:
null
,
"groups"
:
null
,
"substitution_mappings"
:
null
,
"policies"
:[{
"scalability"
:{
"properties"
:{
"constraint_name"
:
"cpu_load"
,
"max_value"
:
90
},
"targets"
:[
"mysql"
],
"type"
:
"tosca.policies.ARTICONF.Performance.CPU"
}},{
"faultTolerance"
:{
"properties"
:{
"level"
:
1
},
"targets"
:[
"mysql"
],
"type"
:
"tosca.policies.ARTICONF.FaultTolerance"
}}]},
"template_author"
:
null
,
"template_version"
:
null
,
"description"
:
"TOSCA example"
,
"imports"
:[{
"nodes"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml"
},{
"data"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/TOSCA/types/data.yml"
},{
"capabilities"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml"
},{
"policies"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml"
},{
"interfaces"
:
"https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/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
}}
{
"creationDate"
:
1583932800151
,
"toscaTemplate"
:
{
"tosca_definitions_version"
:
"tosca_simple_yaml_1_0"
,
"topology_template"
:
{
"node_templates"
:
{
"compute"
:
{
"properties"
:
{
"disk_size"
:
"50000 MB"
,
"mem_size"
:
"6000 MB"
,
"num_cores"
:
2
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:
{
"Standard"
:
{
"create"
:
"dumy.yaml"
}
},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
,
"attributes"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"keys"
:
{
"public_key"
:
"c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDZmQvWUZHOTRSbUt6S2dabjVsWW9PU2VqM09yKzJEMFpOOE9jL1hIZmNnTUNNTDkydm13SkFGV090bTZpWTZYYWY4R3EwM1Y1TERRdnlaZGtGbDhuTU5XUlp3R3ZmaWM3MGNlL1puRDhERExKR3A2Z01qK3lSdVpYYTJIR1BxMFV1NitVSGJnc2haMURadjhpQTE2b0hzd3NJemtMTTRDUXIyZ2tHcTdrdFFRPT0gYXV0byBnZW5lcmF0ZWQgdXNlciBhY2NlZXMga2V5cwo="
,
"private_key"
:
"LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDWEFJQkFBS0JnUUNmZC9ZRkc5NFJtS3pLZ1puNWxZb09TZWozT3IrMkQwWk44T2MvWEhmY2dNQ01MOTJ2Cm13SkFGV090bTZpWTZYYWY4R3EwM1Y1TERRdnlaZGtGbDhuTU5XUlp3R3ZmaWM3MGNlL1puRDhERExKR3A2Z00Kait5UnVaWGEySEdQcTBVdTYrVUhiZ3NoWjFEWnY4aUExNm9Ic3dzSXprTE00Q1FyMmdrR3E3a3RRUUlEQVFBQgpBb0dBRGlxY0Ftd3RXQ2JXQXM5c25FMTZqRFpvcWIzZ1ZnNFpVc2M1NDlrVkZOT2pSMURoUXI1a2Zzam5wLzZTCkJiT0h4RUdaV1NQcFFvV1FNQ0o0R3hVVzZoZFY5aDJvN3lKMTlQb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ci9kd2Q5cUNEL2tqdTlyR0FWRldvaldSMGJ6ZkFVVVNZc0RUWUlRMHRnc3kreDBFQVdJQkM1M2QzcDg0aUc1Mk0KQjBpMG84LzdoZDJmR29NMXlVRUNRQmNxQnl3OGZIVm5PdFVOK0xsT3VYQ1QrSFgvSzFrQzBCbHlmb2hlRGVKNgpXSVprOExtZzFhQTRkcTdhSzREUmUxU1NZQUZjcGhpam5vQU0yRmJKRkNNPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
}
},
"host_name"
:
"vm0"
}
},
"compute_1"
:
{
"properties"
:
{
"disk_size"
:
"50000 MB"
,
"mem_size"
:
"6000 MB"
,
"num_cores"
:
2
,
"os"
:
"Ubuntu 18.04"
,
"user_name"
:
"vm_user"
},
"interfaces"
:
{
"Standard"
:
{
"create"
:
"dumy.yaml"
}
},
"type"
:
"tosca.nodes.ARTICONF.VM.Compute"
,
"attributes"
:
{
"user_key_pair"
:
{
"protocol"
:
"ssh"
,
"keys"
:
{
"public_key"
:
"c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDZmQvWUZHOTRSbUt6S2dabjVsWW9PU2VqM09yKzJEMFpOOE9jL1hIZmNnTUNNTDkydm13SkFGV090bTZpWTZYYWY4R3EwM1Y1TERRdnlaZGtGbDhuTU5XUlp3R3ZmaWM3MGNlL1puRDhERExKR3A2Z01qK3lSdVpYYTJIR1BxMFV1NitVSGJnc2haMURadjhpQTE2b0hzd3NJemtMTTRDUXIyZ2tHcTdrdFFRPT0gYXV0byBnZW5lcmF0ZWQgdXNlciBhY2NlZXMga2V5cwo="
,
"private_key"
:
"LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDWEFJQkFBS0JnUUNmZC9ZRkc5NFJtS3pLZ1puNWxZb09TZWozT3IrMkQwWk44T2MvWEhmY2dNQ01MOTJ2Cm13SkFGV090bTZpWTZYYWY4R3EwM1Y1TERRdnlaZGtGbDh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TnlzeXV2NkR0ck9wCjI4bkxCcE5EQWtFQWtYMzdkVU5nMSsrTUhIbnZPVVJPMjVvdVFDSlM5Y2ZsY2dPWXZXMUNKVW10UFU4RGZNek0KcTVXTnJSay9VdkxDc3FBQkdybWdxdkNwNlVROHBlRFZRd0pCQUw5aU5Fa0tCRW41QWVjamRsY1FyNTFXenZBUQpZa2VsdFVQbDQ1R0RMN2xnUWdjalZYS3RVclU4N1lJT3FqWlVISTVVRjZrazdheXlRSjZGSWIvejVVMENRRzE0Ci9kd2Q5cUNEL2tqdTlyR0FWRldvaldSMGJ6ZkFVVVNZc0RUWUlRMHRnc3kreDBFQVdJQkM1M2QzcDg0aUc1Mk0KQjBpMG84LzdoZDJmR29NMXlVRUNRQmNxQnl3OGZIVm5PdFVOK0xsT3VYQ1QrSFgvSzFrQzBCbHlmb2hlRGVKNgpXSVprOExtZzFhQTRkcTdhSzREUmUxU1NZQUZjcGhpam5vQU0yRmJKRkNNPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
}
},
"host_name"
:
"vm1"
}
},
"kubernetes"
:
{
"requirements"
:
[
{
"host"
:
{
"capability"
:
"tosca.capabilities.ARTICONF.VM.topology"
,
"node"
:
"topology"
,
"relationship"
:
"tosca.relationships.HostedOn"
}
}
],
"interfaces"
:
{
"Kubernetes"
:
{
"configure"
:
{
"inputs"
:
{
"playbook"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/dashboard.yaml"
}
},
"create"
:
{
"inputs"
:
{
"playbook"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/create_k8s.yml"
}
},
"install"
:
{
"inputs"
:
{
"playbook"
:
"https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/install_k8s.yml"
}
}
}
},
"type"
:
"tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
},
"topology"
:
{
"properties"
:
{
"domain"
:
"UvA (Amsterdam, The Netherlands) XO Rack"
,
"provider"
:
"ExoGENI"
},
"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"
:
{
"provision"
:
{
"inputs"
:
{
"code_type"
:
"SEQ"
,
"object_type"
:
"SubTopology"
}
}
}
},
"type"
:
"tosca.nodes.ARTICONF.VM.topology"
,
"attributes"
:
{
"status"
:
"running"
}
},
"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"
}
}
}
}
},
"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"
}
]
}
}
ansible_playbooks/install_k8s.yml
View file @
b4b272bf
...
@@ -10,6 +10,10 @@
...
@@ -10,6 +10,10 @@
#path: /etc/resolv.conf
#path: /etc/resolv.conf
#regexp: 'nameserver.*'
#regexp: 'nameserver.*'
#line: nameserver 8.8.8.8
#line: nameserver 8.8.8.8
-
name
:
Kill running processes
shell
:
"
killall
apt
apt-get"
ignore_errors
:
yes
-
name
:
Update and upgrade apt packages
-
name
:
Update and upgrade apt packages
become
:
true
become
:
true
...
...
deployer/test/test_deployer.py
View file @
b4b272bf
...
@@ -15,7 +15,6 @@ from tower_cli.conf import settings
...
@@ -15,7 +15,6 @@ from tower_cli.conf import settings
class
TestDeployer
(
unittest
.
TestCase
):
class
TestDeployer
(
unittest
.
TestCase
):
def
test_parse_token
(
self
):
def
test_parse_token
(
self
):
tosca_path
=
"../../ansible_playbooks/"
tosca_path
=
"../../ansible_playbooks/"
example_ansible_output_file_path
=
tosca_path
+
'/example_ansible_output.out'
example_ansible_output_file_path
=
tosca_path
+
'/example_ansible_output.out'
...
@@ -39,16 +38,42 @@ class TestDeployer(unittest.TestCase):
...
@@ -39,16 +38,42 @@ class TestDeployer(unittest.TestCase):
parsed_json_message
=
json
.
load
(
stream
)
parsed_json_message
=
json
.
load
(
stream
)
print
(
parsed_json_message
)
print
(
parsed_json_message
)
# owner = parsed_json_message['owner']
tosca_file_name
=
'tosca_template'
tosca_template_dict
=
parsed_json_message
[
'toscaTemplate'
]
tosca_interfaces
=
tosca
.
get_interfaces
(
tosca_template_dict
)
tmp_path
=
tempfile
.
mkdtemp
()
vms
=
tosca
.
get_vms
(
tosca_template_dict
)
inventory_path
=
ansible_service
.
write_inventory_file
(
tmp_path
,
vms
)
paths
=
ansible_service
.
write_playbooks_from_tosca_interface
(
tosca_interfaces
,
tmp_path
)
tokens
=
{}
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
)
# settings.runtime_values()
response
=
{
'toscaTemplate'
:
tosca_template_dict
}
# with settings.runtime_values(host='localhost',username='admin', password='password'):
output_current_milli_time
=
int
(
round
(
time
.
time
()
*
1000
))
# try:
response
[
"creationDate"
]
=
output_current_milli_time
# res = get_resource('organization')
logger
.
info
(
"Returning Deployment"
)
# new_org = res.create(name='foo', description='bar', fail_on_found=True)
logger
.
info
(
"Output message:"
+
json
.
dumps
(
response
))
# except Found:
# print('This organization already exists.')
# assert isinstance(new_org, dict)
# print(new_org['id'])
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
docker-compose.yml
View file @
b4b272bf
...
@@ -80,6 +80,18 @@ services:
...
@@ -80,6 +80,18 @@ services:
#MEMCACHED_PORT: 11211
#MEMCACHED_PORT: 11211
logspout
:
ports
:
-
"
30002:80"
volumes
:
-
/etc/hostname:/etc/host_hostname:ro
-
/var/run/docker.sock:/var/run/docker.sock
environment
:
publish
:
"
127.0.0.1:30002:80"
image
:
gliderlabs/logspout:latest
mongo
:
mongo
:
image
:
mongo:4
image
:
mongo:4
ports
:
ports
:
...
@@ -126,13 +138,13 @@ services:
...
@@ -126,13 +138,13 @@ services:
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
:
alogo53/deployer:3.0.0
#
image: alogo53/deployer:3.0.0
environment
:
#
environment:
RABBITMQ_HOST
:
rabbit
#
RABBITMQ_HOST: rabbit
#volumes:
#volumes:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment