-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathsimple-blueprint-with-secrets.yaml
88 lines (74 loc) · 2.65 KB
/
simple-blueprint-with-secrets.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
tosca_definitions_version: cloudify_dsl_1_3
description: >
This Blueprint installs the nodecellar application
on an existing host.
imports:
- http://www.getcloudify.org/spec/cloudify/7.1.0.dev1/types.yaml
- http://www.getcloudify.org/spec/diamond-plugin/1.3.6/plugin.yaml
- types/nodecellar.yaml
- types/simple-types.yaml
#####################################################################################
# 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> <deployment_id> -i inputs.json
#####################################################################################
inputs:
host_ip:
description: >
The ip of the host the application will be deployed on
agent_user:
description: >
User name used when SSH-ing into the started machine
agent_private_key_path:
description: >
Path to a private key that resided on the management machine.
SSH-ing into agent machines will be done with this key.
node_templates:
nodecellar:
type: nodecellar.nodes.NodecellarApplicationModule
relationships:
################################
# Setting the mongo connection
################################
- type: node_connected_to_mongo
target: mongod
target_interfaces:
cloudify.interfaces.relationship_lifecycle:
postconfigure:
inputs:
mongo_ip_address: localhost
################################
# Setting the nodejs connection
################################
- type: node_contained_in_nodejs
target: nodejs
mongod:
type: nodecellar.nodes.MonitoredMongoDatabase
relationships:
- type: cloudify.relationships.contained_in
target: host
nodejs:
type: nodecellar.nodes.NodeJSServer
relationships:
- type: cloudify.relationships.contained_in
target: host
host:
type: nodecellar.nodes.MonitoredServer
properties:
ip: { get_secret: host_ip }
cloudify_agent:
user: { get_secret: agent_user }
key: { get_secret: agent_private_key_path }
###########################################################
# This outputs section exposes the application endpoint.
# You can access it by running:
# - cfy deployments outputs <deployment_id>
###########################################################
outputs:
endpoint:
description: Web application endpoint
value:
ip_address: { get_property: [ host, ip ] }
port: { get_property: [ nodecellar, port ] }