cloud-mu 3.3.0 → 3.5.1

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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/ansible/roles/mu-nat/tasks/main.yml +3 -0
  3. data/bin/mu-aws-setup +41 -7
  4. data/bin/mu-azure-setup +36 -2
  5. data/bin/mu-configure +214 -119
  6. data/bin/mu-gcp-setup +37 -2
  7. data/bin/mu-node-manage +3 -0
  8. data/bin/mu-refresh-ssl +67 -0
  9. data/bin/mu-run-tests +14 -4
  10. data/bin/mu-self-update +30 -10
  11. data/bin/mu-upload-chef-artifacts +30 -26
  12. data/cloud-mu.gemspec +9 -7
  13. data/cookbooks/mu-master/attributes/default.rb +5 -1
  14. data/cookbooks/mu-master/metadata.rb +2 -2
  15. data/cookbooks/mu-master/recipes/default.rb +81 -26
  16. data/cookbooks/mu-master/recipes/init.rb +197 -62
  17. data/cookbooks/mu-master/recipes/update_nagios_only.rb +1 -1
  18. data/cookbooks/mu-master/recipes/vault.rb +78 -77
  19. data/cookbooks/mu-master/templates/default/mods/rewrite.conf.erb +1 -0
  20. data/cookbooks/mu-master/templates/default/nagios.conf.erb +103 -0
  21. data/cookbooks/mu-master/templates/default/web_app.conf.erb +14 -30
  22. data/cookbooks/mu-tools/attributes/default.rb +12 -0
  23. data/cookbooks/mu-tools/files/centos-6/CentOS-Base.repo +47 -0
  24. data/cookbooks/mu-tools/libraries/helper.rb +98 -4
  25. data/cookbooks/mu-tools/libraries/monkey.rb +1 -1
  26. data/cookbooks/mu-tools/recipes/apply_security.rb +31 -9
  27. data/cookbooks/mu-tools/recipes/aws_api.rb +8 -2
  28. data/cookbooks/mu-tools/recipes/base_repositories.rb +1 -1
  29. data/cookbooks/mu-tools/recipes/gcloud.rb +2 -9
  30. data/cookbooks/mu-tools/recipes/google_api.rb +7 -0
  31. data/cookbooks/mu-tools/recipes/rsyslog.rb +8 -1
  32. data/cookbooks/mu-tools/resources/disk.rb +113 -42
  33. data/cookbooks/mu-tools/resources/mommacat_request.rb +1 -2
  34. data/cookbooks/mu-tools/templates/centos-8/sshd_config.erb +215 -0
  35. data/extras/Gemfile.lock.bootstrap +394 -0
  36. data/extras/bucketstubs/error.html +0 -0
  37. data/extras/bucketstubs/index.html +0 -0
  38. data/extras/clean-stock-amis +11 -3
  39. data/extras/generate-stock-images +6 -3
  40. data/extras/git_rpm/build.sh +20 -0
  41. data/extras/git_rpm/mugit.spec +53 -0
  42. data/extras/image-generators/AWS/centos7.yaml +19 -16
  43. data/extras/image-generators/AWS/{rhel7.yaml → rhel71.yaml} +0 -0
  44. data/extras/image-generators/AWS/{win2k12.yaml → win2k12r2.yaml} +0 -0
  45. data/extras/image-generators/VMWare/centos8.yaml +15 -0
  46. data/extras/openssl_rpm/build.sh +19 -0
  47. data/extras/openssl_rpm/mussl.spec +46 -0
  48. data/extras/python_rpm/muthon.spec +14 -4
  49. data/extras/ruby_rpm/muby.spec +9 -5
  50. data/extras/sqlite_rpm/build.sh +19 -0
  51. data/extras/sqlite_rpm/muqlite.spec +47 -0
  52. data/install/installer +7 -5
  53. data/modules/mommacat.ru +2 -2
  54. data/modules/mu.rb +12 -5
  55. data/modules/mu/cloud/machine_images.rb +1 -1
  56. data/modules/mu/cloud/providers.rb +6 -1
  57. data/modules/mu/cloud/resource_base.rb +7 -4
  58. data/modules/mu/cloud/ssh_sessions.rb +5 -1
  59. data/modules/mu/cloud/wrappers.rb +16 -7
  60. data/modules/mu/config.rb +28 -12
  61. data/modules/mu/config/database.rb +2 -2
  62. data/modules/mu/config/firewall_rule.rb +1 -1
  63. data/modules/mu/config/ref.rb +3 -3
  64. data/modules/mu/config/schema_helpers.rb +12 -3
  65. data/modules/mu/config/server.rb +10 -4
  66. data/modules/mu/config/server_pool.rb +2 -2
  67. data/modules/mu/config/vpc.rb +10 -10
  68. data/modules/mu/defaults/AWS.yaml +96 -96
  69. data/modules/mu/deploy.rb +27 -14
  70. data/modules/mu/groomers/chef.rb +2 -2
  71. data/modules/mu/master.rb +49 -3
  72. data/modules/mu/mommacat.rb +27 -9
  73. data/modules/mu/mommacat/naming.rb +2 -2
  74. data/modules/mu/mommacat/search.rb +16 -5
  75. data/modules/mu/mommacat/storage.rb +67 -32
  76. data/modules/mu/providers/aws.rb +185 -71
  77. data/modules/mu/providers/aws/alarm.rb +3 -3
  78. data/modules/mu/providers/aws/bucket.rb +19 -19
  79. data/modules/mu/providers/aws/cache_cluster.rb +22 -22
  80. data/modules/mu/providers/aws/cdn.rb +2 -2
  81. data/modules/mu/providers/aws/collection.rb +14 -14
  82. data/modules/mu/providers/aws/container_cluster.rb +27 -27
  83. data/modules/mu/providers/aws/database.rb +49 -45
  84. data/modules/mu/providers/aws/dnszone.rb +5 -5
  85. data/modules/mu/providers/aws/endpoint.rb +35 -35
  86. data/modules/mu/providers/aws/firewall_rule.rb +26 -23
  87. data/modules/mu/providers/aws/function.rb +35 -32
  88. data/modules/mu/providers/aws/group.rb +7 -7
  89. data/modules/mu/providers/aws/habitat.rb +2 -2
  90. data/modules/mu/providers/aws/job.rb +35 -32
  91. data/modules/mu/providers/aws/loadbalancer.rb +58 -37
  92. data/modules/mu/providers/aws/log.rb +14 -14
  93. data/modules/mu/providers/aws/msg_queue.rb +10 -10
  94. data/modules/mu/providers/aws/nosqldb.rb +8 -8
  95. data/modules/mu/providers/aws/notifier.rb +7 -7
  96. data/modules/mu/providers/aws/role.rb +69 -47
  97. data/modules/mu/providers/aws/search_domain.rb +10 -10
  98. data/modules/mu/providers/aws/server.rb +198 -110
  99. data/modules/mu/providers/aws/server_pool.rb +71 -119
  100. data/modules/mu/providers/aws/storage_pool.rb +17 -9
  101. data/modules/mu/providers/aws/user.rb +1 -1
  102. data/modules/mu/providers/aws/vpc.rb +106 -51
  103. data/modules/mu/providers/aws/vpc_subnet.rb +43 -39
  104. data/modules/mu/providers/azure.rb +82 -16
  105. data/modules/mu/providers/azure/server.rb +18 -3
  106. data/modules/mu/providers/cloudformation/server.rb +1 -1
  107. data/modules/mu/providers/google.rb +20 -5
  108. data/modules/mu/providers/google/folder.rb +6 -2
  109. data/modules/mu/providers/google/function.rb +65 -30
  110. data/modules/mu/providers/google/role.rb +2 -1
  111. data/modules/mu/providers/google/vpc.rb +27 -2
  112. data/modules/tests/aws-servers-with-handrolled-iam.yaml +37 -0
  113. data/modules/tests/k8s.yaml +1 -1
  114. metadata +32 -15
