forked from cloudify-community/eaas-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheaas.yaml
165 lines (147 loc) · 6.24 KB
/
eaas.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
tosca_definitions_version: cloudify_dsl_1_3
imports:
- https://cloudify.co/spec/cloudify/6.2.0/types.yaml
- https://raw.githubusercontent.com/cloudify-community/eaas-example/master/utils/custom_types.yaml
labels:
csys-obj-type:
values:
- environment
inputs:
resource_prefix:
type: string
description: |
If not provided, it will be auto-generated.
default: ''
constraints:
- pattern: '(^ *$)|(^[a-zA-Z][a-zA-Z0-9]+$)'
env_type:
description: |
The environment's type to create
type: string
constraints:
- valid_values:
- dev-small
- dev-large
- production
ttl:
description: |
Minutes of time to live after which the environment will be uninstalled
type: integer
default: 60
constraints:
- greater_or_equal: 0
node_templates:
prefix:
type: eaas.nodes.UniquePrefixGenerator
properties:
predefined_value: { get_input: resource_prefix }
ttl:
type: eaas.nodes.TTL
properties:
ttl: { get_input: ttl }
network:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, network, blueprint ] }
external_resource: true
deployment:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, network, deployment ] }
inputs:
resource_config: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, network, inputs ] }
resource_prefix: { get_attribute: [ prefix, value ] }
cloud_credentials: { get_environment_capability: cloud_credentials }
auto_inc_suffix: true
relationships:
- type: cloudify.relationships.depends_on
target: prefix
database:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, db, blueprint ] }
external_resource: true
deployment:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, db, deployment ] }
inputs:
resource_config: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, db, inputs ] }
cloud_credentials: { get_environment_capability: cloud_credentials }
network_deployment_id: { get_attribute: [ network, deployment, id ] }
auto_inc_suffix: true
relationships:
- target: network
type: cloudify.relationships.depends_on
kubernetes:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, k8s, blueprint ] }
external_resource: true
deployment:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, k8s, deployment ] }
inputs:
resource_config: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, k8s, inputs ] }
cloud_credentials: { get_environment_capability: cloud_credentials }
network_deployment_id: { get_attribute: [ network, deployment, id ] }
auto_inc_suffix: true
relationships:
- target: network
type: cloudify.relationships.depends_on
s3:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, s3, blueprint ] }
external_resource: true
deployment:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, s3, deployment ] }
inputs:
resource_config: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, s3, inputs ] }
cloud_credentials: { get_environment_capability: cloud_credentials }
network_deployment_id: { get_attribute: [ network, deployment, id ] }
resource_prefix: { get_attribute: [ prefix, value ] }
auto_inc_suffix: true
relationships:
- target: network
type: cloudify.relationships.depends_on
# queue:
# type: cloudify.nodes.ServiceComponent
# properties:
# resource_config:
# blueprint:
# id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, queue, blueprint ] }
# external_resource: true
# deployment:
# id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, queue, deployment ] }
# inputs:
# resource_config: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, { get_input: env_type }, queue, inputs ] }
# cloud_credentials: { get_environment_capability: cloud_credentials }
# network_deployment_id: { get_attribute: [ network, deployment, id ] }
# resource_prefix: { get_attribute: [ prefix, value ] }
# auto_inc_suffix: true
# relationships:
# - target: network
# type: cloudify.relationships.depends_on
capabilities:
k8s_endpoint:
description: Kubernetes cluster's endpoint
value: { get_attribute: [ kubernetes, capabilities, endpoint ] }
k8s_config:
description: Kubernetes cluster's config
value: { get_attribute: [ kubernetes, capabilities, config ] }
db_host:
description: Database's host
value: { get_attribute: [ database, capabilities, host ] }
db_master_username:
description: Database's master username
value: { get_attribute: [ database, capabilities, master_username ] }
db_master_password:
description: Database's master password
value: { get_attribute: [ database, capabilities, master_password ] }
bucket_url:
description: URL of S3 bucket
value: { get_attribute: [ s3, capabilities, bucket_url ] }