Commit bee965c7 authored by Spiros Koulouzis's avatar Spiros Koulouzis

changed interfaces

parent 8c1927fa
description: TOSCA example tosca_definitions_version: "tosca_simple_yaml_1_0"
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
topology_template: topology_template:
node_templates: node_templates:
compute: compute:
interfaces:
Standard:
create: dumy.yaml
properties: properties:
disk_size: 50000 MB disk_size: "10000 MB"
mem_size: 6000 MB mem_size: "1000 MB"
num_cores: 2 num_cores: 1
os: Ubuntu 18.04 os: "Ubuntu 18.04"
type: tosca.nodes.ARTICONF.VM.Compute user_name: "vm_user"
compute_1:
interfaces: interfaces:
Standard: Standard:
create: dumy.yaml create: "dumy.yaml"
type: "tosca.nodes.ARTICONF.VM.Compute"
compute_1:
properties: properties:
disk_size: 50000 MB disk_size: "10000 MB"
mem_size: 6000 MB mem_size: "1000 MB"
num_cores: 2 num_cores: 1
os: Ubuntu 18.04 os: "Ubuntu 18.04"
type: tosca.nodes.ARTICONF.VM.Compute user_name: "vm_user"
compute_2:
interfaces: interfaces:
Standard: Standard:
create: dumy.yaml create: "dumy.yaml"
properties: type: "tosca.nodes.ARTICONF.VM.Compute"
disk_size: 50000 MB
mem_size: 6000 MB
num_cores: 2
os: Ubuntu 18.04
type: tosca.nodes.ARTICONF.VM.Compute
kubernetes: 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: requirements:
- host: - host:
capability: tosca.capabilities.ARTICONF.docker.Orchestrator capability: "tosca.capabilities.ARTICONF.VM.topology"
node: kubernetes node: "topology"
relationship: tosca.relationships.HostedOn relationship: "tosca.relationships.HostedOn"
type: tosca.nodes.ARTICONF.Container.Application.Docker type: "tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
mysql: topology:
artifacts:
image:
file: mysql:5.7
repository: docker_hub
type: tosca.artifacts.Deployment.Image.Container.Docker
properties: properties:
environment: domain: "Frankfurt"
MYSQL_DATABASE: wordpress provider: "EC2"
MYSQL_PASSWORD: wordpress
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_USER: wordpress
ports:
- 3306:3306
volumes:
- db_data:/var/lib/mysql
requirements: requirements:
- host: - vm:
capability: tosca.capabilities.ARTICONF.docker.Orchestrator capability: "tosca.capabilities.ARTICONF.VM"
node: kubernetes node: "compute_1"
relationship: tosca.relationships.HostedOn relationship: "tosca.relationships.DependsOn"
type: tosca.nodes.ARTICONF.Container.Application.Docker
topology:
interfaces: interfaces:
CloudsStorm: CloudsStorm:
delete:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
hscale:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
provision: provision:
inputs: inputs:
code_type: SEQ code_type: "SEQ"
object_type: SubTopology 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: properties:
domain: UvA (Amsterdam, The Netherlands) XO Rack domain: "Frankfurt"
provider: ExoGENI provider: "EC2"
requirements: requirements:
- vm: - vm:
capability: tosca.capabilities.ARTICONF.VM capability: "tosca.capabilities.ARTICONF.VM"
node: compute node: "compute_1"
relationship: tosca.relationships.DependsOn 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:
interfaces: interfaces:
CloudsStorm: CloudsStorm:
delete:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
hscale:
inputs:
code_type: "SEQ"
object_type: "SubTopology"
provision: provision:
inputs: inputs:
code_type: SEQ code_type: "SEQ"
object_type: SubTopology object_type: "SubTopology"
properties: start:
domain: UNC BEN (Chapel Hill, NC USA) inputs:
provider: ExoGENI code_type: "SEQ"
requirements: object_type: "SubTopology"
- vm: stop:
capability: tosca.capabilities.ARTICONF.VM inputs:
node: compute_2 code_type: "SEQ"
relationship: tosca.relationships.DependsOn object_type: "SubTopology"
type: tosca.nodes.ARTICONF.VM.topology type: "tosca.nodes.ARTICONF.VM.topology"
wordpress:
artifacts: artifacts:
image: provisioned_files:
file: wordpress:latest required: false
repository: docker_hub type: "string"
type: tosca.artifacts.Deployment.Image.Container.Docker
ws-pema:
properties: properties:
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_USER: wordpress
ports: ports:
- 8000:80 - "30001:8080"
requirements: requirements:
- service:
node: mysql
relationship:
type: tosca.relationships.DependsOn
- host: - host:
capability: tosca.capabilities.ARTICONF.docker.Orchestrator capability: "tosca.capabilities.ARTICONF.docker.Orchestrator"
node: kubernetes node: "kubernetes"
relationship: tosca.relationships.HostedOn relationship: "tosca.relationships.HostedOn"
type: tosca.nodes.ARTICONF.Container.Application.Docker type: "tosca.nodes.ARTICONF.Container.Application.Docker"
policies: artifacts:
- scalability: image:
properties: file: "alogo53/ws-pema-lifewatch"
constraint_name: cpu_load repository: "docker_hub"
max_value: 90 type: "tosca.artifacts.Deployment.Image.Container.Docker"
targets: description: "TOSCA example"
- wordpress imports:
type: tosca.policies.ARTICONF.Performance.CPU - nodes: "https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/nodes.yaml"
- faultTolerance: - data: "https://raw.githubusercontent.com/skoulouzis/CONF/develop/TOSCA/types/data.yml"
properties: - capabilities: "https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/capabilities.yaml"
level: 1 - policies: "https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/policies.yaml"
targets: - interfaces: "https://raw.githubusercontent.com/skoulouzis/DRIP/develop/TOSCA/types/interfaces.yml"
- 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
...@@ -59,17 +59,6 @@ topology_template: ...@@ -59,17 +59,6 @@ topology_template:
capability: "tosca.capabilities.ARTICONF.VM.topology" capability: "tosca.capabilities.ARTICONF.VM.topology"
node: "topology" node: "topology"
relationship: "tosca.relationships.HostedOn" 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" type: "tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes"
topology: topology:
properties: 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