@@ -94,7 +94,7 @@ module MU
94
94
  else
95
95
  begin
96
96
  Timeout.timeout(2) do
97
- response = open("#{base_url}/#{cloud}.yaml").read
97
+ response = URI.open("#{base_url}/#{cloud}.yaml").read
98
98
  images ||= {}
99
99
  images.deep_merge!(YAML.load(response))
100
100
  break
@@ -64,7 +64,12 @@ module MU
64
64
  # code for each of its supported resource type classes.
65
65
  failed = []
66
66
  MU::Cloud.supportedClouds.each { |cloud|
67
- require "mu/providers/#{cloud.downcase}"
67
+ begin
68
+ require "mu/providers/#{cloud.downcase}"
69
+ rescue LoadError, Gem::MissingSpecError => e
70
+ MU.log "Error loading #{cloud} library, calls into this provider will fail", MU::ERR, details: e.message
71
+ next
72
+ end
68
73
  cloudclass = Object.const_get("MU").const_get("Cloud").const_get(cloud)
69
74
  @@generic_class_methods_toplevel.each { |method|
70
75
  if !cloudclass.respond_to?(method)
@@ -738,7 +738,7 @@ module MU
738
738
  MU.log "Couldn't find existing resource #{ext_deploy["cloud_id"]}, #{ext_deploy["cloud_type"]}", MU::ERR if found.nil?
739
739
  @deploy.notify(ext_deploy["cloud_type"], found.config["name"], found.deploydata, mu_name: found.mu_name, triggering_node: @mu_name)
740
740
  elsif ext_deploy["mu_name"] && ext_deploy["deploy_id"]
741
- MU.log "#{ext_deploy["mu_name"]} / #{ext_deploy["deploy_id"]}"
741
+ MU.log "#{self}: Importing metadata for #{ext_deploy["cloud_type"]} #{ext_deploy["mu_name"]} from #{ext_deploy["deploy_id"]}"
742
742
  found = MU::MommaCat.findStray(
743
743
  @config['cloud'],
744
744
  ext_deploy["cloud_type"],
@@ -748,8 +748,11 @@ module MU
748
748
  dummy_ok: false
749
749
  ).first
750
750
 
751
- MU.log "Couldn't find existing resource #{ext_deploy["mu_name"]}/#{ext_deploy["deploy_id"]}, #{ext_deploy["cloud_type"]}", MU::ERR if found.nil?
752
- @deploy.notify(ext_deploy["cloud_type"], found.config["name"], found.deploydata, mu_name: ext_deploy["mu_name"], triggering_node: @mu_name)
751
+ if found.nil?
752
+ MU.log "Couldn't find existing resource #{ext_deploy["mu_name"]}/#{ext_deploy["deploy_id"]}, #{ext_deploy["cloud_type"]}", MU::ERR
753
+ else
754
+ @deploy.notify(ext_deploy["cloud_type"], found.config["name"], found.deploydata, mu_name: ext_deploy["mu_name"], triggering_node: @mu_name)
755
+ end
753
756
  else
754
757
  MU.log "Trying to find existing deploy, but either the cloud_id is not valid or no mu_name and deploy_id where provided", MU::ERR
755
758
  end
@@ -909,7 +912,7 @@ module MU
909
912
  }
910
913
 
911
914
  @deploydata = @cloudobj.deploydata
912
- @config = @cloudobj.config
915
+ @config = MU::Config.manxify(@cloudobj.config)
913
916
  retval
914
917
  end
915
918
  } # end instance method list
