blob: b8de0e0a7cef3011386645560e091521404742c1 (
plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
heat_template_version: 2013-05-23
description: >
TOSCA simple profile with nodejs and mongodb.
parameters:
github_url:
type: string
description: The URL to download nodejs.
default: http://github.com/paypal/rest-api-sample-app-nodejs.git
my_cpus:
type: number
description: Number of CPUs for the server.
default: 4
constraints:
- allowed_values:
- 1
- 2
- 4
- 8
resources:
mongo_dbms_create_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: mongo_dbms_create_config
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
mongo_dbms_create_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: mongodb/create.sh
group: script
mongo_dbms_configure_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: mongo_dbms_configure_config
input_values:
mongodb_ip:
get_attr:
- mongo_server
- networks
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
depends_on:
- mongo_dbms_create_deploy
mongo_dbms_configure_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: mongodb/config.sh
group: script
mongo_dbms_start_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: mongo_dbms_start_config
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
depends_on:
- mongo_dbms_configure_deploy
mongo_dbms_start_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: mongodb/start.sh
group: script
mongo_db_create_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: mongo_db_create_config
server:
get_resource: mongo_server
signal_transport: HEAT_SIGNAL
depends_on:
- mongo_dbms_start_deploy
mongo_db_create_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: mongodb/create_database.sh
group: script
nodejs_create_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: nodejs_create_config
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
nodejs_create_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: nodejs/create.sh
group: script
paypal_pizzastore_configure_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: paypal_pizzastore_configure_config
input_values:
github_url: http://github.com/paypal/rest-api-sample-app-nodejs.git
mongodb_ip:
get_attr:
- mongo_server
- networks
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
depends_on:
- mongo_db_create_deploy
- nodejs_create_deploy
paypal_pizzastore_configure_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: nodejs/config.sh
group: script
paypal_pizzastore_start_deploy:
type: OS::Heat::SoftwareDeployment
properties:
config:
get_resource: paypal_pizzastore_start_config
server:
get_resource: app_server
signal_transport: HEAT_SIGNAL
depends_on:
- paypal_pizzastore_configure_deploy
paypal_pizzastore_start_config:
type: OS::Heat::SoftwareConfig
properties:
config:
get_file: nodejs/start.sh
group: script
mongo_server:
type: OS::Nova::Server
properties:
flavor: m1.medium
image: ubuntu-software-config-os-init
user_data_format: SOFTWARE_CONFIG
software_config_transport: POLL_SERVER_HEAT
app_server:
type: OS::Nova::Server
properties:
flavor: m1.medium
image: ubuntu-software-config-os-init
user_data_format: SOFTWARE_CONFIG
software_config_transport: POLL_SERVER_HEAT
outputs:
mongodb_url:
description: URL for the mongodb server.
value:
get_attr:
- mongo_server
- networks
nodejs_url:
description: URL for the nodejs server, http://<IP>:3000
value:
get_attr:
- app_server
- networks
|