re base code
[sdc.git] / catalog-be / src / test / resources / config / mysql-type.yml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03
2 description: MySQL RDBMS installation on a specific mounted volume path.
3 template_name: mysql-type
4 template_version: 1.1.1-SNAPSHOT
5 template_author: FastConnect
6
7 imports:
8   - "tosca-normative-types:1.0.0.wd03-SNAPSHOT"
9
10 node_types:
11   alien.nodes.Mysql:
12     derived_from: tosca.nodes.Database
13     description: >
14       A node to install MySQL v5.5 database with data
15       on a specific attached volume.
16     capabilities:
17       host:
18         type: alien.capabilities.MysqlDatabase
19         properties:
20           valid_node_types: [ tosca.nodes.WebApplication ]
21     requirements:
22       - host: tosca.nodes.Compute
23         type: tosca.relationships.HostedOn
24     tags:
25       icon: /images/mysql.png
26     properties:
27       db_port:
28         type: integer
29         default: 3306
30         description: The port on which the underlying database service will listen to data.
31       db_name:
32         type: string
33         required: true
34         default: wordpress
35         description: The logical name of the database.
36       db_user:
37         type: string
38         default: pass
39         description: The special user account used for database administration.
40       db_password:
41         type: string
42         default: pass
43         description: The password associated with the user account provided in the \91db_user\92 property.
44       bind_address:
45         type: boolean
46         default: true
47         required: false
48         description: If true,the server accepts TCP/IP connections on all server host IPv4 interfaces.
49       storage_path:
50         type: string
51         default: /mountedStorage
52         constraints:
53           - valid_values: [ "/mountedStorage", "/var/mysql" ]
54     interfaces:
55       Standard:
56         create: scripts/install_mysql.sh
57         start:
58           inputs:
59             VOLUME_HOME: { get_property: [SELF, storage_path] }
60             PORT: { get_property: [SELF, db_port] }
61             DB_NAME: { get_property: [SELF, db_name] }
62             DB_USER: { get_property: [SELF, db_user] }
63             DB_PASSWORD: { get_property: [SELF, db_password] }
64             BIND_ADRESS: { get_property: [SELF, bind_address] }
65           implementation: scripts/start_mysql.sh
66       fastconnect.cloudify.extensions:
67          start_detection:
68           inputs:
69             PORT: { get_property: [SELF, db_port] }
70           implementation: scripts/mysql_start_detection.groovy
71     artifacts:
72       - scripts: scripts
73         type: tosca.artifacts.File
74
75 capability_types:
76   alien.capabilities.MysqlDatabase:
77       derived_from: tosca.capabilities.Container
78
79 artifact_types:
80   tosca.artifacts.GroovyScript:
81     description: A groovy script (.groovy file)
82     file_ext: [groovy]