-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathopenstack-blueprint.yaml
More file actions
160 lines (124 loc) · 4.7 KB
/
openstack-blueprint.yaml
File metadata and controls
160 lines (124 loc) · 4.7 KB
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
tosca_definitions_version: cloudify_dsl_1_3
description: >
This blueprint installs the Node Cellar application
on an OpenStack environment.
imports:
- http://www.getcloudify.org/spec/cloudify/3.4m5/types.yaml
- http://www.getcloudify.org/spec/openstack-plugin/1.3.1/plugin.yaml
- http://www.getcloudify.org/spec/diamond-plugin/1.3.2/plugin.yaml
- types/nodecellar.yaml
- types/openstack-types.yaml
#####################################################################################
# The inputs section allows the user to use same blueprint for creating different
# deployments, each one with its own parameters.
#
# To specify deployment inputs run:
# - cfy deployments create -b <blueprint_id> -d <deployment_id> -i inputs.yaml
#####################################################################################
inputs:
image:
description: >
OpenStack image for provisioning VMs
flavor:
description: >
OpenStack flavor for provisioning VMs
agent_user:
description: >
Username for SSH connections to VMs from Cloudify Manager
node_templates:
nodecellar:
type: nodecellar.nodes.NodecellarApplicationModule
relationships:
################################
# Connected to mongod node
################################
- type: node_connected_to_mongo
target: mongod
################################
# Contained in nodejs node
################################
- type: node_contained_in_nodejs
target: nodejs
nodejs:
type: nodecellar.nodes.NodeJSServer
relationships:
################################
# Contained in nodejs host
################################
- type: cloudify.relationships.contained_in
target: nodejs_host
mongod:
type: nodecellar.nodes.MonitoredMongoDatabase
relationships:
################################
# Contained in mongod host
################################
- type: cloudify.relationships.contained_in
target: mongod_host
############
# Hosts
############
nodejs_host:
type: nodecellar.nodes.MonitoredServer
relationships:
###########################################################
# Attach our public IP address to nodejs host
###########################################################
- target: nodecellar_ip
type: cloudify.openstack.server_connected_to_floating_ip
###########################################################
# Put nodejs host in nodecellar security group
###########################################################
- target: nodecellar_security_group
type: cloudify.openstack.server_connected_to_security_group
mongod_host:
type: nodecellar.nodes.MonitoredServer
relationships:
###########################################################
# Put mongod host in mongod security group
###########################################################
- target: mongod_security_group
type: cloudify.openstack.server_connected_to_security_group
###########################################################
# Security group to open up the Node.js HTTP port to
# world access.
###########################################################
nodecellar_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
security_group:
name: nodecellar_security_group
rules:
- remote_ip_prefix: 0.0.0.0/0
port: { get_property: [ nodecellar, port ] }
###########################################################
# Security group to open up the MongoDB ports to the
# application hosts.
###########################################################
mongod_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
security_group:
name: mongod_security_group
rules:
- remote_ip_prefix: 0.0.0.0/0
port: { get_property: [ mongod, port ] }
- remote_ip_prefix: 0.0.0.0/0
port: 28017
###########################################################
# Our public IP address for world access.
###########################################################
nodecellar_ip:
type: cloudify.openstack.nodes.FloatingIP
###########################################################
# The outputs section exposes the application endpoint.
#
# You can access it by running:
# - cfy deployments -d <deployment_id> outputs
###########################################################
outputs:
endpoint:
description: Web application endpoint
value:
ip_address: { get_attribute: [ nodecellar_ip, floating_ip_address ] }
port: { get_property: [ nodecellar, port ] }