Commit bee965c7 authored by Spiros Koulouzis's avatar Spiros Koulouzis

changed interfaces

parent 8c1927fa
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: 50000 MB
mem_size: 6000 MB
num_cores: 2
os: Ubuntu 18.04
type: tosca.nodes.ARTICONF.VM.Compute
compute_1:
disk_size: "10000 MB"
mem_size: "1000 MB"
num_cores: 1
os: "Ubuntu 18.04"
user_name: "vm_user"
interfaces:
Standard:
create: dumy.yaml
create: "dumy.yaml"
type: "tosca.nodes.ARTICONF.VM.Compute"
compute_1:
properties:
disk_size: 50000 MB
mem_size: 6000 MB
num_cores: 2
os: Ubuntu 18.04
type: tosca.nodes.ARTICONF.VM.Compute
compute_2:
disk_size: "10000 MB"
mem_size: "1000 MB"
num_cores: 1
os: "Ubuntu 18.04"
user_name: "vm_user"
interfaces:
Standard:
create: dumy.yaml
properties:
disk_size: 50000 MB
mem_size: 6000 MB
num_cores: 2
os: Ubuntu 18.04
type: tosca.nodes.ARTICONF.VM.Compute
create: "dumy.yaml"
type: "tosca.nodes.ARTICONF.VM.Compute"
kubernetes:
interfaces:
Standard:
create: interfaces/playbooks/kubernetes_install.yaml
properties:
min_masters_num: 1
min_workers_num: 1
requirements:
- host:
capability: tosca.capabilities.ARTICONF.VM.topology
node: topology
relationship: tosca.relationships.HostedOn
type: tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes
logspout:
artifacts:
image:
file: gliderlabs/logspout:latest
repository: docker_hub
type: tosca.artifacts.Deployment.Image.Container.Docker
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
mysql:
artifacts:
image:
file: mysql:5.7
repository: docker_hub
type: tosca.artifacts.Deployment.Image.Container.Docker
capability: "tosca.capabilities.ARTICONF.VM.topology"
node: "topology"
relationship: "tosca.relationships.HostedOn"
type: "tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
topology:
properties:
environment:
MYSQL_DATABASE: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_USER: wordpress
ports:
- 3306:3306
volumes:
- db_data:/var/lib/mysql
domain: "Frankfurt"
provider: "EC2"
requirements:
- host:
capability: tosca.capabilities.ARTICONF.docker.Orchestrator
node: kubernetes
relationship: tosca.relationships.HostedOn
type: tosca.nodes.ARTICONF.Container.Application.Docker
topology:
- 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
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"
artifacts:
provisioned_files:
required: false
type: "string"
topology_1:
properties:
domain: UvA (Amsterdam, The Netherlands) XO Rack
provider: ExoGENI
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
topology_1:
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
properties:
domain: UNC BEN (Chapel Hill, NC USA)
provider: ExoGENI
requirements:
- vm:
capability: tosca.capabilities.ARTICONF.VM
node: compute_2
relationship: tosca.relationships.DependsOn
type: tosca.nodes.ARTICONF.VM.topology
wordpress:
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"
artifacts:
image:
file: wordpress:latest
repository: docker_hub
type: tosca.artifacts.Deployment.Image.Container.Docker
provisioned_files:
required: false
type: "string"
ws-pema:
properties:
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_USER: wordpress
ports:
- 8000:80
- "30001:8080"
requirements:
- service:
node: mysql
relationship:
type: tosca.relationships.DependsOn
- host:
capability: tosca.capabilities.ARTICONF.docker.Orchestrator
node: kubernetes
relationship: tosca.relationships.HostedOn
type: tosca.nodes.ARTICONF.Container.Application.Docker
policies:
- scalability:
properties:
constraint_name: cpu_load
max_value: 90
targets:
- wordpress
type: tosca.policies.ARTICONF.Performance.CPU
- faultTolerance:
properties:
level: 1
targets:
- mysql
type: tosca.policies.ARTICONF.FaultTolerance
outputs:
private_ip_compute:
description: The private IP address of the application’s first tier.
value: { get_attribute: [compute, private_ip] }
private_ip_compute_1:
description: The private IP address of the application’s second tier.
value: { get_attribute: [compute_1, private_ip] }
private_ip_compute_2:
description: The private IP address of the application’s second tier.
value: { get_attribute: [compute_2, private_ip] }
tosca_definitions_version: tosca_simple_yaml_1_0
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"
......@@ -59,17 +59,6 @@ topology_template:
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment