62671b161b3a8994df66a3a3634f5dd7aa2b08b6
[parser.git] /
1 heat_template_version: 2014-10-16
2
3 description: >
4   TOSCA simple profile with wordpress, web server and mysql on the same server.
5
6 parameters:
7   db_name:
8     type: string
9     description: The name of the database.
10     default: wordpress
11   db_user:
12     type: string
13     description: The user name of the DB user.
14     default: wp_user
15   db_pwd:
16     type: string
17     description: The WordPress database admin account password.
18     default: wp_pass
19   cpus:
20     type: number
21     description: Number of CPUs for the server.
22     default: 8
23     constraints:
24     - allowed_values:
25       - 1
26       - 2
27       - 4
28       - 8
29   db_root_pwd:
30     type: string
31     description: Root password for MySQL.
32     default: passw0rd
33   db_port:
34     type: number
35     description: Port for the MySQL database.
36     default: 3366
37
38 resources:
39
40   mysql_dbms_create_config:
41     type: OS::Heat::SoftwareConfig
42     properties:
43       config:
44         get_file: ../Scripts/MYSQLDBMS/install.sh
45       group: script
46
47   mysql_dbms_create_deploy:
48     type: OS::Heat::SoftwareDeployment
49     properties:
50       config:
51         get_resource: mysql_dbms_create_config
52       server:
53         get_resource: server
54       signal_transport: HEAT_SIGNAL
55
56   mysql_dbms_start_config:
57     type: OS::Heat::SoftwareConfig
58     properties:
59       config:
60         get_file: ../Scripts/MYSQLDBMS/start.sh
61       group: script
62
63   mysql_dbms_start_deploy:
64     type: OS::Heat::SoftwareDeployment
65     properties:
66       config:
67         get_resource: mysql_dbms_start_config
68       server:
69         get_resource: server
70       signal_transport: HEAT_SIGNAL
71     depends_on:
72     - mysql_dbms_configure_deploy
73
74   mysql_dbms_configure_config:
75     type: OS::Heat::SoftwareConfig
76     properties:
77       config:
78         get_file: ../Scripts/MYSQLDBMS/configure.sh
79       group: script
80
81   mysql_dbms_configure_deploy:
82     type: OS::Heat::SoftwareDeployment
83     properties:
84       config:
85         get_resource: mysql_dbms_configure_config
86       input_values:
87         db_root_password:
88           get_param: db_root_pwd
89       server:
90         get_resource: server
91       signal_transport: HEAT_SIGNAL
92     depends_on:
93     - mysql_dbms_create_deploy
94
95   mysql_database_configure_config:
96     type: OS::Heat::SoftwareConfig
97     properties:
98       config:
99         get_file: ../Scripts/MYSQLDatabase/configure.sh
100       group: script
101
102   mysql_database_configure_deploy:
103     type: OS::Heat::SoftwareDeployment
104     properties:
105       config:
106         get_resource: mysql_database_configure_config
107       input_values:
108         db_name:
109           get_param: db_name
110         db_password:
111           get_param: db_pwd
112         db_root_password:
113           get_param: db_root_pwd
114         db_user:
115           get_param: db_user
116       server:
117         get_resource: server
118       signal_transport: HEAT_SIGNAL
119     depends_on:
120     - mysql_dbms_start_deploy
121
122   webserver_create_config:
123     type: OS::Heat::SoftwareConfig
124     properties:
125       config:
126         get_file: ../Scripts/WebServer/install.sh
127       group: script
128
129   webserver_create_deploy:
130     type: OS::Heat::SoftwareDeployment
131     properties:
132       config:
133         get_resource: webserver_create_config
134       server:
135         get_resource: server
136       signal_transport: HEAT_SIGNAL
137
138   webserver_start_config:
139     type: OS::Heat::SoftwareConfig
140     properties:
141       config:
142         get_file: ../Scripts/WebServer/start.sh
143       group: script
144
145   webserver_start_deploy:
146     type: OS::Heat::SoftwareDeployment
147     properties:
148       config:
149         get_resource: webserver_start_config
150       server:
151         get_resource: server
152       signal_transport: HEAT_SIGNAL
153     depends_on:
154     - webserver_create_deploy
155
156   wordpress_create_config:
157     type: OS::Heat::SoftwareConfig
158     properties:
159       config:
160         get_file: ../Scripts/WordPress/install.sh
161       group: script
162
163   wordpress_create_deploy:
164     type: OS::Heat::SoftwareDeployment
165     properties:
166       config:
167         get_resource: wordpress_create_config
168       server:
169         get_resource: server
170       signal_transport: HEAT_SIGNAL
171     depends_on:
172     - webserver_start_deploy
173     - mysql_database_configure_deploy
174
175   wordpress_configure_config:
176     type: OS::Heat::SoftwareConfig
177     properties:
178       config:
179         get_file: ../Scripts/WordPress/configure.sh
180       group: script
181
182   wordpress_configure_deploy:
183     type: OS::Heat::SoftwareDeployment
184     properties:
185       config:
186         get_resource: wordpress_configure_config
187       input_values:
188         wp_db_name:
189           get_param: db_name
190         wp_db_password:
191           get_param: db_pwd
192         wp_db_user:
193           get_param: db_user
194       server:
195         get_resource: server
196       signal_transport: HEAT_SIGNAL
197     depends_on:
198     - wordpress_create_deploy
199
200   server:
201     type: OS::Nova::Server
202     properties:
203       flavor: m1.xlarge
204       image: fedora-amd64-heat-config
205       user_data_format: SOFTWARE_CONFIG
206       software_config_transport: POLL_SERVER_HEAT
207
208 outputs:
209   website_url:
210     description: IP address for Wordpress wiki.
211     value:
212       get_attr:
213       - server
214       - first_address