@@ -125,7 +125,7 @@ module MU
125
125
  end
126
126
  end
127
127
  end
128
- rescue RuntimeError => e
128
+ rescue RuntimeError, IOError => e
129
129
  raise MU::Cloud::BootstrapTempFail, "Got #{e.inspect} performing initial SSH connect tasks, will try again"
130
130
  end
131
131
 
@@ -187,6 +187,10 @@ module MU
187
187
  retry
188
188
  # rescue SystemCallError, Timeout::Error, Errno::ECONNRESET, Errno::EHOSTUNREACH, Net::SSH::Proxy::ConnectError, SocketError, Net::SSH::Disconnect, Net::SSH::AuthenticationFailed, IOError, Net::SSH::ConnectionTimeout, Net::SSH::Proxy::ConnectError, MU::Cloud::NetSSHFail => e
189
189
  rescue SystemExit, Timeout::Error, Net::SSH::AuthenticationFailed, Net::SSH::Disconnect, Net::SSH::ConnectionTimeout, Net::SSH::Proxy::ConnectError, Net::SSH::Exception, Errno::ECONNRESET, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::EPIPE, SocketError, IOError => e
190
+ if !active?
191
+ raise MuError, "Server #{@mu_name} disappeared while I was attempting to log into it"
192
+ end
193
+
190
194
  begin
191
195
  session.close if !session.nil?
192
196
  rescue Net::SSH::Disconnect, IOError => e
@@ -103,14 +103,23 @@ module MU
103
103
  next
104
104
  end
105
105
 
106
- found = cloudclass.find(args)
107
- if !found.nil?
108
- if found.is_a?(Hash)
109
- allfound.merge!(found)
110
- else
111
- raise MuError, "#{cloudclass}.find returned a non-Hash result"
112
- end
106
+ credsets = if args[:credentials]
107
+ [args[:credentials]]
108
+ else
109
+ cloudbase.listCredentials
113
110
  end
111
+
112
+ credsets.each { |creds|
113
+ args[:credentials] = creds
114
+ found = cloudclass.find(args)
115
+ if !found.nil?
116
+ if found.is_a?(Hash)
117
+ allfound.merge!(found)
118
+ else
119
+ raise MuError, "#{cloudclass}.find returned a non-Hash result"
120
+ end
121
+ end
122
+ }
114
123
  rescue MuCloudResourceNotImplemented
115
124
  end
116
125
  }
data/modules/mu/config.rb CHANGED
@@ -437,27 +437,27 @@ module MU
437
437
  # @param type [String]
438
438
  # @param phase [String]
439
439
  # @param no_create_wait [Boolean]
440
- def self.addDependency(resource, name, type, phase: "create", no_create_wait: false)
441
- if ![nil, "create", "groom"].include?(phase)
442
- raise MuError, "Invalid phase '#{phase}' while adding dependency #{type} #{name} to #{resource['name']}"
440
+ def self.addDependency(resource, name, type, their_phase: "create", my_phase: nil)
441
+ if ![nil, "create", "groom"].include?(their_phase)
442
+ raise MuError, "Invalid their_phase '#{their_phase}' while adding dependency #{type} #{name} to #{resource['name']}"
443
443
  end
444
444
  resource['dependencies'] ||= []
445
445
  _shortclass, cfg_name, _cfg_plural, _classname = MU::Cloud.getResourceNames(type)
446
446
 
447
447
  resource['dependencies'].each { |dep|
448
448
  if dep['type'] == cfg_name and dep['name'].to_s == name.to_s
449
- dep["no_create_wait"] = no_create_wait
450
- dep["phase"] = phase if phase
449
+ dep["their_phase"] = their_phase if their_phase
450
+ dep["my_phase"] = my_phase if my_phase
451
451
  return
452
452
  end
453
453
  }
454
454
 
455
455
  newdep = {
456
456
  "type" => cfg_name,
457
- "name" => name.to_s,
458
- "no_create_wait" => no_create_wait
457
+ "name" => name.to_s
459
458
  }
460
- newdep["phase"] = phase if phase
459
+ newdep["their_phase"] = their_phase if their_phase
460
+ newdep["my_phase"] = my_phase if my_phase
461
461
 
462
462
  resource['dependencies'] << newdep
463
463
 
@@ -746,7 +746,7 @@ module MU
746
746
  next if !acl_include["name"] and !acl_include["rule_name"]
747
747
  acl_include["name"] ||= acl_include["rule_name"]
748
748
  if haveLitterMate?(acl_include["name"], "firewall_rules")
749
- MU::Config.addDependency(descriptor, acl_include["name"], "firewall_rule", no_create_wait: (cfg_name == "vpc"))
749
+ MU::Config.addDependency(descriptor, acl_include["name"], "firewall_rule", my_phase: ((cfg_name == "vpc") ? "groom" : "create"))
750
750
  elsif acl_include["name"]
