cloud-mu 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0703ebefd7fa57346e99f8e85e1a663d9b5355ff4ed0fc6f24950a502dc93a25
4
- data.tar.gz: 289aea9a9ca2fbb881722066babb163d53bf16ed3b0cd5827a3f229289034779
3
+ metadata.gz: dbf64422b17171e8819f4c4453496497eb6002180a188ea55e40a0cfab1c0492
4
+ data.tar.gz: 7ac1d24779b378c39e2d8c73f23eab28580cfc1d3d8ee9ccd621bc2c9f0e9bff
5
5
  SHA512:
6
- metadata.gz: db2ac2b6e630dc7fcf06b91cc4bfd7e3b126c91c50250298b667d66e1c5a715dace2830bae9869ebd6ee251ea2f23d1b1f4d3d61a816a92e4b32e3b708653ef9
7
- data.tar.gz: 9ab809e33c1e1ab6299a36272f674964cdaa1c325c55cfdfb4354262e2b9479ab51ea669be7121400408047e254dae47aeecb8abcbe34c61ea41a61a1740032a
6
+ metadata.gz: 0cb9f5a23e095ce0d22686ad3e40496373e24ddd0f91ff2427c8d3cd63957005e1ee90b66e087d15b56275a21e30375cd830cd551f85de8b26066f04b70bf8f2
7
+ data.tar.gz: 4f64dc9cfeb105a2ea4c52906670f625426a59deae6d75758c0e3df8677fc9b49fc4868051230ffd2bc2ef155aea36734414dc6e96c481ab586240f96c1c28c6
data/Berksfile CHANGED
@@ -2,7 +2,7 @@ source "https://supermarket.chef.io"
2
2
  source chef_repo: "cookbooks/"
3
3
 
4
4
  # Mu Platform Cookbooks
5
- cookbook 'awscli', path: 'cookbooks/awscli'
5
+ cookbook 'awscli'
6
6
  cookbook 'mu-activedirectory'
7
7
  cookbook 'mu-splunk'
8
8
  cookbook 'mu-firewall'
@@ -14,6 +14,5 @@ cookbook 'mu-openvpn'
14
14
  cookbook 'mu-php54'
15
15
  cookbook 'mu-tools'
16
16
  cookbook 'mu-utility'
17
- cookbook 'nagios', path: 'cookbooks/nagios'
18
- cookbook 'firewall', path: 'cookbooks/firewall'
19
- #cookbook 's3fs', path: 'cookbooks/s3fs'
17
+ cookbook 'nagios'
18
+ cookbook 'firewall'
@@ -17,8 +17,8 @@ end
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = 'cloud-mu'
20
- s.version = '2.0.2'
21
- s.date = '2019-05-06'
20
+ s.version = '2.0.3'
21
+ s.date = '2019-05-25'
22
22
  s.require_paths = ['modules']
23
23
  s.required_ruby_version = '>= 2.4'
24
24
  s.summary = "The eGTLabs Mu toolkit for unified cloud deployments"
@@ -216,30 +216,35 @@ module MU
216
216
  end
217
217
 
218
218
  my_policies = cloud_desc["policies"]
219
+
219
220
  my_policies.each { |p|
220
221
  if p.policy_name == policy
221
222
  old = MU::Cloud::AWS.iam(credentials: @config['credentials']).get_policy_version(
222
223
  policy_arn: p.arn,
223
224
  version_id: p.default_version_id
224
225
  ).policy_version
225
- doc = JSON.parse(URI.decode(old.document))
226
+
227
+ doc = JSON.parse URI.decode_www_form_component old.document
228
+
226
229
  need_update = false
230
+
227
231
  doc["Statement"].each { |s|
228
232
  targets.each { |target|
229
- targetstr = if target['type']
233
+ target_string = target
234
+
235
+ if target['type']
230
236
  sibling = @deploy.findLitterMate(
231
237
  name: target["identifier"],
232
238
  type: target["type"]
233
239
  )
234
- sibling.cloudobj.arn
235
- elsif target.is_a?(Hash)
236
- target['identifier']
237
- else
238
- target
240
+
241
+ target_string = sibling.cloudobj.arn
242
+ elsif target.is_a? Hash
243
+ target_string = target['identifier']
239
244
  end
240
245
 
241
- if targetstr and !s["Resource"].include?(targetstr)
242
- s["Resource"] << targetstr
246
+ unless s["Resource"].include? target_string
247
+ s["Resource"] << target_string
243
248
  need_update = true
244
249
  end
245
250
  }
@@ -1,5 +1,6 @@
1
1
  <powershell>
2
2
  Set-ExecutionPolicy Unrestricted -Force -Scope CurrentUser
3
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
3
4
 
4
5
  $sshdUser = "sshd_service"
5
6
  $tmp = "$env:Temp\mu-userdata"
@@ -337,14 +337,19 @@ module MU
337
337
  end
338
338
  end
339
339
  }
340
- if resp.exitcode != 0
340
+
341
+ if resp.exitcode == 1 and output.join("\n").match(/Chef Client finished/)
342
+ MU.log "resp.exit code 1"
343
+ elsif resp.exitcode != 0
341
344
  raise MU::Cloud::BootstrapTempFail if resp.exitcode == 35 or output.join("\n").match(/REBOOT_SCHEDULED| WARN: Reboot requested:/)
342
345
  raise MU::Groomer::RunError, output.slice(output.length-50, output.length).join("")
343
346
  end
344
347
  end
345
348
  rescue MU::Cloud::BootstrapTempFail
346
349
  MU.log "#{@server.mu_name} rebooting from Chef, waiting then resuming", MU::NOTICE
350
+
347
351
  sleep 30
352
+
348
353
  # weird failures seem common in govcloud
349
354
  if MU::Cloud::AWS.isGovCloud?(@config['region'])
350
355
  @server.reboot(true)
@@ -2313,7 +2313,7 @@ MESSAGE_END
2313
2313
  # Create a certificate request for this node
2314
2314
  csr = OpenSSL::X509::Request.new
2315
2315
  csr.version = 3
2316
- csr.subject = OpenSSL::X509::Name.parse "CN=#{data['cn']}/O=Mu/C=US"
2316
+ csr.subject = OpenSSL::X509::Name.parse "/CN=#{data['cn']}/O=Mu/C=US"
2317
2317
  csr.public_key = key.public_key
2318
2318
  csr.sign key, OpenSSL::Digest::SHA256.new
2319
2319
  open("#{MU.mySSLDir}/#{certname}.csr", 'w', 0644) { |io|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud-mu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Stange
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2019-05-06 00:00:00.000000000 Z
15
+ date: 2019-05-25 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: erubis