Commit c32ced47 authored by Spiros Koulouzis's avatar Spiros Koulouzis

changed interfaces

parent be9ab511
...@@ -62,10 +62,18 @@ interface_types: ...@@ -62,10 +62,18 @@ interface_types:
description: Provision the defined objects (resources). ObjectType can be SubTopology or VM. description: Provision the defined objects (resources). ObjectType can be SubTopology or VM.
tosca.interfaces.ARTICONF.Standard:
derived_from: tosca.interfaces.node.lifecycle.Standard
inputs:
inventory_file:
type: string
required: false
playbook:
type: string
required: false
tosca.interfaces.ARTICONF.Kubernetes: tosca.interfaces.ARTICONF.Kubernetes:
derived_from: tosca.interfaces.node.lifecycle.Standard derived_from: tosca.interfaces.ARTICONF.Standard
inputs: inputs:
inventory_file: inventory_file:
type: string type: string
...@@ -77,13 +85,23 @@ interface_types: ...@@ -77,13 +85,23 @@ interface_types:
type: integer type: integer
required: false required: false
scale: scale:
description: Set the number of replicas for a Deployment, ReplicaSet, or Replication Controller, or the parallelism attribute of a Job. description: Set the number of replicas for a Deployment, ReplicaSet, or Replication Controller, or the parallelism attribute of a Job.
create:
description: create deployment on a k8s cluster
delete:
description: delete deployment on a k8s cluster
autoscale: autoscale:
description: horizontal_pod_autoscaler description: horizontal_pod_autoscaler
info: info:
description: get information on pods,services or deployments description: get information on pods,services or deployments
#tosca.interfaces.node.lifecycle.Standard:
#derived_from: tosca.interfaces.Root
#create:
#description: Standard lifecycle create operation.
#configure:
#description: Standard lifecycle configure operation.
#start:
#description: Standard lifecycle start operation.
#stop:
#description: Standard lifecycle stop operation.
#delete:
#description: Standard lifecycle delete operation.
...@@ -126,12 +126,10 @@ node_types: ...@@ -126,12 +126,10 @@ node_types:
description: the dashboard access url description: the dashboard access url
interfaces: interfaces:
Standard: Standard:
type: tosca.interfaces.ARTICONF.Standard
install: install:
inputs: inputs:
playbook: https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/install_k8s.yml playbook: https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/install_k8s.yml
create:
inputs:
playbook: https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/create_k8s.yml
configure: configure:
inputs: inputs:
playbook: https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/dashboard.yaml playbook: https://raw.githubusercontent.com/skoulouzis/CONF/develop/ansible_playbooks/dashboard.yaml
......
...@@ -59,31 +59,31 @@ services: ...@@ -59,31 +59,31 @@ services:
- "27017:27017" - "27017:27017"
manager: #manager:
depends_on: #depends_on:
- rabbit #- rabbit
- mongo #- mongo
- sure-tosca #- sure-tosca
image: manager:3.0.0 #image: manager:3.0.0
environment: #environment:
RABBITMQ_HOST: rabbit #RABBITMQ_HOST: rabbit
MONGO_HOST: mongo #MONGO_HOST: mongo
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
ports: #ports:
- "30000:8080" #- "30000:8080"
sure-tosca: sure-tosca:
image: sure-tosca:3.0.0 image: sure-tosca:3.0.0
ports: ports:
- "8081:8081" - "8081:8081"
planner: #planner:
depends_on: #depends_on:
- rabbit #- rabbit
- sure-tosca #- sure-tosca
image: planner:3.0.0 #image: planner:3.0.0
environment: #environment:
RABBITMQ_HOST: rabbit #RABBITMQ_HOST: rabbit
provisioner: provisioner:
depends_on: depends_on:
......
{"owner":"user","creationDate":1585323740913,"toscaTemplate":{"tosca_definitions_version":"tosca_simple_yaml_1_0","tosca_default_namespace":null,"template_name":null,"topology_template":{"description":null,"inputs":null,"node_templates":{"ws-pema":{"properties":{"ports":["30001:8080"]},"type":"tosca.nodes.ARTICONF.Container.Application.Docker","artifacts":{"image":{"type":"tosca.artifacts.Deployment.Image.Container.Docker","file":"alogo53/ws-pema-lifewatch","repository":"docker_hub"}}}},"relationship_templates":null,"outputs":null,"groups":null,"substitution_mappings":null,"policies":null},"template_author":null,"template_version":null,"description":"TOSCA example\n","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"}],"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":{"docker_hub":"https://hub.docker.com/"}}}
...@@ -25,6 +25,12 @@ class MyTestCase(unittest.TestCase): ...@@ -25,6 +25,12 @@ class MyTestCase(unittest.TestCase):
input_tosca_file_path = self.get_input_tosca_file_path(file_name) input_tosca_file_path = self.get_input_tosca_file_path(file_name)
self.run_test(input_tosca_file_path) self.run_test(input_tosca_file_path)
file_name = 'lifeWatch_vre1.yaml'
input_tosca_file_path = self.get_input_tosca_file_path(file_name)
self.run_test(input_tosca_file_path)
def test_kubernetes(self): def test_kubernetes(self):
file_name = 'kubernetes.yaml' file_name = 'kubernetes.yaml'
input_tosca_file_path = self.get_input_tosca_file_path(file_name) input_tosca_file_path = self.get_input_tosca_file_path(file_name)
......
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