751
751
  MU.log shortclass.to_s+" #{descriptor['name']} depends on FirewallRule #{acl_include["name"]}, but no such rule declared.", MU::ERR
752
752
  ok = false
@@ -892,6 +892,10 @@ module MU
892
892
  deleteme = []
893
893
 
894
894
  resource["dependencies"].each { |dependency|
895
+ dependency["their_phase"] ||= dependency["phase"]
896
+ dependency.delete("phase")
897
+ dependency["my_phase"] ||= dependency["no_create_wait"] ? "groom" : "create"
898
+ dependency.delete("no_create_wait")
895
899
  # make sure the thing we depend on really exists
896
900
  sibling = haveLitterMate?(dependency['name'], dependency['type'])
897
901
  if !sibling
@@ -929,10 +933,22 @@ module MU
929
933
  end
930
934
  end
931
935
 
936
+ if dependency['their_phase'] == "groom"
937
+ sibling['dependencies'].each { |sib_dep|
938
+ next if sib_dep['type'] != cfg_name or sib_dep['their_phase'] != "groom"
939
+ cousin = haveLitterMate?(sib_dep['name'], sib_dep['type'])
940
+ if cousin and cousin['name'] == resource['name']
941
+ MU.log "Circular dependency between #{type} #{resource['name']} <=> #{dependency['type']} #{dependency['name']}", MU::ERR, details: [ resource['name'] => dependency, sibling['name'] => sib_dep ]
942
+ ok = false
943
+ end
944
+ }
945
+ end
946
+
932
947
  # Check for a circular relationship that will lead to a deadlock
933
948
  # when creating resource. This only goes one layer deep, and does
934
949
  # not consider groom-phase deadlocks.
935
- if dependency['phase'] == "groom" or dependency['no_create_wait'] or (
950
+ if dependency['their_phase'] == "groom" or
951
+ dependency['my_phase'] == "groom" or (
936
952
  !MU::Cloud.resourceClass(sibling['cloud'], type).deps_wait_on_my_creation and
937
953
  !MU::Cloud.resourceClass(resource['cloud'], type).waits_on_parent_completion
938
954
  )
@@ -941,7 +957,7 @@ module MU
941
957
 
942
958
  if sibling['dependencies']
943
959
  sibling['dependencies'].each { |sib_dep|
944
- next if sib_dep['type'] != cfg_name or sib_dep['no_create_wait']
960
+ next if sib_dep['type'] != cfg_name or sib_dep['my_phase'] == "groom"
945
961
  cousin = haveLitterMate?(sib_dep['name'], sib_dep['type'])
946
962
  if cousin and cousin['name'] == resource['name']
947
963
  MU.log "Circular dependency between #{type} #{resource['name']} <=> #{dependency['type']} #{dependency['name']}", MU::ERR, details: [ resource['name'] => dependency, sibling['name'] => sib_dep ]
@@ -1238,7 +1254,7 @@ module MU
1238
1254
  "port" => db["port"],
1239
1255
  "sgs" => [cfg_name+server['name']]
1240
1256
  }
1241
- MU::Config.addDependency(ruleset, cfg_name+server['name'], "firewall_rule", no_create_wait: true)
1257
+ MU::Config.addDependency(ruleset, cfg_name+server['name'], "firewall_rule", my_phase: "groom")
1242
1258
  end
1243
1259
  }
1244
1260
  }
@@ -341,7 +341,7 @@ module MU
341
341
  "region" => db['region'],
342
342
  "credentials" => db['credentials'],
343
343
  }
344
- MU::Config.addDependency(replica, db["name"], "database", phase: "groom")
344
+ MU::Config.addDependency(replica, db["name"], "database", their_phase: "groom")
345
345
  read_replicas << replica
346
346
  end
347
347
  end
@@ -367,7 +367,7 @@ module MU
367
367
  "type" => "databases"
368
368
  }
369
369
  # AWS will figure out for us which database instance is the writer/master so we can create all of them concurrently.
370
- MU::Config.addDependency(node, db["name"], "database", phase: "groom")
370
+ MU::Config.addDependency(node, db["name"], "database", their_phase: "groom")
371
371
  cluster_nodes << node
372
372
 
373
373
  # Alarms are set on each DB cluster node, not on the cluster itself,
@@ -119,7 +119,7 @@ module MU
119
119
  if acl_include['sgs']
