Azure-plugin not sending REST calls to Azure cloud
[multicloud/azure.git] / azure / aria / aria-extension-cloudify / src / aria / examples / tosca-simple-1.0 / use-cases / webserver-dbms-1 / webserver-dbms-1.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >-
4   TOSCA simple profile with WordPress, a web server, a MySQL DBMS hosting the application's database
5   content on the same server. Does not have input defaults or constraints.
6
7 metadata:
8   template_name: webserver-dbms-1
9   template_author: TOSCA Simple Profile in YAML
10   template_version: '1.0'
11
12 imports:
13   - ../non-normative-types.yaml
14
15 topology_template:
16
17   inputs:
18     cpus:
19       type: integer
20       description: Number of CPUs for the server.
21     db_name:
22       type: string
23       description: The name of the database.
24     db_user:
25       type: string
26       description: The username of the DB user.
27     db_pwd:
28       type: string
29       description: The WordPress database admin account password.
30     db_root_pwd:
31       type: string
32       description: Root password for MySQL.
33     db_port:
34       type: PortDef
35       description: Port for the MySQL database
36     # ARIA NOTE: missing in spec
37     context_root:
38       type: string
39       description: Context root for WordPress.
40
41   node_templates:
42
43     wordpress:
44       type: tosca.nodes.WebApplication.WordPress
45       properties:
46         context_root: { get_input: context_root }
47       requirements:
48         - host: webserver
49         - database_endpoint: mysql_database
50       interfaces:
51         Standard:
52           create: wordpress_install.sh
53           configure:
54             implementation: wordpress_configure.sh
55             inputs:
56               wp_db_name: { get_property: [ mysql_database, name ] }
57               wp_db_user: { get_property: [ mysql_database, user ] }
58               wp_db_password: { get_property: [ mysql_database, password ] }
59               # In my own template, find requirement/capability, find port property
60               wp_db_port: { get_property: [ SELF, database_endpoint, port ] }
61
62     mysql_database:
63       type: Database
64       properties:
65         name: { get_input: db_name }
66         user: { get_input: db_user }
67         password: { get_input: db_pwd }
68         port: { get_input: db_port }
69       capabilities:
70         database_endpoint:
71           properties:
72             port: { get_input: db_port }
73       requirements:
74         - host: mysql_dbms
75       interfaces:
76         Standard:
77           configure: mysql_database_configure.sh
78
79     mysql_dbms:
80       type: DBMS
81       properties:
82         root_password: { get_input: db_root_pwd }
83         port: { get_input: db_port }
84       requirements:
85         - host: server
86       interfaces:
87         Standard:
88           # ARIA NOTE: not declared in spec
89           #inputs:
90           #  db_root_password: { get_property: [ mysql_dbms, root_password ] }
91           create: mysql_dbms_install.sh
92           start: mysql_dbms_start.sh
93           configure: mysql_dbms_configure.sh
94
95     webserver:
96       type: WebServer
97       requirements:
98         - host: server
99       interfaces:
100         Standard:
101           create: webserver_install.sh
102           start: webserver_start.sh
103
104     server:
105       type: Compute
106       capabilities:
107         host:
108           properties:
109             disk_size: 10 GB
110             num_cpus: { get_input: cpus }
111             mem_size: 4096 MB
112         os:
113           properties:
114             architecture: x86_64
115             type: linux
116             distribution: fedora
117             version: 17.0
118
119   outputs:
120     website_url:
121       description: URL for Wordpress wiki.
122       value: { get_attribute: [ server, public_address ] }