/
relationships-blueprint.yaml
177 lines (142 loc) · 4.24 KB
/
relationships-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
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
# DSL version, should appear in the main blueprint.yaml
# and may appear in other imports. In such case, the versions must match
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/4.0.1/types.yaml
- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-aws-plugin/1.5.1.2/plugin.yaml
inputs:
aws_config:
default: {}
health_checks:
default: {}
image:
type: string
default: ''
size:
type: string
default: ''
key_path:
type: string
vol_size:
type: string
vol_zone:
type: string
vol_device:
type: string
external_ip:
type: boolean
external_sg:
type: boolean
external_kp:
type: boolean
external_vm:
type: boolean
external_vol:
type: boolean
resource_id_ip:
type: string
resource_id_sg:
type: string
resource_id_kp:
type: string
resource_id_vm:
type: string
elb_name:
type: string
zones:
type: string
listeners:
type: string
scheme:
type: string
default: ''
subnets:
default: []
complex_listeners:
default: []
resource_id_vol:
type: string
node_templates:
pair_a_connected_elastic_ip:
type: cloudify.aws.nodes.ElasticIP
properties:
resource_id: { get_input: resource_id_ip }
use_external_resource: { get_input: external_ip }
aws_config: { get_input: aws_config }
pair_a_connected_instance:
type: cloudify.aws.nodes.Instance
properties:
install_agent: false
resource_id: { get_input: resource_id_vm }
use_external_resource: { get_input: external_vm }
image_id: { get_input: image }
instance_type: { get_input: size }
aws_config: { get_input: aws_config }
relationships:
- type: cloudify.aws.relationships.instance_connected_to_elastic_ip
target: pair_a_connected_elastic_ip
pair_b_connected_security_group:
type: cloudify.aws.nodes.SecurityGroup
properties:
resource_id: { get_input: resource_id_sg }
use_external_resource: { get_input: external_sg }
description: Pair B Security Group
rules:
- ip_protocol: tcp
from_port: 22
to_port: 22
cidr_ip: 0.0.0.0/0
aws_config: { get_input: aws_config }
pair_b_connected_instance:
type: cloudify.aws.nodes.Instance
properties:
install_agent: false
resource_id: { get_input: resource_id_vm }
use_external_resource: { get_input: external_vm }
image_id: { get_input: image }
instance_type: { get_input: size }
aws_config: { get_input: aws_config }
relationships:
- type: cloudify.aws.relationships.instance_connected_to_security_group
target: pair_b_connected_security_group
pair_c_connected_elb:
type: cloudify.aws.nodes.ElasticLoadBalancer
properties:
elb_name: { get_input: elb_name }
zones: { get_input: zones }
aws_config: { get_input: aws_config }
listeners: { get_input: listeners }
health_checks: { get_input: health_checks }
scheme: { get_input: scheme }
subnets: { get_input: subnets }
complex_listeners: { get_input: complex_listeners }
pair_c_connected_volume:
type: cloudify.aws.nodes.Volume
properties:
resource_id: { get_input: resource_id_vol }
use_external_resource: { get_input: external_vol }
size: { get_input: vol_size }
zone: { get_input: vol_zone }
device: { get_input: vol_device }
aws_config: { get_input: aws_config }
relationships:
- type: cloudify.aws.relationships.volume_connected_to_instance
target: pair_c_connected_instance
pair_c_connected_instance:
type: cloudify.aws.nodes.Instance
properties:
install_agent: false
resource_id: { get_input: resource_id_vm }
use_external_resource: { get_input: external_vm }
image_id: { get_input: image }
instance_type: { get_input: size }
aws_config: { get_input: aws_config }
parameters:
placement: { get_property: [pair_c_connected_volume, zone] }
relationships:
- type: cloudify.aws.relationships.instance_connected_to_load_balancer
target: pair_c_connected_elb
plugins:
ec2:
executor: central_deployment_agent
install: false