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.
- checksums.yaml +4 -4
- data/ansible/roles/mu-nat/tasks/main.yml +3 -0
- data/bin/mu-aws-setup +41 -7
- data/bin/mu-azure-setup +36 -2
- data/bin/mu-configure +214 -119
- data/bin/mu-gcp-setup +37 -2
- data/bin/mu-node-manage +3 -0
- data/bin/mu-refresh-ssl +67 -0
- data/bin/mu-run-tests +14 -4
- data/bin/mu-self-update +30 -10
- data/bin/mu-upload-chef-artifacts +30 -26
- data/cloud-mu.gemspec +9 -7
- data/cookbooks/mu-master/attributes/default.rb +5 -1
- data/cookbooks/mu-master/metadata.rb +2 -2
- data/cookbooks/mu-master/recipes/default.rb +81 -26
- data/cookbooks/mu-master/recipes/init.rb +197 -62
- data/cookbooks/mu-master/recipes/update_nagios_only.rb +1 -1
- data/cookbooks/mu-master/recipes/vault.rb +78 -77
- data/cookbooks/mu-master/templates/default/mods/rewrite.conf.erb +1 -0
- data/cookbooks/mu-master/templates/default/nagios.conf.erb +103 -0
- data/cookbooks/mu-master/templates/default/web_app.conf.erb +14 -30
- data/cookbooks/mu-tools/attributes/default.rb +12 -0
- data/cookbooks/mu-tools/files/centos-6/CentOS-Base.repo +47 -0
- data/cookbooks/mu-tools/libraries/helper.rb +98 -4
- data/cookbooks/mu-tools/libraries/monkey.rb +1 -1
- data/cookbooks/mu-tools/recipes/apply_security.rb +31 -9
- data/cookbooks/mu-tools/recipes/aws_api.rb +8 -2
- data/cookbooks/mu-tools/recipes/base_repositories.rb +1 -1
- data/cookbooks/mu-tools/recipes/gcloud.rb +2 -9
- data/cookbooks/mu-tools/recipes/google_api.rb +7 -0
- data/cookbooks/mu-tools/recipes/rsyslog.rb +8 -1
- data/cookbooks/mu-tools/resources/disk.rb +113 -42
- data/cookbooks/mu-tools/resources/mommacat_request.rb +1 -2
- data/cookbooks/mu-tools/templates/centos-8/sshd_config.erb +215 -0
- data/extras/Gemfile.lock.bootstrap +394 -0
- data/extras/bucketstubs/error.html +0 -0
- data/extras/bucketstubs/index.html +0 -0
- data/extras/clean-stock-amis +11 -3
- data/extras/generate-stock-images +6 -3
- data/extras/git_rpm/build.sh +20 -0
- data/extras/git_rpm/mugit.spec +53 -0
- data/extras/image-generators/AWS/centos7.yaml +19 -16
- data/extras/image-generators/AWS/{rhel7.yaml → rhel71.yaml} +0 -0
- data/extras/image-generators/AWS/{win2k12.yaml → win2k12r2.yaml} +0 -0
- data/extras/image-generators/VMWare/centos8.yaml +15 -0
- data/extras/openssl_rpm/build.sh +19 -0
- data/extras/openssl_rpm/mussl.spec +46 -0
- data/extras/python_rpm/muthon.spec +14 -4
- data/extras/ruby_rpm/muby.spec +9 -5
- data/extras/sqlite_rpm/build.sh +19 -0
- data/extras/sqlite_rpm/muqlite.spec +47 -0
- data/install/installer +7 -5
- data/modules/mommacat.ru +2 -2
- data/modules/mu.rb +12 -5
- data/modules/mu/cloud/machine_images.rb +1 -1
- data/modules/mu/cloud/providers.rb +6 -1
- data/modules/mu/cloud/resource_base.rb +7 -4
- data/modules/mu/cloud/ssh_sessions.rb +5 -1
- data/modules/mu/cloud/wrappers.rb +16 -7
- data/modules/mu/config.rb +28 -12
- data/modules/mu/config/database.rb +2 -2
- data/modules/mu/config/firewall_rule.rb +1 -1
- data/modules/mu/config/ref.rb +3 -3
- data/modules/mu/config/schema_helpers.rb +12 -3
- data/modules/mu/config/server.rb +10 -4
- data/modules/mu/config/server_pool.rb +2 -2
- data/modules/mu/config/vpc.rb +10 -10
- data/modules/mu/defaults/AWS.yaml +96 -96
- data/modules/mu/deploy.rb +27 -14
- data/modules/mu/groomers/chef.rb +2 -2
- data/modules/mu/master.rb +49 -3
- data/modules/mu/mommacat.rb +27 -9
- data/modules/mu/mommacat/naming.rb +2 -2
- data/modules/mu/mommacat/search.rb +16 -5
- data/modules/mu/mommacat/storage.rb +67 -32
- data/modules/mu/providers/aws.rb +185 -71
- data/modules/mu/providers/aws/alarm.rb +3 -3
- data/modules/mu/providers/aws/bucket.rb +19 -19
- data/modules/mu/providers/aws/cache_cluster.rb +22 -22
- data/modules/mu/providers/aws/cdn.rb +2 -2
- data/modules/mu/providers/aws/collection.rb +14 -14
- data/modules/mu/providers/aws/container_cluster.rb +27 -27
- data/modules/mu/providers/aws/database.rb +49 -45
- data/modules/mu/providers/aws/dnszone.rb +5 -5
- data/modules/mu/providers/aws/endpoint.rb +35 -35
- data/modules/mu/providers/aws/firewall_rule.rb +26 -23
- data/modules/mu/providers/aws/function.rb +35 -32
- data/modules/mu/providers/aws/group.rb +7 -7
- data/modules/mu/providers/aws/habitat.rb +2 -2
- data/modules/mu/providers/aws/job.rb +35 -32
- data/modules/mu/providers/aws/loadbalancer.rb +58 -37
- data/modules/mu/providers/aws/log.rb +14 -14
- data/modules/mu/providers/aws/msg_queue.rb +10 -10
- data/modules/mu/providers/aws/nosqldb.rb +8 -8
- data/modules/mu/providers/aws/notifier.rb +7 -7
- data/modules/mu/providers/aws/role.rb +69 -47
- data/modules/mu/providers/aws/search_domain.rb +10 -10
- data/modules/mu/providers/aws/server.rb +198 -110
- data/modules/mu/providers/aws/server_pool.rb +71 -119
- data/modules/mu/providers/aws/storage_pool.rb +17 -9
- data/modules/mu/providers/aws/user.rb +1 -1
- data/modules/mu/providers/aws/vpc.rb +106 -51
- data/modules/mu/providers/aws/vpc_subnet.rb +43 -39
- data/modules/mu/providers/azure.rb +82 -16
- data/modules/mu/providers/azure/server.rb +18 -3
- data/modules/mu/providers/cloudformation/server.rb +1 -1
- data/modules/mu/providers/google.rb +20 -5
- data/modules/mu/providers/google/folder.rb +6 -2
- data/modules/mu/providers/google/function.rb +65 -30
- data/modules/mu/providers/google/role.rb +2 -1
- data/modules/mu/providers/google/vpc.rb +27 -2
- data/modules/tests/aws-servers-with-handrolled-iam.yaml +37 -0
- data/modules/tests/k8s.yaml +1 -1
- metadata +32 -15
|
@@ -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
|
-
|
|
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"]}
|
|
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
|
-
|
|
752
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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,
|
|
441
|
-
if ![nil, "create", "groom"].include?(
|
|
442
|
-
raise MuError, "Invalid
|
|
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["
|
|
450
|
-
dep["
|
|
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["
|
|
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",
|
|
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['
|
|
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['
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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
|
data/modules/mu/config/ref.rb
CHANGED
|
@@ -310,7 +310,7 @@ module MU
|
|
|
310
310
|
return @obj
|
|
311
311
|
end
|
|
312
312
|
|
|
313
|
-
if mommacat and
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
}
|
data/modules/mu/config/server.rb
CHANGED
|
@@ -386,8 +386,7 @@ module MU
|
|
|
386
386
|
},
|
|
387
387
|
"associate_public_ip" => {
|
|
388
388
|
"type" => "boolean",
|
|
389
|
-
"
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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
|
data/modules/mu/config/vpc.rb
CHANGED
|
@@ -540,7 +540,7 @@ module MU
|
|
|
540
540
|
end
|
|
541
541
|
end
|
|
542
542
|
|
|
543
|
-
#
|
|
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",
|
|
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",
|
|
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",
|
|
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-
|
|
4
|
-
ap-northeast-1: ami-
|
|
5
|
-
ap-northeast-2: ami-
|
|
6
|
-
ap-south-1: ami-
|
|
7
|
-
ap-southeast-1: ami-
|
|
8
|
-
ap-southeast-2: ami-
|
|
9
|
-
ca-central-1: ami-
|
|
10
|
-
eu-central-1: ami-
|
|
11
|
-
eu-north-1: ami-
|
|
12
|
-
eu-west-1: ami-
|
|
13
|
-
eu-west-2: ami-
|
|
14
|
-
eu-west-3: ami-
|
|
15
|
-
sa-east-1: ami-
|
|
16
|
-
us-east-2: ami-
|
|
17
|
-
us-west-1: ami-
|
|
18
|
-
us-west-2: ami-
|
|
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-
|
|
21
|
-
us-east-2: ami-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ap-
|
|
25
|
-
ap-
|
|
26
|
-
ap-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
eu-
|
|
31
|
-
eu-
|
|
32
|
-
eu-west-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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-
|
|
38
|
-
ap-northeast-1: ami-
|
|
39
|
-
ap-northeast-2: ami-
|
|
40
|
-
ap-south-1: ami-
|
|
41
|
-
ap-southeast-1: ami-
|
|
42
|
-
ap-southeast-2: ami-
|
|
43
|
-
ca-central-1: ami-
|
|
44
|
-
eu-central-1: ami-
|
|
45
|
-
eu-north-1: ami-
|
|
46
|
-
eu-west-1: ami-
|
|
47
|
-
eu-west-2: ami-
|
|
48
|
-
eu-west-3: ami-
|
|
49
|
-
sa-east-1: ami-
|
|
50
|
-
us-east-2: ami-
|
|
51
|
-
us-west-1: ami-
|
|
52
|
-
us-west-2: ami-
|
|
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-
|
|
77
|
-
us-east-2: ami-
|
|
78
|
-
ca-central-1: ami-
|
|
79
|
-
us-west-2: ami-
|
|
80
|
-
us-west-1: ami-
|
|
81
|
-
eu-west-1: ami-
|
|
82
|
-
eu-west-2: ami-
|
|
83
|
-
eu-west-3: ami-
|
|
84
|
-
eu-north-1: ami-
|
|
85
|
-
sa-east-1: ami-
|
|
86
|
-
eu-central-1: ami-
|
|
87
|
-
ap-northeast-1: ami-
|
|
88
|
-
ap-south-1: ami-
|
|
89
|
-
ap-northeast-2: ami-
|
|
90
|
-
ap-southeast-1: ami-
|
|
91
|
-
ap-southeast-2: ami-
|
|
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-
|
|
94
|
-
us-east-2: ami-
|
|
95
|
-
ca-central-1: ami-
|
|
96
|
-
us-west-2: ami-
|
|
97
|
-
eu-west-1: ami-
|
|
98
|
-
us-west-1: ami-
|
|
99
|
-
eu-west-2: ami-
|
|
100
|
-
eu-west-3: ami-
|
|
101
|
-
eu-central-1: ami-
|
|
102
|
-
sa-east-1: ami-
|
|
103
|
-
ap-northeast-1: ami-
|
|
104
|
-
ap-south-1: ami-
|
|
105
|
-
ap-northeast-2: ami-
|
|
106
|
-
ap-southeast-2: ami-
|
|
107
|
-
ap-southeast-1: ami-
|
|
108
|
-
eu-north-1: ami-
|
|
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-
|
|
111
|
-
us-east-2: ami-
|
|
112
|
-
ca-central-1: ami-
|
|
113
|
-
us-west-2: ami-
|
|
114
|
-
eu-west-2: ami-
|
|
115
|
-
us-west-1: ami-
|
|
116
|
-
eu-west-1: ami-
|
|
117
|
-
eu-central-1: ami-
|
|
118
|
-
eu-west-3: ami-
|
|
119
|
-
eu-north-1: ami-
|
|
120
|
-
sa-east-1: ami-
|
|
121
|
-
ap-northeast-2: ami-
|
|
122
|
-
ap-northeast-1: ami-
|
|
123
|
-
ap-southeast-1: ami-
|
|
124
|
-
ap-southeast-2: ami-
|
|
125
|
-
ap-south-1: ami-
|
|
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
|