120
120
  acl_include['sgs'].each { |sg_ref|
121
121
  if haveLitterMate?(sg_ref, "firewall_rules")
122
- MU::Config.addDependency(acl, sg_ref, "firewall_rule", no_create_wait: true)
122
+ MU::Config.addDependency(acl, sg_ref, "firewall_rule", my_phase: "groom")
123
123
  siblingfw = haveLitterMate?(sg_ref, "firewall_rules")
124
124
  if !siblingfw["#MU_VALIDATED"]
125
125
  # XXX raise failure somehow
@@ -310,7 +310,7 @@ module MU
310
310
  return @obj
311
311
  end
312
312
 
313
- if mommacat and !caller.grep(/`findLitterMate'/) # XXX the dumbest
313
+ if mommacat and caller.grep(/`findLitterMate'/).empty? # XXX the dumbest
314
314
  MU.log "Looking for #{@type} #{@name} #{@id} in deploy #{mommacat.deploy_id}", loglevel
315
315
  begin
316
316
  @obj = mommacat.findLitterMate(type: @type, name: @name, cloud_id: @id, credentials: @credentials, debug: debug)
@@ -365,7 +365,7 @@ end
365
365
  region: @region,
366
366
  habitats: hab_arg,
367
367
  credentials: @credentials,
368
- dummy_ok: (["habitats", "folders", "users", "groups", "vpcs"].include?(@type))
368
+ dummy_ok: (["habitats", "folders", "users", "groups", "vpcs"].include?(@type) or @id)
369
369
  }
370
370
 
371
371
  found = MU::MommaCat.findStray(
@@ -377,7 +377,7 @@ end
377
377
  region: @region,
378
378
  habitats: hab_arg,
379
379
  credentials: @credentials,
380
- dummy_ok: (["habitats", "folders", "users", "groups", "vpcs"].include?(@type))
380
+ dummy_ok: (["habitats", "folders", "users", "groups", "vpcs"].include?(@type) or @id)
381
381
  )
382
382
  MU.log "Ref#kitten results from findStray", loglevel, details: found
383
383
  @obj ||= found.first if found
@@ -185,15 +185,24 @@ module MU
185
185
  "type" => "string",
186
186
  "enum" => MU::Cloud.resource_types.values.map { |v| v[:cfg_name] }
187
187
  },
188
- "phase" => {
188
+ "my_phase" => {
189
+ "type" => "string",
190
+ "description" => "Which part of our creation process should be waiting?",
191
+ "enum" => ["create", "groom"]
192
+ },
193
+ "their_phase" => {
189
194
  "type" => "string",
190
195
  "description" => "Which part of the creation process of the resource we depend on should we wait for before starting our own creation? Defaults are usually sensible, but sometimes you want, say, a Server to wait on another Server to be completely ready (through its groom phase) before starting up.",
191
196
  "enum" => ["create", "groom"]
192
197
  },
198
+ "phase" => {
199
+ "type" => "string",
200
+ "description" => "Alias for {their_phase}",
201
+ "enum" => ["create", "groom"]
202
+ },
193
203
  "no_create_wait" => {
194
204
  "type" => "boolean",
195
- "default" => false,
196
- "description" => "By default, it's assumed that we want to wait on our parents' creation phase, in addition to whatever is declared in this stanza. Setting this flag will bypass waiting on our parent resource's creation, so that our create or groom phase can instead depend only on the parent's groom phase. "
205
+ "description" => "DEPRECATED- setting +true+ is the same as setting {my_phase} to +groom+; setting to +false+ is the same as setting {my_phase} to +create+. If both +no_create_wait+ and {my_phase} are specified, {my_phase} takes precedence."
197
206
  }
198
207
  }
199
208
  }
@@ -386,8 +386,7 @@ module MU
386
386
  },
387
387
  "associate_public_ip" => {
388
388
  "type" => "boolean",
389
- "default" => false,
390
- "description" => "Associate public IP address?"
389
+ "description" => "Whether to associate a public IP address with this server. Default behavior is to align with resident VPC/subnet, which to say +true+ if the subnet is publicly routable, +false+ if not. For non-VPC instances (AWS Classic), we default to +true+."
391
390
  },
392
391
  "userdata_script" => userdata_primitive,
393
392
  "windows_admin_username" => {
@@ -649,15 +648,22 @@ module MU
649
648
  server["vpc"]["subnet_pref"] = "public"
650
649
  end
651
650
 
651
+ if server["associate_public_ip"].nil?
652
+ server["associate_public_ip"] = server["vpc"]["subnet_pref"] == "public" ? true : false
653
+
654
+ end
655
+
652
656
  if !server["vpc"]["subnet_name"].nil? and configurator.nat_routes.has_key?(server["vpc"]["subnet_name"]) and !configurator.nat_routes[server["vpc"]["subnet_name"]].empty?
653
- MU::Config.addDependency(server, configurator.nat_routes[server["vpc"]["subnet_name"]], "server", phase: "groom", no_create_wait: true)
657
+ MU::Config.addDependency(server, configurator.nat_routes[server["vpc"]["subnet_name"]], "server", their_phase: "groom", my_phase: "groom")
654
658
  elsif !server["vpc"]["name"].nil?
655
659
  siblingvpc = configurator.haveLitterMate?(server["vpc"]["name"], "vpcs")
656
660
  if siblingvpc and siblingvpc['bastion'] and
657
661
  server['name'] != siblingvpc['bastion']['name']
658
- MU::Config.addDependency(server, siblingvpc['bastion']['name'], "server", phase: "groom", no_create_wait: true)
662
+ MU::Config.addDependency(server, siblingvpc['bastion']['name'], "server", their_phase: "groom", my_phase: "groom")
659
663
  end
660
664
  end
665
+ else
666
+ server["associate_public_ip"] ||= false
661
667
  end
662
668
 
663
669
  ok
@@ -186,7 +186,7 @@ module MU
186
186
 
187
187
  if !pool["vpc"].nil?
188
188
  if !pool["vpc"]["subnet_name"].nil? and configurator.nat_routes.has_key?(pool["vpc"]["subnet_name"])
189
- MU::Config.addDependency(pool, configurator.nat_routes[pool["vpc"]["subnet_name"]], "server", phase: "groom", no_create_wait: true)
189
+ MU::Config.addDependency(pool, configurator.nat_routes[pool["vpc"]["subnet_name"]], "server", their_phase: "groom", my_phase: "groom")
190
190
  end
191
191
  end
192
192
  # TODO make sure this is handled... somewhere
@@ -199,7 +199,7 @@ module MU
199
199
  # }
200
200
  # end
201
201
  if pool["basis"] and pool["basis"]["server"]
202
- MU::Config.addDependency(pool, pool["basis"]["server"], "server", phase: "groom")
202
+ MU::Config.addDependency(pool, pool["basis"]["server"], "server", their_phase: "groom")
203
203
  end
204
204
  if !pool['static_ip'].nil? and !pool['ip'].nil?
205
205
  ok = false
@@ -540,7 +540,7 @@ module MU
540
540
  end
541
541
  end
542
542
 
543
- # Feeling that, generate a generic bastion/NAT host to do the job.
543
+ # Failing that, generate a generic bastion/NAT host to do the job.
544
544
  # Clouds that don't have some kind of native NAT gateway can also
545
545
  # leverage this host to honor "gateway" => "#NAT" situations.
546
546
  if !can_peer and !already_peered and have_public and vpc["create_bastion"]
@@ -563,13 +563,13 @@ module MU
563
563
  "name" => vpc["name"],
564
564
  "subnet_pref" => "public"
565
565
  }
