-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathblueprint.yaml
145 lines (134 loc) · 4.09 KB
/
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
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
inputs:
cloud_credentials:
type: dict
resource_config:
type: resource_config
network_deployment_id:
type: string
resource_prefix:
type: string
default: ''
data_types:
resource_config:
properties:
bucket_name:
type: string
access_key_id:
type: string
secret_access_key:
type: string
node_types:
types.minio.Server:
derived_from: cloudify.nodes.Root
properties:
access_key_id:
type: string
default: { get_input: [ resource_config, access_key_id ] }
secret_access_key:
type: string
default: { get_input: [ resource_config, secret_access_key ] }
data_dir:
type: string
default: /var/minio/data
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path:
default: scripts/install-minio-server.sh
fabric_env:
default: &fabric_env
host: { get_attribute: [ network, capabilities, s3_vm_ip ] }
user: centos
connect_kwargs:
pkey: { get_input: [ cloud_credentials, private_key_content ] }
configure:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path:
default: scripts/configure-minio-server.sh
fabric_env:
default: *fabric_env
start:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path:
default: scripts/start-minio-server.sh
fabric_env:
default: *fabric_env
types.minio.Client:
derived_from: cloudify.nodes.Root
properties:
access_key_id:
type: string
default: { get_input: [ resource_config, access_key_id ] }
secret_access_key:
type: string
default: { get_input: [ resource_config, secret_access_key ] }
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path:
default: scripts/install-minio-client.sh
fabric_env:
default: *fabric_env
configure:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path:
default: scripts/configure-minio-client.sh
fabric_env:
default: *fabric_env
types.minio.Bucket:
derived_from: cloudify.nodes.Root
properties:
bucket_name:
type: string
bucket_region:
type: string
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: fabric.fabric_plugin.tasks.run_script
inputs:
script_path:
default: scripts/create-bucket.sh
fabric_env:
default: *fabric_env
node_templates:
network:
type: cloudify.nodes.SharedResource
properties:
resource_config:
deployment:
id: { get_input: network_deployment_id }
minio-server:
type: types.minio.Server
relationships:
- target: network
type: cloudify.relationships.depends_on
minio-client:
type: types.minio.Client
relationships:
- target: minio-server
type: cloudify.relationships.depends_on
minio-bucket:
type: types.minio.Bucket
properties:
bucket_name: { get_input: [ resource_config, bucket_name ] }
bucket_region: { get_input: [ cloud_credentials, region_name ] }
relationships:
- target: minio-server
type: cloudify.relationships.contained_in
- target: minio-client
type: cloudify.relationships.depends_on
capabilities:
bucket_url:
value: { concat: [ 'http://', { get_attribute: [ network, capabilities, s3_vm_ip ] }, ':9000/', { get_input: [ resource_config, bucket_name ] } ] }