-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathstandalone-blueprint.yaml
More file actions
83 lines (76 loc) · 2.89 KB
/
Copy pathstandalone-blueprint.yaml
File metadata and controls
83 lines (76 loc) · 2.89 KB
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
tosca_definitions_version: cloudify_dsl_1_3
imports:
- https://cloudify.co/spec/cloudify/6.2.0/types.yaml
- plugin:cloudify-fabric-plugin?version= >=2.0.7
- https://raw.githubusercontent.com/cloudify-community/eaas-example/master/utils/custom_types.yaml
inputs:
resource_prefix:
type: string
default: ''
constraints:
- pattern: '(^ *$)|(^[a-zA-Z][a-zA-Z0-9]+$)'
labels:
csys-obj-type:
values:
- service
node_templates:
prefix:
type: eaas.nodes.UniquePrefixGenerator
properties:
predefined_value: { get_input: resource_prefix }
network:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, dev-small, network, blueprint ] }
external_resource: true
deployment:
id: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, dev-small, network, deployment ] }
inputs:
resource_config: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, dev-small, 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.Root
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path: scripts/install-psql.sh
fabric_env: &fabric_env
host: { get_attribute: [ network, capabilities, db_vm_ip ] }
user: centos
connect_kwargs:
pkey: { get_environment_capability: [cloud_credentials, private_key_content ] }
configure:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path: scripts/configure-psql.sh
fabric_env: *fabric_env
master_username: { get_secret: [ eaas_params, { get_environment_capability: cloud_type }, dev-small, db, inputs, master_username ] }
start:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path: scripts/start-psql.sh
fabric_env: *fabric_env
stop:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path: scripts/stop-psql.sh
fabric_env: *fabric_env
relationships:
- target: network
type: cloudify.relationships.depends_on
capabilities:
host:
value: { get_attribute: [ network, capabilities, db_vm_ip ] }
master_username:
value: { get_attribute: [ database, master_username ] }
master_password:
value: { get_attribute: [ database, master_password ] }