566
- MU::Config.addDependency(vpc, bastion['name'], "server", no_create_wait: true)
567
- vpc["bastion"] = MU::Config::Ref.get(
568
- name: bastion['name'],
569
- cloud: vpc['cloud'],
570
- credentials: vpc['credentials'],
571
- type: "servers"
572
- )
566
+ # MU::Config.addDependency(vpc, bastion['name'], "server", my_phase: "groom")
567
+ # vpc["bastion"] = MU::Config::Ref.get(
568
+ # name: bastion['name'],
569
+ # cloud: vpc['cloud'],
570
+ # credentials: vpc['credentials'],
571
+ # type: "servers"
572
+ # )
573
573
 
574
574
  ok = false if !configurator.insertKitten(bastion, "servers", true)
575
575
  end
@@ -615,11 +615,11 @@ module MU
615
615
  append_me = { "vpc" => peer["vpc"].dup }
616
616
  append_me['vpc']['name'] = sib['name']
617
617
  append << append_me
618
- MU::Config.addDependency(vpc, sib['name'], "vpc", phase: "groom", no_create_wait: true)
618
+ MU::Config.addDependency(vpc, sib['name'], "vpc", their_phase: "create", my_phase: "groom")
619
619
  end
620
620
  delete << peer
621
621
  else
622
- MU::Config.addDependency(vpc, peer['vpc']['name'], "vpc", phase: "groom", no_create_wait: true)
622
+ MU::Config.addDependency(vpc, peer['vpc']['name'], "vpc", their_phase: "create", my_phase: "groom")
623
623
  end
624
624
  delete << peer if sib['name'] == vpc['name']
625
625
  }
@@ -1,55 +1,55 @@
1
1
  ---
2
2
  rhel71: &5
3
- us-east-1: ami-0f05fce24aa75ba9f
4
- ap-northeast-1: ami-0c0ec19eb19055763
5
- ap-northeast-2: ami-0717ac5c67c99f745
6
- ap-south-1: ami-03454a4bef3ec6a9a
7
- ap-southeast-1: ami-0f3aa03320c0f6524
8
- ap-southeast-2: ami-0aa5e6888260cdb3c
9
- ca-central-1: ami-03e72964d7646b689
10
- eu-central-1: ami-02df259ca785eff54
11
- eu-north-1: ami-05253c445bdf7777d
12
- eu-west-1: ami-0c21c559f6d0f2401
13
- eu-west-2: ami-057c8d4259087594f
14
- eu-west-3: ami-05a428dc7a7f4ba46
15
- sa-east-1: ami-0a1d1cf6a89a2db56
16
- us-east-2: ami-02f6682c7816b3cfc
17
- us-west-1: ami-04898e596c06e802b
18
- us-west-2: ami-02db5457189a8a8c2
3
+ us-east-1: ami-0c834836b3bd45e2f
4
+ ap-northeast-1: ami-036bb589253fe929e
5
+ ap-northeast-2: ami-0e39b4957dbc7e14d
6
+ ap-south-1: ami-0cd0554d9a05dddc9
7
+ ap-southeast-1: ami-0bae2684e9ed09b8b
8
+ ap-southeast-2: ami-0711ccf93abe3989b
9
+ ca-central-1: ami-0d75d90f73e417c25
10
+ eu-central-1: ami-0cae3cb53b9bbd783
11
+ eu-north-1: ami-0cd30fe8547a809f7
12
+ eu-west-1: ami-01441cca97c35eb0e
13
+ eu-west-2: ami-051aaf1b532b3e6bc
14
+ eu-west-3: ami-09a7af6793a3e8d09
15
+ sa-east-1: ami-0c4064cfe711311d5
16
+ us-east-2: ami-0124fd8917f59f8ce
17
+ us-west-1: ami-00457c55541605cb4
18
+ us-west-2: ami-02211d4e254a9e10f
19
19
  centos6: &4
