cloud-mu 2.0.0.pre.beta1 → 2.0.0.pre.beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27ff913665cbcb6838ce2e1b2b521307b1cc5061daf2ac576a240aca3eb29b19
4
- data.tar.gz: 8ab03cef1d7c16b43f9c609b7789801b5e27ac4cc48ae3f53e603d530bbe7016
3
+ metadata.gz: 565d062e93b6512b12c242ebc5bdf3c53f3d12d269ae2586b3d77d412eff8844
4
+ data.tar.gz: c2ffd33d778e0962fe94ec2fdbffa36a5db7d1d9f81754e4f4fa2fb301aace14
5
5
  SHA512:
6
- metadata.gz: 3df2ed93f9f72ed6afae31023d0e06123705628b46f25e59cf9a7958ed398deb014470ecc9a0947b109b3b5c112fed2bdd1932568e488751cede8703ff0f8408
7
- data.tar.gz: b075b39cc903276cee6e27d2d3969072d743a96f39e9bd77b3130e91cc19f822de5399e8b164dc84ebeebc47a87b67586bc2c4de92cc18d99d2b0aa5a6af1c56
6
+ metadata.gz: 45d7bb74d8f5de582fc51264b3f58b2e01dd45ee55829a187d3a66e3ea700552b17fe73f9259bb834e1af72379979586cc31066d837826281a1daf073f52006e
7
+ data.tar.gz: 2409873627fed8e0710264cf73b5a821120558d7f8d3e536e140a5939866fdd8393bdb7b41ce7f3ba0da709cacf288d1b1f1ba1ebaae8b6967842262cd03c13d
data/cloud-mu.gemspec CHANGED
@@ -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.0-beta1'
21
- s.date = '2019-02-18'
20
+ s.version = '2.0.0-beta2'
21
+ s.date = '2019-03-01'
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"
data/modules/mu/cloud.rb CHANGED
@@ -929,7 +929,6 @@ module MU
929
929
  }
930
930
  end
931
931
  else
932
- MU.log "in dependencies() and findLitterMate gave me "+sib_by_name.to_s+" on behalf of "+self.to_s, MU::NOTICE, details: @config['vpc']
933
932
  @vpc = sib_by_name
934
933
  end
935
934
  end
@@ -332,6 +332,7 @@ module MU
332
332
  "permissions" => {
333
333
  "type" => "array",
334
334
  "description" => "if `iam_role` is unspecified, we will create a default execution role for our function, and add one or more permissions to it.",
335
+ "default" => ["basic"],
335
336
  "items" => {
336
337
  "type" => "string",
337
338
  "description" => "A permission to add to our Lambda function's default role, corresponding to standard AWS policies (see https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html)",
@@ -584,6 +584,20 @@ MU.log "ROUTES TO #{target_instance.name}", MU::WARN, details: resp
584
584
  end
585
585
  end
586
586
 
587
+ # If create_standard_subnets is off, and no route_tables were
588
+ # declared at all, let's assume we want purely self-contained
589
+ # private VPCs
590
+ vpc['route_tables'] ||= [
591
+ {
592
+ "name" => "private",
593
+ "routes" => [
594
+ {
595
+ "destination_network" => "0.0.0.0/0"
596
+ }
597
+ ]
598
+ }
599
+ ]
600
+
587
601
  # Google VPCs can't have routes that are anything other than global
588
602
  # (they can be tied to individual instances by tags, but w/e). So we
589
603
  # decompose our VPCs into littler VPCs, one for each declared route
@@ -778,19 +792,9 @@ MU.log "ROUTES TO #{target_instance.name}", MU::WARN, details: resp
778
792
  tags: tags,
779
793
  network: network
780
794
  )
781
- else
782
- routeobj = ::Google::Apis::ComputeBeta::Route.new(
783
- name: routename,
784
- dest_range: route['destination_network'],
785
- network: network,
786
- priority: route["priority"],
787
- description: @deploy.deploy_id,
788
- tags: tags,
789
- next_hop_network: network
790
- )
791
795
  end
792
796
 
793
- if route['gateway'] != "#DENY"
797
+ if route['gateway'] != "#DENY" and routeobj
794
798
  begin
795
799
  MU::Cloud::Google.compute(credentials: @config['credentials']).get_route(@config['project'], routename)
796
800
  rescue ::Google::Apis::ClientError, MU::MuError => e
@@ -17,10 +17,6 @@ require 'fileutils'
17
17
  require 'json'
18
18
  require 'stringio'
19
19
  require 'securerandom'
20
- gem "chef"
21
- autoload :Chef, 'chef'
22
- gem "chef-vault"
23
- autoload :ChefVault, 'chef-vault'
24
20
  require 'timeout'
25
21
 
26
22
  module MU
data/modules/mu.rb CHANGED
@@ -214,7 +214,10 @@ module MU
214
214
  if MU.mu_user.nil? or MU.mu_user.empty? or MU.mu_user == "mu" or MU.mu_user == "root"
215
215
  return @myDataDir
216
216
  else
217
- return Etc.getpwnam(MU.mu_user).dir+"/.mu/var"
217
+ basepath = Etc.getpwnam(MU.mu_user).dir+"/.mu"
218
+ Dir.mkdir(basepath, 0755) if !Dir.exists?(basepath)
219
+ Dir.mkdir(basepath+"/var", 0755) if !Dir.exists?(basepath+"/var")
220
+ return basepath+"/var"
218
221
  end
219
222
  end
220
223
 
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.0.pre.beta1
4
+ version: 2.0.0.pre.beta2
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-02-18 00:00:00.000000000 Z
15
+ date: 2019-03-01 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: erubis