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
ac710981
Commit
ac710981
authored
Jan 28, 2020
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added task to get key
parent
6172a79f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
52 deletions
+52
-52
application_example_provisioned.yaml
TOSCA/application_example_provisioned.yaml
+23
-46
create_k8s.yml
ansible_playbooks/create_k8s.yml
+14
-0
ansible_service.py
deployer/service/ansible_service.py
+7
-4
k8s_service.py
deployer/service/k8s_service.py
+8
-2
No files found.
TOSCA/application_example_provisioned.yaml
View file @
ac710981
...
@@ -16,16 +16,16 @@ topology_template:
...
@@ -16,16 +16,16 @@ topology_template:
user_key_pair
:
user_key_pair
:
protocol
:
"
ssh"
protocol
:
"
ssh"
keys
:
keys
:
public_key
:
"
c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDV
nlpOVNZWitKTnp0ZG9maUM5WXI4RkhHZWJDdHdPUGl0bTFXVmNTL1pPM05tQXhXbXg1RGRDMUI4MU5GZEVWZEt2Nng2N0diSjI2SEplREhIMU9pMmt3aExDQzM5R0dZNmxPSjh4U0hKMjFJVXVydTRCaGk5STNGSlZ0Q1o0ckhIUGsvcjhkaUlCQ1BrNjc1SllkSERFN0ZUbWpUN0lnOGptdzk0dThYZFp
RPT0gYXV0byBnZW5lcmF0ZWQgdXN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BQjJONmpSYQpydWxhNklnYzFYYjdTUGl0TEpFQjFNZytyUW5EZDZWWXZqcVVGaW9zWVdhYlJSdGtPQ1VPdWt5cklLY1puZ3Q4CjdrdHN6T1c1QWtFQXYzeEFHYUdyWkk1KzdjSTF4Si9NaWVRa1pkaFFWTEpEUnpwT3FJVjVKaFIzbCt2R3N2R2MKWWhwUG9IL1VoN3hsV3NLUVF2Q3Y2azhyaVh1dmZ6aTMyUUpBQTJDb0NtYzJGNHlXOS9YNlB1V3FjaUU1YnhoWAo0ajdlNXhMemorbENRcDRjalJJUzFTeFI1SkIxTWFERXhyY1NGOThUTGNMTVNlZVY5YS9nWDZCSE1RSkFadHNVCkIzQ2JBdW16N255cXF4SjNLUDUrT3FLbUM4aXhjTm8yRkRtVjZNbUhyL2c3QkRYYUhhd3FaM2tpclVLYVl0VXQKN25jZzEwaHRoMjBEeU4rcmlRSkFRMHVvNW9HaUxJSHNEQUR5Nkw1azdrNTZjVUlhZnhpeVRHdzlWQ2tUY3puVQpPS1liYXFVM3lyaDRqbzRYTHlGd3JYcHJOdkNsb29pY1JIMTdSUkMxUH
c9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
public_ip
:
"
1
72.17.0.2
"
public_ip
:
"
1
92.125.18.246
"
role
:
"
master"
role
:
"
master"
node_type
:
"
XOLarge
"
node_type
:
"
t2.medium
"
root_key_pair
:
root_key_pair
:
protocol
:
"
ssh"
protocol
:
"
ssh"
keys
:
keys
:
public_key
:
"
c
3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDQ1dOLzN2VWg1a3h4QzZwSWZ4blFhN1d1ZllKZW5rMG5MSmIxRkFNaTdIMzhNVWJwSkE3UERwck9SbGhiTEU5ZVVsY1MwakE3Qmp1NXdsVkxlWi8rSjIzK2Z2UHdvb2FIQ0kvVXNiZ3ZFc05sZVhwdmxodEtCalBnVlF3b0Y3TjdmQmFaSFdYVWZLWHZpSHVENDRWekp1Ym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E8zUndPYThsbWVEMFluTWE5RElVcFljS1NJaEdrWjFVbkUwaHF0MGFRN0I4M0tqenBJemRFdEVyUk9uSnFsdzZXazA5cQpWQ2F4VG52aTh6c2JBbHdVeWRNT0s3NGJmZXVNc3QyZjlSS2dpNkVadkpJZkFvR0JBS3BaWjRnb1I4ZFVFSTJJQm9zNjdCNExia1JVCll5elg2RFZrcEd5MzMvYVIyRUtHZ0ZGenNnS2I1K204dFhOM1lRTFhxbGJNTU1Oakx2eVVZdk53dzQzLzVvRHhhbGxIa3c2dW1BWDgKbkhtOGFmajYyTzVrREhsRUcrZDdCQTVqMHhyeGxnM1J4S0xvcXBoSnNKTWVFYWszYVV4bXlWMkI1S3pyalg5eGZVbzcKLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0
="
host_name
:
"
vm0"
host_name
:
"
vm0"
compute_1
:
compute_1
:
properties
:
properties
:
...
@@ -42,16 +42,16 @@ topology_template:
...
@@ -42,16 +42,16 @@ topology_template:
user_key_pair
:
user_key_pair
:
protocol
:
"
ssh"
protocol
:
"
ssh"
keys
:
keys
:
public_key
:
"
c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDV
nlpOVNZWitKTnp0ZG9maUM5WXI4RkhHZWJDdHdPUGl0bTFXVmNTL1pPM05tQXhXbXg1RGRDMUI4MU5GZEVWZEt2Nng2N0diSjI2SEplREhIMU9pMmt3aExDQzM5R0dZNmxPSjh4U0hKMjFJVXVydTRCaGk5STNGSlZ0Q1o0ckhIUGsvcjhkaUlCQ1BrNjc1SllkSERFN0ZUbWpUN0lnOGptdzk0dThYZFp
RPT0gYXV0byBnZW5lcmF0ZWQgdXNlciBhY2NlZXMga2V5cwo="
public_key
:
"
c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDV
3l6VEoxS1pycDVvVHVBVm15dmxKL2prMnRNdktZSlAvSWtHZ1JKeTVFNUgrbjl0eU1QRXdyUD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TEpEUnpwT3FJVjVKaFIzbCt2R3N2R2MKWWhwUG9IL1VoN3hsV3NLUVF2Q3Y2azhyaVh1dmZ6aTMyUUpBQTJDb0NtYzJGNHlXOS9YNlB1V3FjaUU1YnhoWAo0ajdlNXhMemorbENRcDRjalJJUzFTeFI1SkIxTWFERXhyY1NGOThUTGNMTVNlZVY5YS9nWDZCSE1RSkFadHNVCkIzQ2JBdW16N255cXF4SjNLUDUrT3FLbUM4aXhjTm8yRkRtVjZNbUhyL2c3QkRYYUhhd3FaM2tpclVLYVl0VXQKN25jZzEwaHRoMjBEeU4rcmlRSkFRMHVvNW9HaUxJSHNEQUR5Nkw1azdrNTZjVUlhZnhpeVRHdzlWQ2tUY3puVQpPS1liYXFVM3lyaDRqbzRYTHlGd3JYcHJOdkNsb29pY1JIMTdSUkMxUH
c9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
public_ip
:
"
1
72.17.0.3
"
public_ip
:
"
1
92.122.56.251
"
role
:
"
worker"
role
:
"
worker"
node_type
:
"
XOLarge
"
node_type
:
"
t2.medium
"
root_key_pair
:
root_key_pair
:
protocol
:
"
ssh"
protocol
:
"
ssh"
keys
:
keys
:
public_key
:
"
c
3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDQ1dOLzN2VWg1a3h4QzZwSWZ4blFhN1d1ZllKZW5rMG5MSmIxRkFNaTdIMzhNVWJwSkE3UERwck9SbGhiTEU5ZVVsY1MwakE3Qmp1NXdsVkxlWi8rSjIzK2Z2UHdvb2FIQ0kvVXNiZ3ZFc05sZVhwdmxodEtCalBnVlF3b0Y3TjdmQmFaSFdYVWZLWHZpSHVENDRWekp1YmdVYTJDWmRRN2JvQ05VNkhWTndRPT0ga2V5UGFpci1iNWUxYTRjMC01ZjA5LTQyMGMtODQ1Yi04YTIyYmJjOWUxMGIK
"
public_key
:
"
c
HVibGljS2V5LTM5NjBjZThjLTA0NzctNDcyNC1iZTc5LWM5NGNj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JBS3BaWjRnb1I4ZFVFSTJJQm9zNjdCNExia1JVCll5elg2RFZrcEd5MzMvYVIyRUtHZ0ZGenNnS2I1K204dFhOM1lRTFhxbGJNTU1Oakx2eVVZdk53dzQzLzVvRHhhbGxIa3c2dW1BWDgKbkhtOGFmajYyTzVrREhsRUcrZDdCQTVqMHhyeGxnM1J4S0xvcXBoSnNKTWVFYWszYVV4bXlWMkI1S3pyalg5eGZVbzcKLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0
="
host_name
:
"
vm1"
host_name
:
"
vm1"
kubernetes
:
kubernetes
:
properties
:
properties
:
...
@@ -63,10 +63,12 @@ topology_template:
...
@@ -63,10 +63,12 @@ topology_template:
node
:
"
topology"
node
:
"
topology"
relationship
:
"
tosca.relationships.HostedOn"
relationship
:
"
tosca.relationships.HostedOn"
interfaces
:
interfaces
:
Standard
:
Kubernetes
:
create
:
create
:
inputs
:
inputs
:
inventory-file
:
"
k8s_hosts"
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"
playbook
:
"
https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/ansible_playbooks/install_k8s.yml"
type
:
"
tosca.nodes.ARTICONF.Orchestrator.Kubernetes"
type
:
"
tosca.nodes.ARTICONF.Orchestrator.Kubernetes"
logspout
:
logspout
:
...
@@ -113,8 +115,8 @@ topology_template:
...
@@ -113,8 +115,8 @@ topology_template:
type
:
"
tosca.artifacts.Deployment.Image.Container.Docker"
type
:
"
tosca.artifacts.Deployment.Image.Container.Docker"
topology
:
topology
:
properties
:
properties
:
domain
:
"
UvA
(Amsterdam,
The
Netherlands)
XO
Rack
"
domain
:
"
Frankfurt
"
provider
:
"
E
xoGENI
"
provider
:
"
E
C2
"
requirements
:
requirements
:
-
vm
:
-
vm
:
capability
:
"
tosca.capabilities.ARTICONF.VM"
capability
:
"
tosca.capabilities.ARTICONF.VM"
...
@@ -133,44 +135,19 @@ topology_template:
...
@@ -133,44 +135,19 @@ topology_template:
type
:
"
tosca.nodes.ARTICONF.VM.topology"
type
:
"
tosca.nodes.ARTICONF.VM.topology"
attributes
:
attributes
:
credential
:
credential
:
cloud_provider_name
:
"
E
xoGENI
"
cloud_provider_name
:
"
E
C2
"
keys
:
keys
:
keystore
:
"
vDxqtcGQaEapBgwFjEUMBIGA1UEAxMLY2guZ2VuaS5uZXSCAQMwOwYDVR0lBDQwMgYIKwYBBQUHAwEGCCsGAQUFBwMCBggrBgEFBQcDCAYIKwYBBQUHAwMGCCsGAQUFBwMEMAkGA1UdEwQCMAAweAYDVR0RBHEwb4EScy5rb3Vsb3V6aXNAdXZhLm5ship1cm46cHVibGljaWQ6SUROK2NoLmdlbmkubmV0K3VzZXIrc2tvdWxvMDGGLXVybjp1dWlkOjg2N2M5NmE3LWU3YTktNDY5Yi05N2RlLWZjNjYxNmIyZWE5NDANBgkqhkiG9w0BAQsFAAOCAQEAJF+4nJ2bqOBYmY9ZmkcH47WJwWHNz/KFrn5tIZ0xODEwMTcyMDU1MjdaFw0yMzEwMjIyMDU1MjdaMIGJMRQwEgYDVQQKDAtjaC5nZW5pLm5ldDESMBAGA1UECwwJYXV0aG9yaXR5MQswCQYDVQQLDAJtYTEtMCsGA1UEAwwkMzFjMG"
aws_access_key_id
:
"
XXXXXXXXXXXXXXXXXXXXXXXX"
token
:
"
password"
token
:
"
XXXXXXXXXXXXXXXXXXXXXX"
token_type
:
"
password"
token_type
:
"
access_key"
user
:
"
user"
status
:
"
running"
status
:
"
running"
wordpress
:
properties
:
environment
:
WORDPRESS_DB_HOST
:
"
mysql:3306"
WORDPRESS_DB_NAME
:
"
wordpress"
WORDPRESS_DB_PASSWORD
:
"
wordpress"
WORDPRESS_DB_USER
:
"
wordpress"
ports
:
-
"
8000:80"
requirements
:
-
service
:
node
:
"
mysql"
relationship
:
type
:
"
tosca.relationships.DependsOn"
-
host
:
capability
:
"
tosca.capabilities.ARTICONF.Orchestrator"
node
:
"
kubernetes"
relationship
:
"
tosca.relationships.HostedOn"
type
:
"
tosca.nodes.ARTICONF.Container.Application.Docker"
artifacts
:
image
:
file
:
"
wordpress:latest"
repository
:
"
docker_hub"
type
:
"
tosca.artifacts.Deployment.Image.Container.Docker"
policies
:
policies
:
-
scalability
:
-
scalability
:
properties
:
properties
:
constraint_name
:
"
cpu_load"
constraint_name
:
"
cpu_load"
max_value
:
90
max_value
:
90
targets
:
targets
:
-
"
wordpress
"
-
"
mysql
"
type
:
"
tosca.policies.ARTICONF.Performance.CPU"
type
:
"
tosca.policies.ARTICONF.Performance.CPU"
-
faultTolerance
:
-
faultTolerance
:
properties
:
properties
:
...
...
ansible_playbooks/create_k8s.yml
View file @
ac710981
...
@@ -76,3 +76,17 @@
...
@@ -76,3 +76,17 @@
-
name
:
print nodes
-
name
:
print nodes
debug
:
debug
:
var
:
nodes_out
var
:
nodes_out
-
name
:
get api key
shell
:
kubectl describe secret $(kubectl get secrets | grep default | cut -f1 -d ' ') | grep -E '^token' | cut -f2 -d':' | tr -d '\t'
register
:
api_key
-
name
:
print api_key
debug
:
var
:
api_key
deployer/service/ansible_service.py
View file @
ac710981
...
@@ -65,6 +65,7 @@ def write_ansible_files(vms, interfaces, tmp_path):
...
@@ -65,6 +65,7 @@ def write_ansible_files(vms, interfaces, tmp_path):
print
(
'ansible_ssh_user='
+
ansible_ssh_user
,
file
=
k8s_hosts_file
)
print
(
'ansible_ssh_user='
+
ansible_ssh_user
,
file
=
k8s_hosts_file
)
image_url
=
interfaces
[
'Kubernetes'
][
'install'
][
'inputs'
][
'playbook'
]
image_url
=
interfaces
[
'Kubernetes'
][
'install'
][
'inputs'
][
'playbook'
]
r
=
requests
.
get
(
image_url
)
r
=
requests
.
get
(
image_url
)
with
open
(
tmp_path
+
"/install.yml"
,
'wb'
)
as
f
:
with
open
(
tmp_path
+
"/install.yml"
,
'wb'
)
as
f
:
f
.
write
(
r
.
content
)
f
.
write
(
r
.
content
)
...
@@ -90,11 +91,13 @@ def run(interfaces, vms):
...
@@ -90,11 +91,13 @@ def run(interfaces, vms):
p
=
Popen
([
"ansible-playbook"
,
"-i"
,
tmp_path
+
"/k8s_hosts"
,
tmp_path
+
"/create.yml"
],
stdin
=
PIPE
,
stdout
=
PIPE
,
p
=
Popen
([
"ansible-playbook"
,
"-i"
,
tmp_path
+
"/k8s_hosts"
,
tmp_path
+
"/create.yml"
],
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
)
stderr
=
PIPE
)
output
,
err
=
p
.
communicate
()
output
,
err
=
p
.
communicate
()
print
(
output
.
decode
(
'utf-8'
))
out
=
output
.
decode
(
'utf-8'
)
print
(
err
.
decode
(
'utf-8'
))
err
=
err
.
decode
(
'utf-8'
)
print
(
out
)
print
(
err
)
rc
=
p
.
returncode
rc
=
p
.
returncode
api_key
=
out
return
tmp_path
return
api_key
def
execute_playbook
(
hosts
,
playbook_path
,
user
,
ssh_key_file
,
extra_vars
,
passwords
):
def
execute_playbook
(
hosts
,
playbook_path
,
user
,
ssh_key_file
,
extra_vars
,
passwords
):
...
...
deployer/service/k8s_service.py
View file @
ac710981
def
get_dockers
(
tosca_template_json
):
def
get_dockers
(
tosca_template_json
):
pass
dockers
=
[]
node_templates
=
tosca_template_json
[
'topology_template'
][
'node_templates'
]
for
node_name
in
node_templates
:
if
node_templates
[
node_name
][
'type'
]
==
'tosca.nodes.ARTICONF.Container.Application.Docker'
:
dockers
.
append
(
node_templates
[
node_name
])
return
dockers
def
write_k8s_files
(
dockers
):
def
write_k8s_files
(
dockers
):
pass
pass
def
run
(
tosca_template_json
):
def
run
(
tosca_template_json
):
dockers
=
get_dockers
(
tosca_template_json
)
dockers
=
get_dockers
(
tosca_template_json
)
tmp_dir
=
write_k8s_files
(
dockers
)
tmp_dir
=
write_k8s_files
(
dockers
)
return
None
return
tmp_dir
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment