forked from cloudify-community/eaas-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws-blueprint.yaml
76 lines (69 loc) · 2.53 KB
/
aws-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
tosca_definitions_version: cloudify_dsl_1_3
imports:
- https://cloudify.co/spec/cloudify/6.2.0/types.yaml
- plugin:cloudify-aws-plugin?version= >=2.5.6
dsl_definitions:
aws_client: &aws_client
aws_access_key_id: { get_input: [ cloud_credentials, aws_access_key_id ] }
aws_secret_access_key: { get_input: [ cloud_credentials, aws_secret_access_key ] }
region_name: { get_input: [ cloud_credentials, region_name ] }
inputs:
resource_prefix:
type: string
resource_config:
type: resource_config
cloud_credentials:
type: dict
data_types:
resource_config:
properties:
ami_id:
type: string
instance_type:
type: string
node_templates:
vpc_deployment:
type: cloudify.nodes.Component
properties:
resource_config:
blueprint:
id: vpc
external_resource: true
deployment:
id: { concat: [ { get_input: resource_prefix }, '-vpc' ] }
inputs:
cloud_credentials: { get_input: cloud_credentials }
resource_config:
name: { concat: [ { get_input: resource_prefix }, '-vpc' ] }
aws_region_name: { get_input: [ cloud_credentials, region_name ] }
availability_zone_1: { concat: [{ get_input: [ cloud_credentials, region_name ] }, 'a' ] }
availability_zone_2: { concat: [{ get_input: [ cloud_credentials, region_name ] }, 'c' ] }
vm_deployment:
type: cloudify.nodes.Component
properties:
resource_config:
blueprint:
id: aws_vm
external_resource: true
deployment:
id: { concat: [ { get_input: resource_prefix }, '-vm' ] }
inputs:
cloud_credentials: { get_input: cloud_credentials }
resource_config:
vpc_deployment_id: { get_attribute: [ vpc_deployment, deployment, id ] }
resource_prefix: { get_input: resource_prefix }
aws_region_name: { get_input: [ cloud_credentials, region_name ] }
ami_id: { get_input: [ resource_config, ami_id ] }
instance_type: { get_input: [ resource_config, instance_type ] }
relationships:
- target: vpc_deployment
type: cloudify.relationships.depends_on
capabilities:
k8s_vm_ip:
value: { get_attribute: [ vm_deployment, capabilities, vm_ip ] }
db_vm_ip:
value: { get_attribute: [ vm_deployment, capabilities, vm_ip ] }
s3_vm_ip:
value: { get_attribute: [ vm_deployment, capabilities, vm_ip ] }
resource_prefix:
value: { get_input: resource_prefix }