forked from congto/OpenStack-Lab-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-heat-stack.yaml
72 lines (66 loc) · 2 KB
/
main-heat-stack.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
60
61
62
63
64
65
66
67
68
69
70
heat_template_version: 2015-10-15
description: Main template to deploy a webserver and a db with an attached volume
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for compute instance
constraints:
- allowed_values: [cirros, centos, ubuntu]
default: cirros
flavor:
type: string
label: Flavor
description: Type of flavor to be used
constraints:
- allowed_values: [small, medium, large]
default: small
key:
type: string
label: Key name
description: Name of key-pair to be used for compute instance
default: demokey
private_network:
type: string
label: Private network name or ID
description: Network to attach instance to.
volume_size:
type: string
label: size of volume
description: This is the size of the Volume
default: 3
resources:
web:
type: OS::Application::WebServer
properties:
server_image: { get_param: image }
server_flavor: { get_param: flavor }
server_key: { get_param: key }
server_network: { get_param: private_network }
db:
type: OS::Application::DataBase
properties:
server_image: { get_param: image }
server_flavor: { get_param: flavor }
server_key: { get_param: key }
server_network: { get_param: private_network }
volume_size: { get_param: volume_size }
outputs:
web_instance_name:
description: Name of the web instance
value: { get_attr: [web, server_name] }
web_instance_ip:
description: IP address of the web instance
value: { get_attr: [web, server_address] }
db_instance_name:
description: Name of the db instance
value: { get_attr: [db, server_name] }
db_instance_ip:
description: IP address of the db instance
value: { get_attr: [db, server_address] }
volume_name:
description: Volume name attached to the db instance
value: { get_attr: [db, volume_name] }
volume_type:
description: Volume type attached to the db instance
value: { get_attr: [db, volume_type] }