forked from cloudify-community/eaas-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-blueprint.yaml
86 lines (78 loc) · 2.74 KB
/
azure-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
tosca_definitions_version: cloudify_dsl_1_3
imports:
- https://cloudify.co/spec/cloudify/6.2.0/types.yaml
- plugin:cloudify-azure-plugin?version= >=3.0.10
dsl_definitions:
client_config: &azure_config
subscription_id: { get_input: [ cloud_credentials, azure_subscription_id ] }
tenant_id: { get_input: [ cloud_credentials, azure_tenant_id ] }
client_id: { get_input: [ cloud_credentials, azure_client_id ] }
client_secret: { get_input: [ cloud_credentials, azure_client_secret ] }
inputs:
resource_config:
type: resource_config
cloud_credentials:
type: dict
resource_prefix:
type: string
data_types:
resource_config:
properties:
image:
type: dict
vm_size:
type: string
node_templates:
rg_deployment:
type: cloudify.nodes.Component
properties:
resource_config:
blueprint:
id: rg
external_resource: true
deployment:
id: { concat: [ { get_input: resource_prefix }, 'rg' ] }
inputs:
cloud_credentials: { get_input: cloud_credentials }
resource_config:
name: { concat: [ { get_input: resource_prefix }, 'rg' ] }
azure_location_name: { get_input: [ cloud_credentials, region_name ]}
resource_group:
type: cloudify.azure.nodes.ResourceGroup
properties:
use_external_resource: true
client_config: *azure_config
location: { get_input: [ cloud_credentials, region_name ]}
name: { get_attribute: [ rg_deployment, capabilities, rg_id ] }
relationships:
- type: cloudify.relationships.depends_on
target: rg_deployment
vm_deployment:
type: cloudify.nodes.Component
properties:
resource_config:
blueprint:
id: azure_vm
external_resource: true
deployment:
id: { concat: [ { get_input: resource_prefix }, '-vm' ] }
inputs:
cloud_credentials: { get_input: cloud_credentials }
resource_config:
rg_deployment_id: { get_attribute: [ rg_deployment, deployment, id ] }
resource_prefix: { get_input: resource_prefix }
azure_location_name: { get_input: [ cloud_credentials, region_name ]}
image: { get_input: [ resource_config, image ] }
vm_size: { get_input: [ resource_config, vm_size ] }
relationships:
- target: rg_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 }