forked from cloudify-cosmo/cloudify-nodecellar-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvcloud-fabric-blueprint.yaml
137 lines (118 loc) · 3.34 KB
/
vcloud-fabric-blueprint.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
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
tosca_definitions_version: cloudify_dsl_1_0
imports:
- http://www.getcloudify.org/spec/cloudify/3.3m3/types.yaml
- https://raw.githubusercontent.com/cloudify-cosmo/tosca-vcloud-plugin/master/plugin.yaml
- http://www.getcloudify.org/spec/fabric-plugin/1.3m3/plugin.yaml
- types/agentless-nodecellar.yaml
inputs:
catalog:
type: string
template:
type: string
server_cpu:
default: 2
description: >
cpu count for each server
server_memory:
default: 4096
description: >
memory amount for each server
user_public_key:
type: string
user:
description: >
User for connecting to agent VM's
type: string
default: ubuntu
edge_gateway:
type: string
default: gateway
description: >
For 'ondemand' service type, the value of edge_gateway
is always 'gateway'
node_types:
# base server type for installation without agent
agentless-nodecellar.nodes.ParentTypeServer:
derived_from: cloudify.vcloud.nodes.Server
properties:
install_agent:
default: false
cloudify_agent:
default:
user: ubuntu
home_dir: /home/ubuntu
node_templates:
nodejs_nat:
type: cloudify.vcloud.nodes.PublicNAT
properties:
nat:
edge_gateway: { get_input: edge_gateway }
rules:
- type: DNAT
protocol: tcp
original_port: 8080
translated_port: 8080
- type: DNAT
protocol: tcp
original_port: 22
translated_port: 22
nodejs_host:
type: agentless-nodecellar.nodes.ParentTypeServer
relationships:
- target: nodejs_nat
type: cloudify.vcloud.server_connected_to_public_nat
properties:
server:
catalog: { get_input: catalog }
template: { get_input: template }
hardware:
cpu: { get_input: server_cpu }
memory: { get_input: server_memory }
guest_customization:
public_keys:
-
key: { get_input: user_public_key }
user: { get_input: user }
mongod_host:
type: agentless-nodecellar.nodes.ParentTypeServer
properties:
server:
catalog: { get_input: catalog }
template: { get_input: template }
hardware:
cpu: { get_input: server_cpu }
memory: { get_input: server_memory }
guest_customization:
public_keys:
-
key: { get_input: user_public_key }
user: { get_input: user }
nodejs:
type: agentless-nodecellar.nodes.NodeJSServer
relationships:
- target: nodejs_host
type: cloudify.relationships.contained_in
mongod:
type: agentless-nodecellar.nodes.MongoDatabase
relationships:
- target: mongod_host
type: cloudify.relationships.contained_in
nodecellar:
type: agentless-nodecellar.nodes.nodecellar
interfaces:
cloudify.interfaces.lifecycle:
start:
inputs:
task_properties:
config:
mongo: { get_attribute: [mongod_host, ip] }
relationships:
- type: cloudify.relationships.connected_to
target: mongod
- type: cloudify.relationships.contained_in
target: nodejs
outputs:
endpoint:
description: Web application endpoint
value:
public_ip: { get_attribute: [ nodejs_nat, public_ip ] }