Commit 172aff81 authored by Spiros Koulouzis's avatar Spiros Koulouzis

create tosca application and types

parent 4d447307
...@@ -5,7 +5,7 @@ MAINTAINER S. Koulouzis "S.Koulouzis@uva.nl" ...@@ -5,7 +5,7 @@ MAINTAINER S. Koulouzis "S.Koulouzis@uva.nl"
# ARG RABBITMQ_HOST=127.0.0.1 # ARG RABBITMQ_HOST=127.0.0.1
# ARG MONOG_HOST=127.0.0.1 # ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.2 ARG RELESE_VERSION=0.2.5
ARG CERTS=/etc/grid-security/certificates ARG CERTS=/etc/grid-security/certificates
......
...@@ -6,7 +6,7 @@ MAINTAINER Huan "h.zhou@uva.nl" ...@@ -6,7 +6,7 @@ MAINTAINER Huan "h.zhou@uva.nl"
# ARG RABBITMQ_HOST=127.0.0.1 # ARG RABBITMQ_HOST=127.0.0.1
# ARG MONOG_HOST=127.0.0.1 # ARG MONOG_HOST=127.0.0.1
ARG RELESE_VERSION=0.2 ARG RELESE_VERSION=0.2.5
ARG CERTS=/etc/grid-security/certificates ARG CERTS=/etc/grid-security/certificates
WORKDIR /root/ WORKDIR /root/
......
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- types/nodes.yaml
- types/interfaces.yaml
repositories:
docker_hub: https://hub.docker.com/
topology_template:
wordpres:
type: tosca.nodes.Container.Application.Docker
properties:
ports:
- "8000:80"
environment:
WORDPRESS_DB_HOST: mysql-db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: wordpress:latest
repository: docker_hub
requirements:
- db:
node: mysql-db
relationship:
type: tosca.relationships.ConnectsTo
mysql-db:
type: tosca.nodes.Container.Application.Docker
properties:
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: mysql:5.7
repository: docker_hub
tosca_definitions_version: tosca_simple_yaml_1_0
node_types:
tosca.nodes.Container.Application.Docker:
derived_from: tosca.nodes.Container
description: description of container
properties:
ports:
description: ports to be forwarded
type: list
required: false
entrypoint:
description: command
type: string
required: false
cmd:
description: cmd
type: string
required: false
environment:
description: environment variables
type: map
required: false
volumes:
description: volume
type: list
required: false
capabilities:
service:
type: tosca.capabilities.Container.Docker
requirements:
- host:
capability: tosca.capabilities.Container.Orchestrator.Docker
node: tosca.nodes.Container.Orchestrator.Docker
relationship: tosca.relationships.HostedOn
tosca.nodes.Container.Orchestrator.Docker.Swarm:
derived_from: tosca.nodes.Container.Orchestrator.Docker
description: The swarm Docker Orchestrator
interfaces:
Ansible:
type: tosca.interfaces.Ansible
tosca.nodes.Container.Orchestrator.Docker:
derived_from: tosca.nodes.Container.Orchestrator
description: Docker Orchestrator
capabilities:
host:
type: tosca.capabilities.Container.Orchestrator.Docker
requirements:
- host:
capability: tosca.capabilities.Compute.Cluster
node: tosca.nodes.Compute.VM.Cluster
relationship: tosca.relationships.HostedOn
tosca.nodes.Compute.VM.Cluster:
derived_from:
description: A cluster of VM able
properties:
vms:
description: a list of VMs in the cluster. At lest one of them must be the master
type: list
required: true
capabilities:
host:
type: tosca.capabilities.Compute.Cluster
tosca.nodes.Compute.VM:
derived_from: tosca.nodes.Compute
description: VM
properties:
name:
description: host name
type: string
required: true
user_names:
description: list of user name
type: list
required: true
id:
description: vm id
type: string
required: true
num_of_cpu:
description: number of cpu
type: int
required: true
mem_size:
description: ram size in MB
type: int
required: true
disk_size:
description: disk size in MB
type: int
required: true
ip_addresses:
description: available IP addresses
type: int
required: true
role:
description: available IP addresses
type: string
required: true
os_type:
description: OS example: Ubuntu 16.04
type: string
required: true
capabilities:
host:
type: tosca.capabilities.Compute
tosca.nodes.Compute.VM.ExoGENI:
derived_from: tosca.nodes.Compute.VM
description: VM
properties:
domain:
description: site where the VM is hosted, example: RENCI (Chapel Hill, NC USA) XO Rack
type: string
required: true
state:
description: the state of the VM, running, paused, stopped
type: string
required: true
ssh_key_pair_id:
description: the id of the ssh key
type: string
required: true
capabilities:
host:
type: tosca.capabilities.Scale
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