summaryrefslogtreecommitdiffstats
path: root/dcaedt_validator/checker/src/main/resources/tosca/tosca-examples-types.yaml
blob: 5eee538dde6d29e0fdf7d3ef16eb46cfb297c743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
tosca_definitions_version: tosca_simple_yaml_1_0_0
description: >
 Non-normative type definitions, as per section 8 of TOSCA simple profile.


artifact_types:

  tosca.artifacts.Deployment.Image.Container.Docker:
    derived_from: tosca.artifacts.Deployment.Image
    description: Docker Container Image

  tosca.artifacts.Deployment.Image.VM.ISO:
    derived_from: tosca.artifacts.Deployment.Image.VM
    description: Virtual Machine (VM) image in ISO disk format
    mime_type: application/octet-stream
    file_ext: [ iso ]

  tosca.artifacts.Deployment.Image.VM.QCOW2:
    derived_from: tosca.artifacts.Deployment.Image.VM
    description: Virtual Machine (VM) image in QCOW v2 standard disk format
    mime_type: application/octet-stream
    file_ext: [ qcow2 ]


capability_types:

  tosca.capabilities.Container.Docker:
    derived_from: tosca.capabilities.Container
    properties:
      version:
        type: list
        required: false
        entry_schema: version
      publish_all:
        type: boolean
        default: false
        required: false
      publish_ports:
        type: list
        entry_schema: tosca.datatypes.network.PortSpec
        required: false
      expose_ports:
        type: list
        entry_schema: tosca.datatypes.network.PortSpec
        required: false
      volumes:
        type: list
        entry_schema: string
        required: false


node_types:
  
  tosca.nodes.Database.MySQL:
    derived_from: tosca.nodes.Database
    requirements:
      - host:
          capability: tosca.capabilities.Container
          node: tosca.nodes.DBMS.MySQL

  tosca.nodes.DBMS.MySQL:
    derived_from: tosca.nodes.DBMS
    properties:
      port:
        type: integer
        description: reflect the default MySQL server port
        default: 3306
      root_password:
        type: string
        # MySQL requires a root_password for configuration
        # Override parent DBMS definition to make this property required
        required: true
    capabilities:
      # Further constrain the �host� capability to only allow MySQL databases
      host:
        type: tosca.capabilities.Container
        valid_source_types: [ tosca.nodes.Database.MySQL ]

  tosca.nodes.WebServer.Apache:
    derived_from: tosca.nodes.WebServer

  tosca.nodes.WebApplication.WordPress:
    derived_from: tosca.nodes.WebApplication
    properties:
      admin_user:
        type: string
      admin_password:
        type: string
      db_host:
        type: string
    requirements:
      - database_endpoint:
          capability: tosca.capabilities.Endpoint.Database
          node: tosca.nodes.Database
          relationship: tosca.relationships.ConnectsTo

  tosca.nodes.WebServer.Nodejs:
    derived_from: tosca.nodes.WebServer
    properties:
      # Property to supply the desired implementation in the Github repository
      github_url:
        required: no
        type: string
        description: location of the application on the github.
        default: https://github.com/mmm/testnode.git
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        inputs:
          github_url:
            type: string

  tosca.nodes.Container.Application.Docker:
    derived_from: tosca.nodes.Container.Application
    requirements:
      - host:
          capability: tosca.capabilities.Container.Docker