@@ -8,16 +8,28 @@ imports:
8
8
9
9
inputs :
10
10
11
- gcp_auth_file :
12
- description : PATH TO YOUR GCP AUTH JSON FILE
11
+ client_x509_cert_url :
12
+ type : string
13
13
14
- gcp_project_name :
15
- description : YOUR GCP PROJECT ID
14
+ client_email :
15
+ type : string
16
16
17
- gcp_zone :
17
+ client_id :
18
+ type : string
19
+
20
+ project_id :
21
+ type : string
22
+
23
+ private_key_id :
24
+ type : string
25
+
26
+ private_key :
27
+ type : string
28
+
29
+ zone :
18
30
default : us-east1-b
19
31
20
- gcp_region :
32
+ region :
21
33
default : us-east1
22
34
23
35
network_subnet0_cidr :
@@ -38,64 +50,62 @@ inputs:
38
50
manager_key_name :
39
51
default : cfy-manager-key
40
52
41
- agent_key_name :
42
- default : cfy-agent-key
43
-
44
53
cloudify_key_file :
45
54
default : { concat: [ { get_input: local_ssh_directory }, { get_input: manager_key_name } ] }
46
55
47
- cloudify_key_file_pub :
48
- default : { concat: [ { get_input: local_ssh_directory }, { get_input: agent_key_name } ] }
49
-
50
56
cloudify_image :
51
57
default : https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20170523
52
58
53
- gcp_small_instance_type :
54
- default : n1-standard-2
59
+ centos_core_image :
60
+ default : https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20170523
55
61
56
- gcp_ubuntu_trusty_image :
62
+ ubuntu_trusty_image :
57
63
default : https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1404-trusty-v20170517
58
64
65
+ small_instance_type :
66
+ default : n1-standard-2
67
+
59
68
manager_ip :
60
69
description : >
61
70
Resolving the IP for manager setup.
62
71
default : { get_attribute: [ network_subnet0_staticip, address ] }
63
72
64
- plugin_urls :
65
- description : >
66
- Plugins used in AWS blueprint examples.
67
- default :
68
- - https://github.com/cloudify-incubator/cloudify-utilities-plugin/releases/download/1.2.5/cloudify_utilities_plugin-1.2.5-py27-none-linux_x86_64-centos-Core.wgn
69
- - http://repository.cloudifysource.org/cloudify/wagons/cloudify-gcp-plugin/1.0/cloudify_gcp_plugin-1.0-py27-none-linux_x86_64-centos-Core.wgn
70
- - http://repository.cloudifysource.org/cloudify/wagons/cloudify-diamond-plugin/1.3.5/cloudify_diamond_plugin-1.3.5-py27-none-linux_x86_64-centos-Core.wgn
71
- - http://repository.cloudifysource.org/cloudify/wagons/cloudify-diamond-plugin/1.3.5/cloudify_diamond_plugin-1.3.5-py27-none-linux_x86_64-Ubuntu-trusty.wgn
72
-
73
73
secrets :
74
74
description : >
75
75
key, value pairs of secrets used in AWS blueprint examples.
76
76
default :
77
- - key : gcp_auth_file
78
- value : { get_input: gcp_auth_file }
79
- - key : gcp_project_name
80
- value : { get_input: gcp_project_name }
81
- - key : gcp_management_network_name
77
+ - key : client_x509_cert_url
78
+ value : { get_input: client_x509_cert_url }
79
+ - key : client_email
80
+ value : { get_input: client_email }
81
+ - key : client_id
82
+ value : { get_input: client_id }
83
+ - key : project_id
84
+ value : { get_input: project_id }
85
+ - key : private_key_id
86
+ value : { get_input: private_key_id }
87
+ - key : private_key
88
+ value : { get_input: private_key }
89
+ - key : management_network_name
82
90
value : { get_property: [ network, name ] }
83
- - key : gcp_zone
84
- value : { get_input: gcp_zone }
85
- - key : gcp_region
86
- value : { get_input: gcp_region }
87
- - key : gcp_management_subnetwork_name
91
+ - key : zone
92
+ value : { get_input: zone }
93
+ - key : region
94
+ value : { get_input: region }
95
+ - key : management_subnetwork_name
88
96
value : { get_property: [ network_subnet0, name ] }
89
- - key : gcp_private_subnetwork_name
97
+ - key : private_subnetwork_name
90
98
value : { get_property: [ network_subnet1, name ] }
91
- - key : gcp_ubuntu_trusty_image
92
- value : { get_input: gcp_ubuntu_trusty_image }
93
- - key : gcp_small_instance_type
94
- value : { get_input: gcp_small_instance_type }
99
+ - key : ubuntu_trusty_image
100
+ value : { get_input: ubuntu_trusty_image }
101
+ - key : centos_core_image
102
+ value : { get_input: centos_core_image }
103
+ - key : small_instance_type
104
+ value : { get_input: small_instance_type }
95
105
- key : agent_key_public
96
- value : { get_attribute: [ agent_key , public_key_export ] }
106
+ value : { get_attribute: [ manager_key , public_key_export ] }
97
107
- key : agent_key_private
98
- value : { get_attribute: [ agent_key , private_key_export ] }
108
+ value : { get_attribute: [ manager_key , private_key_export ] }
99
109
100
110
create_inputs :
101
111
default :
@@ -111,10 +121,21 @@ inputs:
111
121
- ' /.ssh/key.pem'
112
122
113
123
dsl_definitions :
124
+
114
125
client_config : &client_config
115
- auth : { get_input: gcp_auth_file }
116
- project : { get_input: gcp_project_name }
117
- zone : { get_input: gcp_zone }
126
+ auth :
127
+ type : service_account
128
+ auth_uri : https://accounts.google.com/o/oauth2/auth
129
+ token_uri : https://accounts.google.com/o/oauth2/token
130
+ auth_provider_x509_cert_url : https://www.googleapis.com/oauth2/v1/certs
131
+ client_x509_cert_url : { get_input: client_x509_cert_url }
132
+ client_email : { get_input: client_email }
133
+ client_id : { get_input: client_id }
134
+ project_id : { get_input: project_id }
135
+ private_key_id : { get_input: private_key_id }
136
+ private_key : { get_input: private_key }
137
+ project : { get_input: project_id }
138
+ zone : { get_input: zone }
118
139
119
140
node_templates :
120
141
@@ -134,26 +155,10 @@ node_templates:
134
155
inputs :
135
156
store_private_key_material : true
136
157
137
- agent_key :
138
- type : cloudify.keys.nodes.RSAKey
139
- properties :
140
- resource_config :
141
- public_key_path : { concat: [ { get_input: local_ssh_directory }, { get_input: agent_key_name }, '.pub' ] }
142
- private_key_path : { concat: [ { get_input: local_ssh_directory }, { get_input: agent_key_name } ] }
143
- openssh_format : true
144
- use_secret_store : false
145
- key_name : { get_input: agent_key_name }
146
- interfaces :
147
- cloudify.interfaces.lifecycle :
148
- create :
149
- implementation : keys.cloudify_ssh_key.operations.create
150
- inputs :
151
- store_private_key_material : true
152
-
153
158
network_subnet0_staticip :
154
159
type : cloudify.gcp.nodes.Address
155
160
properties :
156
- region : { get_input: gcp_region }
161
+ region : { get_input: region }
157
162
gcp_config : *client_config
158
163
name : { concat: [ { get_input: resource_prefix }, 's0ip0' ] }
159
164
@@ -170,7 +175,7 @@ node_templates:
170
175
gcp_config : *client_config
171
176
name : { concat: [ { get_input: resource_prefix }, 'network_subnet0' ] }
172
177
subnet : { get_input: network_subnet0_cidr }
173
- region : { get_input: gcp_region }
178
+ region : { get_input: region }
174
179
relationships :
175
180
- type : cloudify.gcp.relationships.contained_in_network
176
181
target : network
@@ -181,7 +186,7 @@ node_templates:
181
186
gcp_config : *client_config
182
187
name : { concat: [ { get_input: resource_prefix }, 'network_subnet1' ] }
183
188
subnet : { get_input: network_subnet1_cidr }
184
- region : { get_input: gcp_region }
189
+ region : { get_input: region }
185
190
relationships :
186
191
- type : cloudify.gcp.relationships.contained_in_network
187
192
target : network
@@ -232,8 +237,8 @@ node_templates:
232
237
name : { concat: [ { get_input: resource_prefix }, 'cloudify_host' ] }
233
238
gcp_config : *client_config
234
239
image_id : { get_input: cloudify_image }
235
- instance_type : { get_input: gcp_small_instance_type }
236
- zone : { get_input: gcp_zone }
240
+ instance_type : { get_input: small_instance_type }
241
+ zone : { get_input: zone }
237
242
agent_config :
238
243
install_method : none
239
244
relationships :
0 commit comments