@@ -8,16 +8,28 @@ imports:
88
99inputs :
1010
11- gcp_auth_file :
12- description : PATH TO YOUR GCP AUTH JSON FILE
11+ client_x509_cert_url :
12+ type : string
1313
14- gcp_project_name :
15- description : YOUR GCP PROJECT ID
14+ client_email :
15+ type : string
1616
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 :
1830 default : us-east1-b
1931
20- gcp_region :
32+ region :
2133 default : us-east1
2234
2335 network_subnet0_cidr :
@@ -38,64 +50,62 @@ inputs:
3850 manager_key_name :
3951 default : cfy-manager-key
4052
41- agent_key_name :
42- default : cfy-agent-key
43-
4453 cloudify_key_file :
4554 default : { concat: [ { get_input: local_ssh_directory }, { get_input: manager_key_name } ] }
4655
47- cloudify_key_file_pub :
48- default : { concat: [ { get_input: local_ssh_directory }, { get_input: agent_key_name } ] }
49-
5056 cloudify_image :
5157 default : https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-7-v20170523
5258
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
5561
56- gcp_ubuntu_trusty_image :
62+ ubuntu_trusty_image :
5763 default : https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1404-trusty-v20170517
5864
65+ small_instance_type :
66+ default : n1-standard-2
67+
5968 manager_ip :
6069 description : >
6170 Resolving the IP for manager setup.
6271 default : { get_attribute: [ network_subnet0_staticip, address ] }
6372
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-
7373 secrets :
7474 description : >
7575 key, value pairs of secrets used in AWS blueprint examples.
7676 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
8290 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
8896 value : { get_property: [ network_subnet0, name ] }
89- - key : gcp_private_subnetwork_name
97+ - key : private_subnetwork_name
9098 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 }
95105 - key : agent_key_public
96- value : { get_attribute: [ agent_key , public_key_export ] }
106+ value : { get_attribute: [ manager_key , public_key_export ] }
97107 - key : agent_key_private
98- value : { get_attribute: [ agent_key , private_key_export ] }
108+ value : { get_attribute: [ manager_key , private_key_export ] }
99109
100110 create_inputs :
101111 default :
@@ -111,10 +121,21 @@ inputs:
111121 - ' /.ssh/key.pem'
112122
113123dsl_definitions :
124+
114125 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 }
118139
119140node_templates :
120141
@@ -134,26 +155,10 @@ node_templates:
134155 inputs :
135156 store_private_key_material : true
136157
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-
153158 network_subnet0_staticip :
154159 type : cloudify.gcp.nodes.Address
155160 properties :
156- region : { get_input: gcp_region }
161+ region : { get_input: region }
157162 gcp_config : *client_config
158163 name : { concat: [ { get_input: resource_prefix }, 's0ip0' ] }
159164
@@ -170,7 +175,7 @@ node_templates:
170175 gcp_config : *client_config
171176 name : { concat: [ { get_input: resource_prefix }, 'network_subnet0' ] }
172177 subnet : { get_input: network_subnet0_cidr }
173- region : { get_input: gcp_region }
178+ region : { get_input: region }
174179 relationships :
175180 - type : cloudify.gcp.relationships.contained_in_network
176181 target : network
@@ -181,7 +186,7 @@ node_templates:
181186 gcp_config : *client_config
182187 name : { concat: [ { get_input: resource_prefix }, 'network_subnet1' ] }
183188 subnet : { get_input: network_subnet1_cidr }
184- region : { get_input: gcp_region }
189+ region : { get_input: region }
185190 relationships :
186191 - type : cloudify.gcp.relationships.contained_in_network
187192 target : network
@@ -232,8 +237,8 @@ node_templates:
232237 name : { concat: [ { get_input: resource_prefix }, 'cloudify_host' ] }
233238 gcp_config : *client_config
234239 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 }
237242 agent_config :
238243 install_method : none
239244 relationships :
0 commit comments