forked from miguelgrinberg/heat-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 1
/
heat_3b.yaml
59 lines (54 loc) · 1.72 KB
/
heat_3b.yaml
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
heat_template_version: 2013-05-23
description: Template that installs a wordpress server and supporting MySQL database running on separate servers
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for server. Please use an Ubuntu based image.
default: trusty-server-cloudimg-amd64
flavor:
type: string
label: Flavor
description: Type of instance (flavor) to be used on the compute instance.
default: m1.small
key:
type: string
label: Key name
description: Name of key-pair to be installed on the compute instance.
default: my_key
public_network:
type: string
label: Public network name or ID
description: Public network to attach server to.
default: public
dns:
type: comma_delimited_list
label: DNS nameservers
description: Comma separated list of DNS nameservers for the private network.
default: '8.8.8.8'
resources:
network:
type: lib/private_network.yaml
properties:
public_network: { get_param: public_network }
dns: { get_param: dns }
mysql:
type: lib/mysql.yaml
properties:
image: { get_param: image }
flavor: { get_param: flavor }
key: { get_param: key }
private_network: { get_attr: [network, name] }
database_name: wordpress
database_user: wordpress_user
wordpress:
type: lib/wordpress.yaml
properties:
image: { get_param: image }
flavor: { get_param: flavor }
key: { get_param: key }
private_network: { get_attr: [network, name] }
mysql_server: { get_attr: [mysql, ip] }
database_name: wordpress
database_user: wordpress_user
database_password: { get_attr: [mysql, database_password] }