20
- us-east-1: ami-009723c5c7f8fbc75
21
- us-east-2: ami-0781f11395714cd39
22
- ap-northeast-1: ami-07fa5a8795da2b6bc
23
- ap-northeast-2: ami-0219f0a7c979ff63f
24
- ap-south-1: ami-0f24817242c401740
25
- ap-southeast-1: ami-042ef2e0643e8e207
26
- ap-southeast-2: ami-09fc51de648afa168
27
- ca-central-1: ami-0dc643db74edc5aa5
28
- eu-central-1: ami-0628759cb297569d5
29
- eu-north-1: ami-0aed023791f886315
30
- eu-west-1: ami-0f87f0f252ff03622
31
- eu-west-2: ami-00abb555d5a460afe
32
- eu-west-3: ami-0ccd93d454c2418a2
33
- sa-east-1: ami-01e10ea6ea72534ae
34
- us-west-1: ami-01fee56b9ee690ffe
35
- us-west-2: ami-08bcdb944f185e2a8
20
+ us-east-1: ami-0ac9258984ed4bb4a
21
+ us-east-2: ami-09888b2b4484f774a
22
+ us-west-1: ami-04e7e499cdb873bfa
23
+ us-west-2: ami-0fcd16e6cf3c4b100
24
+ ap-northeast-1: ami-098052d1926fd4297
25
+ ap-northeast-2: ami-0319e58869a7b5bf2
26
+ ap-south-1: ami-0d19f7ad27c77cbf6
27
+ ap-southeast-1: ami-04b6b2013a296075c
28
+ ap-southeast-2: ami-07f02efb410df7e1d
29
+ ca-central-1: ami-0e7cc87df5666a78c
30
+ eu-central-1: ami-0cc33b333c7b7acd6
31
+ eu-north-1: ami-0bc09b1d6b4f351ea
32
+ eu-west-1: ami-08a7f444dba463099
33
+ eu-west-2: ami-0e84e5ba9694be11b
34
+ eu-west-3: ami-08e28291804571999
35
+ sa-east-1: ami-0b447e11308862517
36
36
  centos7:
37
- us-east-1: ami-067256ca1497c924d
38
- ap-northeast-1: ami-07c1e51354fdfd362
39
- ap-northeast-2: ami-042b761c93d6df2f1
40
- ap-south-1: ami-02e879f52322e7c98
41
- ap-southeast-1: ami-0487e9f84d0ffde89
42
- ap-southeast-2: ami-0e854dab39fd6a427
43
- ca-central-1: ami-05a27d311b585a70b
44
- eu-central-1: ami-0e396d00c787b4f47
45
- eu-north-1: ami-087763a2ba60b2bfe
46
- eu-west-1: ami-04e3bd9335a14e635
47
- eu-west-2: ami-0efd34a8d1fc2b104
48
- eu-west-3: ami-08d0bcbc780448cf8
49
- sa-east-1: ami-0284f4a0968263cf0
50
- us-east-2: ami-0292786917d1e3015
51
- us-west-1: ami-0ba622529dcdff2bb
52
- us-west-2: ami-079a309ca6261d7f6
37
+ us-east-1: ami-08d24209f345a21ab
38
+ ap-northeast-1: ami-001cfcb3548768288
39
+ ap-northeast-2: ami-0a2f6ec79ed710bf7
40
+ ap-south-1: ami-05e0c30fc8b2a21a2
41
+ ap-southeast-1: ami-0b28f5573dd4aa62a
42
+ ap-southeast-2: ami-026419375863852b7
43
+ ca-central-1: ami-01e799689fa5c1f31
44
+ eu-central-1: ami-0ded33da6c28082d8
45
+ eu-north-1: ami-02c7692e69b06afc5
46
+ eu-west-1: ami-086619450a959a101
47
+ eu-west-2: ami-05db24096d56207f6
48
+ eu-west-3: ami-03ea610526da7c2f3
49
+ sa-east-1: ami-0029cb6ee83a799ca
50
+ us-east-2: ami-065847253b2d4acab
51
+ us-west-1: ami-0ea3494c08412920e
52
+ us-west-2: ami-055ce4c70b0ceabcb
53
53
  ubuntu16: &3
54
54
  us-east-1: ami-bcdc16c6
55
55
  us-west-1: ami-1b17257b
@@ -73,56 +73,56 @@ ubuntu14:
73
73
  ap-southeast-1: ami-2855964b
74
74
  ap-southeast-2: ami-d19fc4b2
75
75
  win2k12r2: &1
76
- us-east-1: ami-003aea65bc2e7136a
77
- us-east-2: ami-0163293e39ba504c2
78
- ca-central-1: ami-055689dd92f29d2aa
79
- us-west-2: ami-0ce87dda2c9244e57
80
- us-west-1: ami-00d9cf64bd2fafa44
81
- eu-west-1: ami-026d7427b9fadad40
82
- eu-west-2: ami-036a22c0780551794
83
- eu-west-3: ami-05e3d9b79bdc10861
84
- eu-north-1: ami-063eb48504c7d73f1
85
- sa-east-1: ami-0a8c1829a5e650bc5
86
- eu-central-1: ami-0ea20cef52335b008
87
- ap-northeast-1: ami-08db2dc67228dbb90
88
- ap-south-1: ami-012241411db3f09c3
89
- ap-northeast-2: ami-0368c224de1d20502
90
- ap-southeast-1: ami-028ef74e1edc3943a
91
- ap-southeast-2: ami-09e03eab1b1bc151b
76
+ us-east-1: ami-0d28b9a40ed446e35
77
+ us-east-2: ami-010d247b7ee850d55
78
+ ca-central-1: ami-0c223858875f62d11
79
+ us-west-2: ami-01d188c5c06078fee
80
+ us-west-1: ami-0dbcc051c49ec24ec
81
+ eu-west-1: ami-080c7b4d6e32bf9f3
82
+ eu-west-2: ami-01b1edb5894a54bcc
83
+ eu-west-3: ami-09445cdc7a2acb1c0
84
+ eu-north-1: ami-0093cc63496e435df
85
+ sa-east-1: ami-04d015c8b371ba7b3
86
+ eu-central-1: ami-04d6144bcbb029141
87
+ ap-northeast-1: ami-07fad72f121aa157c
88
+ ap-south-1: ami-0b3241fd09b1ce87f
89
+ ap-northeast-2: ami-0ba7cd822e36dc0df
90
+ ap-southeast-1: ami-0648522a4cb50953c
91
+ ap-southeast-2: ami-0fc0bd73cd61a970f
92
92
  win2k16: &2
