@@ -49,9 +49,9 @@ resources:
49
49
accessConfigs:
50
50
- name: External NAT
51
51
type: ONE_TO_ONE_NAT
52
- serviceAccounts:
52
+ serviceAccounts:
53
53
- email: "default"
54
- scopes:
54
+ scopes:
55
55
- "https://www.googleapis.com/auth/devstorage.read_only"
56
56
- "https://www.googleapis.com/auth/logging.write"
57
57
tags:
@@ -72,24 +72,27 @@ resources:
72
72
# Download runlist and cookbooks
73
73
curl -L {{ properties["chef_node_url"] }} > /tmp/node.json
74
74
75
+ # Define cookbooks path
76
+ echo "cookbooks_path '/var/chef/site-cookbooks'" > /tmp/solo.rb
77
+
75
78
# Configure instance
76
- chef-solo -l debug -j /tmp/node.json -r {{ properties["chef_cookbook_url"] }}
79
+ chef-solo -c /tmp/solo.rb -l debug -j /tmp/node.json -r {{ properties["chef_cookbook_url"] }}
77
80
- key: storage-bucket
78
81
value: {{ properties["storage_bucket"] }}
79
82
- key: dbinstance
80
83
value: {{ properties["dbinstance"] }}
81
84
- key: dbname
82
85
value: {{ properties["dbname"] }}
83
86
- key: dbuser
84
- value: {{ properties["dbuser"] }}
87
+ value: {{ properties["dbuser"] }}
85
88
- key: dbpassword
86
- value: {{ properties["dbpassword"] }}
89
+ value: {{ properties["dbpassword"] }}
87
90
- key: dbhost
88
91
value: {{ properties["dbhost"] }}
89
92
- key: gcs-access-key
90
93
value: {{ properties["gcs_access_key"] }}
91
94
- key: gcs-secret
92
- value: {{ properties["gcs_secret"] }}
95
+ value: {{ properties["gcs_secret"] }}
93
96
94
97
{% for zone in properties ["zones" ] %}
95
98
# Instance Group Manager for web servers
@@ -132,9 +135,9 @@ resources:
132
135
accessConfigs:
133
136
- name: External NAT
134
137
type: ONE_TO_ONE_NAT
135
- serviceAccounts:
138
+ serviceAccounts:
136
139
- email: "default"
137
- scopes:
140
+ scopes:
138
141
- "https://www.googleapis.com/auth/devstorage.full_control"
139
142
- "https://www.googleapis.com/auth/sqlservice.admin"
140
143
- "https://www.googleapis.com/auth/compute"
@@ -152,13 +155,16 @@ resources:
152
155
curl -s "https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh" | bash
153
156
154
157
# Install Chef
155
- curl -L https://www.opscode.com/chef/ install.sh | bash
158
+ curl -LO https://omnitruck.chef.io/ install.sh && sudo bash ./install.sh -v 11.18.12 && rm install.sh
156
159
157
160
# Download runlist and cookbooks
158
161
curl -L {{ properties["chef_node_url"] }} > /tmp/node.json
159
162
163
+ # Define cookbooks path
164
+ echo "cookbooks_path '/var/chef/site-cookbooks'" > /tmp/solo.rb
165
+
160
166
# Configure instance
161
- chef-solo -l debug -j /tmp/node.json -r {{ properties["chef_cookbook_url"] }}
167
+ chef-solo -c /tmp/solo.rb - l debug -j /tmp/node.json -r {{ properties["chef_cookbook_url"] }}
162
168
- key: storage-bucket
163
169
value: {{ properties["storage_bucket"] }}
164
170
- key: leader
@@ -168,12 +174,12 @@ resources:
168
174
- key: dbname
169
175
value: {{ properties["dbname"] }}
170
176
- key: dbuser
171
- value: {{ properties["dbuser"] }}
177
+ value: {{ properties["dbuser"] }}
172
178
- key: dbpassword
173
- value: {{ properties["dbpassword"] }}
179
+ value: {{ properties["dbpassword"] }}
174
180
- key: dbhost
175
181
value: {{ properties["dbhost"] }}
176
182
- key: gcs-access-key
177
183
value: {{ properties["gcs_access_key"] }}
178
184
- key: gcs-secret
179
- value: {{ properties["gcs_secret"] }}
185
+ value: {{ properties["gcs_secret"] }}
0 commit comments