93
- us-east-1: ami-02801a2c8dcbfb883
94
- us-east-2: ami-0ca4f779a2a58a7ea
95
- ca-central-1: ami-05d3854d9d6e9bcc5
96
- us-west-2: ami-091f4a88ce32d28b6
97
- eu-west-1: ami-0b938c9b23ed7d18c
98
- us-west-1: ami-0fd744c3fbe8260f2
99
- eu-west-2: ami-071a89b959c5eda27
100
- eu-west-3: ami-0b206e3dbda9ff9eb
101
- eu-central-1: ami-0dd9bdad31dd0d3ce
102
- sa-east-1: ami-0d69b8d6c0f9a7bae
103
- ap-northeast-1: ami-02eb4a6f519bc3190
104
- ap-south-1: ami-0666fd543ac8b5501
105
- ap-northeast-2: ami-01277c81f9b91cf77
106
- ap-southeast-2: ami-0426a246f9b0ccadd
107
- ap-southeast-1: ami-07ecb0d55c2eb7247
108
- eu-north-1: ami-047811530583b6d08
93
+ us-east-1: ami-018151f8c8339a093
94
+ us-east-2: ami-09e045936c7d9ecd5
95
+ ca-central-1: ami-0a16abf0f1c35667a
96
+ us-west-2: ami-00d4216f80a82894d
97
+ eu-west-1: ami-07afc1525928ccad7
98
+ us-west-1: ami-0d2f7d4198b79a625
99
+ eu-west-2: ami-04eb62f17efc84a37
100
+ eu-west-3: ami-0b4affcd5848cf50c
101
+ eu-central-1: ami-0a92ae047ebc7a3da
102
+ sa-east-1: ami-0cc9a87c95fb37832
103
+ ap-northeast-1: ami-014c730050acef11d
104
+ ap-south-1: ami-0c3c8739263aa4844
105
+ ap-northeast-2: ami-0018a05eb15503b5e
106
+ ap-southeast-2: ami-0b50bfbb507285a89
107
+ ap-southeast-1: ami-073c677bcf225774a
108
+ eu-north-1: ami-09bb6d618593f2e7f
109
109
  win2k19:
110
- us-east-1: ami-00820419bf212df7e
111
- us-east-2: ami-0a7916b90aa4629d5
112
- ca-central-1: ami-0d704529661e19185
113
- us-west-2: ami-0ee6a198d7ac35eb1
114
- eu-west-2: ami-0f6ac1634bd7add92
115
- us-west-1: ami-039e3816b4cac1e27
116
- eu-west-1: ami-03a771d99091199b7
117
- eu-central-1: ami-03b648d5b45f51a4f
118
- eu-west-3: ami-068839907c18c3a6e
119
- eu-north-1: ami-0db851ee76f7deefb
120
- sa-east-1: ami-0c2cc60c62159f87c
121
- ap-northeast-2: ami-06bdf8ae9ae9add92
122
- ap-northeast-1: ami-02306d959c7f175b9
123
- ap-southeast-1: ami-0d5b4a3d73e0f471f
124
- ap-southeast-2: ami-00fa88caff4f64937
125
- ap-south-1: ami-0b44feae4bb9f497a
110
+ us-east-1: ami-09c18c34c341f2b6a
111
+ us-east-2: ami-030371d5ee8881350
112
+ ca-central-1: ami-018e5bf45c30fa58f
113
+ us-west-2: ami-07d1e5c4f906877e1
114
+ eu-west-2: ami-0b9d95fef44aa7c11
115
+ us-west-1: ami-0e7e082d6fa1769f3
116
+ eu-west-1: ami-05573fafa080144b6
117
+ eu-central-1: ami-0122b027c265988ea
118
+ eu-west-3: ami-0ba7c0a3dc4148b6a
119
+ eu-north-1: ami-03d8c3307f72f9847
120
+ sa-east-1: ami-0d0f66c3e0dfc09ee
121
+ ap-northeast-2: ami-07eff56de9293ab16
122
+ ap-northeast-1: ami-020fb790a3bed4cda
123
+ ap-southeast-1: ami-0b5d036d6d711a4c8
124
+ ap-southeast-2: ami-0fff96935fef7bf60
125
+ ap-south-1: ami-030ec249497f66a33
126
126
  amazon:
127
127
  us-east-1: ami-b73b63a0
128
128
  us-east-2: ami-58277d3d