cloud-mu 3.2.0 → 3.5.0
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/Dockerfile +1 -1
- data/ansible/roles/mu-nat/tasks/main.yml +3 -0
- data/bin/mu-adopt +12 -1
- data/bin/mu-aws-setup +41 -7
- data/bin/mu-azure-setup +34 -0
- data/bin/mu-configure +214 -119
- data/bin/mu-gcp-setup +37 -2
- data/bin/mu-load-config.rb +2 -1
- data/bin/mu-node-manage +3 -0
- data/bin/mu-refresh-ssl +67 -0
- data/bin/mu-run-tests +28 -6
- data/bin/mu-self-update +30 -10
- data/bin/mu-upload-chef-artifacts +30 -26
- data/cloud-mu.gemspec +10 -8
- 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 +14 -7
- data/modules/mu/adoption.rb +5 -5
- data/modules/mu/cleanup.rb +47 -25
- data/modules/mu/cloud.rb +29 -1
- data/modules/mu/cloud/dnszone.rb +0 -2
- data/modules/mu/cloud/machine_images.rb +1 -1
- data/modules/mu/cloud/providers.rb +6 -1
- data/modules/mu/cloud/resource_base.rb +16 -7
- data/modules/mu/cloud/ssh_sessions.rb +5 -1
- data/modules/mu/cloud/wrappers.rb +20 -7
- data/modules/mu/config.rb +28 -12
- data/modules/mu/config/bucket.rb +31 -2
- data/modules/mu/config/cache_cluster.rb +1 -1
- data/modules/mu/config/cdn.rb +100 -0
- data/modules/mu/config/container_cluster.rb +1 -1
- data/modules/mu/config/database.rb +3 -3
- data/modules/mu/config/dnszone.rb +4 -3
- data/modules/mu/config/endpoint.rb +1 -0
- data/modules/mu/config/firewall_rule.rb +1 -1
- data/modules/mu/config/function.rb +16 -7
- data/modules/mu/config/job.rb +89 -0
- data/modules/mu/config/notifier.rb +7 -18
- data/modules/mu/config/ref.rb +55 -9
- data/modules/mu/config/schema_helpers.rb +12 -3
- data/modules/mu/config/server.rb +11 -5
- data/modules/mu/config/server_pool.rb +2 -2
- data/modules/mu/config/vpc.rb +11 -10
- data/modules/mu/defaults/AWS.yaml +106 -106
- data/modules/mu/deploy.rb +40 -14
- data/modules/mu/groomers/chef.rb +2 -2
- data/modules/mu/master.rb +70 -3
- data/modules/mu/mommacat.rb +28 -9
- data/modules/mu/mommacat/daemon.rb +13 -7
- 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 +298 -85
- data/modules/mu/providers/aws/alarm.rb +5 -5
- data/modules/mu/providers/aws/bucket.rb +284 -50
- data/modules/mu/providers/aws/cache_cluster.rb +26 -26
- data/modules/mu/providers/aws/cdn.rb +782 -0
- data/modules/mu/providers/aws/collection.rb +16 -16
- data/modules/mu/providers/aws/container_cluster.rb +84 -64
- data/modules/mu/providers/aws/database.rb +59 -55
- data/modules/mu/providers/aws/dnszone.rb +29 -12
- data/modules/mu/providers/aws/endpoint.rb +535 -50
- data/modules/mu/providers/aws/firewall_rule.rb +32 -26
- data/modules/mu/providers/aws/folder.rb +1 -1
- data/modules/mu/providers/aws/function.rb +300 -134
- data/modules/mu/providers/aws/group.rb +16 -14
- data/modules/mu/providers/aws/habitat.rb +4 -4
- data/modules/mu/providers/aws/job.rb +469 -0
- data/modules/mu/providers/aws/loadbalancer.rb +67 -45
- data/modules/mu/providers/aws/log.rb +17 -17
- data/modules/mu/providers/aws/msg_queue.rb +22 -13
- data/modules/mu/providers/aws/nosqldb.rb +99 -8
- data/modules/mu/providers/aws/notifier.rb +137 -65
- data/modules/mu/providers/aws/role.rb +119 -83
- data/modules/mu/providers/aws/search_domain.rb +166 -30
- data/modules/mu/providers/aws/server.rb +209 -118
- data/modules/mu/providers/aws/server_pool.rb +95 -130
- data/modules/mu/providers/aws/storage_pool.rb +19 -11
- data/modules/mu/providers/aws/user.rb +5 -5
- data/modules/mu/providers/aws/userdata/linux.erb +5 -4
- data/modules/mu/providers/aws/vpc.rb +109 -54
- data/modules/mu/providers/aws/vpc_subnet.rb +43 -39
- data/modules/mu/providers/azure.rb +78 -12
- data/modules/mu/providers/azure/server.rb +20 -4
- data/modules/mu/providers/cloudformation/server.rb +1 -1
- data/modules/mu/providers/google.rb +21 -5
- data/modules/mu/providers/google/bucket.rb +1 -1
- data/modules/mu/providers/google/container_cluster.rb +1 -1
- data/modules/mu/providers/google/database.rb +1 -1
- data/modules/mu/providers/google/firewall_rule.rb +1 -1
- data/modules/mu/providers/google/folder.rb +7 -3
- data/modules/mu/providers/google/function.rb +66 -31
- data/modules/mu/providers/google/group.rb +1 -1
- data/modules/mu/providers/google/habitat.rb +1 -1
- data/modules/mu/providers/google/loadbalancer.rb +1 -1
- data/modules/mu/providers/google/role.rb +6 -3
- data/modules/mu/providers/google/server.rb +1 -1
- data/modules/mu/providers/google/server_pool.rb +1 -1
- data/modules/mu/providers/google/user.rb +1 -1
- data/modules/mu/providers/google/vpc.rb +28 -3
- data/modules/tests/aws-jobs-functions.yaml +46 -0
- data/modules/tests/aws-servers-with-handrolled-iam.yaml +37 -0
- data/modules/tests/centos6.yaml +4 -0
- data/modules/tests/centos7.yaml +4 -0
- data/modules/tests/ecs.yaml +2 -2
- data/modules/tests/eks.yaml +1 -1
- data/modules/tests/functions/node-function/lambda_function.js +10 -0
- data/modules/tests/functions/python-function/lambda_function.py +12 -0
- data/modules/tests/k8s.yaml +1 -1
- data/modules/tests/microservice_app.yaml +288 -0
- data/modules/tests/rds.yaml +5 -5
- data/modules/tests/regrooms/rds.yaml +5 -5
- data/modules/tests/server-with-scrub-muisms.yaml +1 -1
- data/modules/tests/super_complex_bok.yml +2 -2
- data/modules/tests/super_simple_bok.yml +2 -2
- metadata +42 -17
|
@@ -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" => {
|
|
@@ -546,7 +545,7 @@ module MU
|
|
|
546
545
|
"additionalProperties" => false,
|
|
547
546
|
"description" => "Create individual server instances.",
|
|
548
547
|
"properties" => {
|
|
549
|
-
"dns_records" => MU::Config::DNSZone.records_primitive(need_target: false, default_type: "A", need_zone: true),
|
|
548
|
+
"dns_records" => MU::Config::DNSZone.records_primitive(need_target: false, default_type: "A", need_zone: true, embedded_type: "server"),
|
|
550
549
|
"bastion" => {
|
|
551
550
|
"type" => "boolean",
|
|
552
551
|
"default" => false,
|
|
@@ -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
|
@@ -417,6 +417,7 @@ module MU
|
|
|
417
417
|
using_default_cidr = false
|
|
418
418
|
if !vpc['ip_block']
|
|
419
419
|
if configurator.updating and configurator.existing_deploy and
|
|
420
|
+
configurator.existing_deploy.original_config and
|
|
420
421
|
configurator.existing_deploy.original_config['vpcs']
|
|
421
422
|
configurator.existing_deploy.original_config['vpcs'].each { |v|
|
|
422
423
|
if v['name'].to_s == vpc['name'].to_s
|
|
@@ -539,7 +540,7 @@ module MU
|
|
|
539
540
|
end
|
|
540
541
|
end
|
|
541
542
|
|
|
542
|
-
#
|
|
543
|
+
# Failing that, generate a generic bastion/NAT host to do the job.
|
|
543
544
|
# Clouds that don't have some kind of native NAT gateway can also
|
|
544
545
|
# leverage this host to honor "gateway" => "#NAT" situations.
|
|
545
546
|
if !can_peer and !already_peered and have_public and vpc["create_bastion"]
|
|
@@ -562,13 +563,13 @@ module MU
|
|
|
562
563
|
"name" => vpc["name"],
|
|
563
564
|
"subnet_pref" => "public"
|
|
564
565
|
}
|
|
565
|
-
MU::Config.addDependency(vpc, bastion['name'], "server",
|
|
566
|
-
vpc["bastion"] = MU::Config::Ref.get(
|
|
567
|
-
name: bastion['name'],
|
|
568
|
-
cloud: vpc['cloud'],
|
|
569
|
-
credentials: vpc['credentials'],
|
|
570
|
-
type: "servers"
|
|
571
|
-
)
|
|
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
|
+
# )
|
|
572
573
|
|
|
573
574
|
ok = false if !configurator.insertKitten(bastion, "servers", true)
|
|
574
575
|
end
|
|
@@ -614,11 +615,11 @@ module MU
|
|
|
614
615
|
append_me = { "vpc" => peer["vpc"].dup }
|
|
615
616
|
append_me['vpc']['name'] = sib['name']
|
|
616
617
|
append << append_me
|
|
617
|
-
MU::Config.addDependency(vpc, sib['name'], "vpc",
|
|
618
|
+
MU::Config.addDependency(vpc, sib['name'], "vpc", their_phase: "create", my_phase: "groom")
|
|
618
619
|
end
|
|
619
620
|
delete << peer
|
|
620
621
|
else
|
|
621
|
-
MU::Config.addDependency(vpc, peer['vpc']['name'], "vpc",
|
|
622
|
+
MU::Config.addDependency(vpc, peer['vpc']['name'], "vpc", their_phase: "create", my_phase: "groom")
|
|
622
623
|
end
|
|
623
624
|
delete << peer if sib['name'] == vpc['name']
|
|
624
625
|
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
---
|
|
2
|
-
rhel71: &
|
|
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-
|
|
19
|
-
centos6: &
|
|
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
|
-
|
|
2
|
+
rhel71: &5
|
|
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
|
+
centos6: &4
|
|
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-
|
|
53
|
-
ubuntu16: &
|
|
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
|
+
ubuntu16: &3
|
|
54
54
|
us-east-1: ami-bcdc16c6
|
|
55
55
|
us-west-1: ami-1b17257b
|
|
56
56
|
us-west-2: ami-19e92861
|
|
@@ -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-
|
|
92
|
-
win2k16: &
|
|
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-
|
|
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
|
+
win2k16: &2
|
|
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
|
|
@@ -137,9 +137,9 @@ amazon:
|
|
|
137
137
|
ap-southeast-1: ami-b953f2da
|
|
138
138
|
ap-southeast-2: ami-db704cb8
|
|
139
139
|
win2k12: *1
|
|
140
|
-
windows: *
|
|
141
|
-
ubuntu: *
|
|
142
|
-
centos: *
|
|
143
|
-
rhel7: *
|
|
144
|
-
rhel: *
|
|
145
|
-
linux: *
|
|
140
|
+
windows: *2
|
|
141
|
+
ubuntu: *3
|
|
142
|
+
centos: *4
|
|
143
|
+
rhel7: *5
|
|
144
|
+
rhel: *5
|
|
145
|
+
linux: *4
|
data/modules/mu/deploy.rb
CHANGED
|
@@ -269,6 +269,7 @@ module MU
|
|
|
269
269
|
cloudclass = MU::Cloud.cloudClass(cloud)
|
|
270
270
|
cloudclass.initDeploy(@mommacat)
|
|
271
271
|
}
|
|
272
|
+
@mommacat.writeDeploySecret
|
|
272
273
|
|
|
273
274
|
# Kick off threads to create each of our new servers.
|
|
274
275
|
@my_threads << Thread.new {
|
|
@@ -312,6 +313,17 @@ module MU
|
|
|
312
313
|
|
|
313
314
|
@mommacat.save!
|
|
314
315
|
|
|
316
|
+
# XXX Functions have a special behavior where we re-invoke their groom
|
|
317
|
+
# methods one more time at the end, so we can guarantee their
|
|
318
|
+
# environments are fully populated with all sibling resource idents
|
|
319
|
+
# regardless of dependency order. This is, obviously, a disgusting
|
|
320
|
+
# hack, and we should revisit our dependency language in the next big
|
|
321
|
+
# release.
|
|
322
|
+
if !@main_config["functions"].nil? and
|
|
323
|
+
@main_config["functions"].size > 0
|
|
324
|
+
createResources(@main_config["functions"], "groom")
|
|
325
|
+
end
|
|
326
|
+
|
|
315
327
|
rescue StandardError => e
|
|
316
328
|
MU.log e.class.name, MU::ERR, details: caller
|
|
317
329
|
|
|
@@ -426,10 +438,10 @@ module MU
|
|
|
426
438
|
MU.log "Failed to generate AWS cost-calculation URL. Skipping.", MU::WARN, details: "Deployment uses a feature not available in CloudFormation layer.", verbosity: MU::Logger::NORMAL
|
|
427
439
|
ensure
|
|
428
440
|
MU.setLogging(@verbosity)
|
|
429
|
-
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" complete", details: deployment, verbosity: @verbosity
|
|
441
|
+
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" #{@updating ? "updated" : "complete"}", details: deployment, verbosity: @verbosity
|
|
430
442
|
end
|
|
431
443
|
else
|
|
432
|
-
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" complete", details: deployment, verbosity: @verbosity
|
|
444
|
+
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" #{@updating ? "updated" : "complete"}", details: deployment, verbosity: @verbosity
|
|
433
445
|
end
|
|
434
446
|
|
|
435
447
|
|
|
@@ -439,7 +451,7 @@ module MU
|
|
|
439
451
|
}
|
|
440
452
|
end
|
|
441
453
|
|
|
442
|
-
@mommacat.sendAdminSlack("Deploy
|
|
454
|
+
@mommacat.sendAdminSlack("Deploy #{MU.deploy_id} \"#{MU.handle}\" #{@updating ? "updated" : "complete"}", msg: MU.summary.join("\n"))
|
|
443
455
|
end
|
|
444
456
|
|
|
445
457
|
private
|
|
@@ -524,8 +536,9 @@ MESSAGE_END
|
|
|
524
536
|
#########################################################################
|
|
525
537
|
def addDependentThread(parent, child)
|
|
526
538
|
@dependency_semaphore.synchronize {
|
|
527
|
-
@dependency_threads[child]
|
|
539
|
+
@dependency_threads[child] ||= []
|
|
528
540
|
@dependency_threads[child] << parent
|
|
541
|
+
@dependency_threads[child].uniq!
|
|
529
542
|
MU.log "Thread #{child} will wait on #{parent}", MU::DEBUG, details: @dependency_threads[child]
|
|
530
543
|
}
|
|
531
544
|
end
|
|
@@ -556,6 +569,7 @@ MESSAGE_END
|
|
|
556
569
|
|
|
557
570
|
MU.log "Setting dependencies for #{name}", MU::DEBUG, details: resource["dependencies"]
|
|
558
571
|
if !resource["dependencies"].nil? then
|
|
572
|
+
|
|
559
573
|
resource["dependencies"].each { |dependency|
|
|
560
574
|
parent_class = MU::Cloud.loadBaseType(dependency['type'])
|
|
561
575
|
|
|
@@ -565,31 +579,41 @@ MESSAGE_END
|
|
|
565
579
|
parent = parent_type+"_"+dependency["name"]+"_create"
|
|
566
580
|
addDependentThread(parent, "#{name}_groom")
|
|
567
581
|
|
|
582
|
+
# if we've explicitly declared each end of the dependency, roll
|
|
583
|
+
# with that and don't meddle further
|
|
584
|
+
if dependency["my_phase"] and dependency["their_phase"]
|
|
585
|
+
parent = parent_type+"_"+dependency["name"]+"_"+dependency["their_phase"]
|
|
586
|
+
addDependentThread(parent, name+"_"+dependency["my_phase"])
|
|
587
|
+
next
|
|
588
|
+
end
|
|
589
|
+
|
|
568
590
|
# should our creation thread also wait on our parent's create?
|
|
569
|
-
if
|
|
591
|
+
if dependency["my_phase"] == "create" and
|
|
570
592
|
(resource["#MU_CLOUDCLASS"].waits_on_parent_completion or
|
|
571
|
-
|
|
572
|
-
|
|
593
|
+
parent_class.deps_wait_on_my_creation
|
|
594
|
+
)
|
|
573
595
|
addDependentThread(parent, "#{name}_create")
|
|
574
596
|
end
|
|
575
597
|
|
|
576
598
|
|
|
577
599
|
# how about our groom thread waiting on our parents' grooms?
|
|
578
|
-
if (dependency['
|
|
600
|
+
if (dependency['their_phase'] == "groom" or resource["#MU_CLOUDCLASS"].waits_on_parent_completion) and parent_class.instance_methods(false).include?(:groom)
|
|
579
601
|
parent = parent_type+"_"+dependency["name"]+"_groom"
|
|
580
602
|
addDependentThread(parent, "#{name}_groom")
|
|
581
|
-
if
|
|
603
|
+
if dependency["my_phase"] == "groom" and
|
|
604
|
+
(dependency['their_phase'] == "create" or
|
|
605
|
+
(!dependency['their_phase'] and
|
|
582
606
|
parent_class.deps_wait_on_my_creation or
|
|
583
|
-
resource["#MU_CLOUDCLASS"].waits_on_parent_completion
|
|
584
|
-
dependency['phase'] == "groom"
|
|
607
|
+
resource["#MU_CLOUDCLASS"].waits_on_parent_completion)
|
|
585
608
|
)
|
|
586
609
|
addDependentThread(parent, "#{name}_create")
|
|
587
610
|
end
|
|
588
611
|
end
|
|
589
612
|
}
|
|
590
613
|
end
|
|
591
|
-
|
|
592
|
-
@dependency_threads["#{name}_groom"]
|
|
614
|
+
@dependency_threads["#{name}_groom"].concat(["#{name}_create", "mu_groom_container"])
|
|
615
|
+
@dependency_threads["#{name}_groom"].uniq!
|
|
616
|
+
MU.log "Thread dependencies #{res_type}[#{name}]", MU::DEBUG, details: { "create" => @dependency_threads["#{name}_create"], "groom" => @dependency_threads["#{name}_groom"] } if res_type == "role" and resource['name'] == "dynamostream-to-es"
|
|
593
617
|
}
|
|
594
618
|
end
|
|
595
619
|
|
|
@@ -623,7 +647,7 @@ MESSAGE_END
|
|
|
623
647
|
begin
|
|
624
648
|
if myservice['#MUOBJECT'].nil?
|
|
625
649
|
if @mommacat
|
|
626
|
-
ext_obj = @mommacat.findLitterMate(type: myservice["#MU_CLOUDCLASS"].cfg_plural, name: myservice['name'], credentials: myservice['credentials'], created_only: true, return_all: false)
|
|
650
|
+
ext_obj = @mommacat.findLitterMate(type: myservice["#MU_CLOUDCLASS"].cfg_plural, name: myservice['name'], credentials: myservice['credentials'], created_only: true, return_all: false, ignore_missing: !@updating)
|
|
627
651
|
if @updating and ext_obj
|
|
628
652
|
ext_obj.config!(myservice)
|
|
629
653
|
end
|
|
@@ -733,7 +757,9 @@ MESSAGE_END
|
|
|
733
757
|
sleep 10+Random.rand(20)
|
|
734
758
|
retry
|
|
735
759
|
end
|
|
760
|
+
|
|
736
761
|
end
|
|
762
|
+
|
|
737
763
|
end
|
|
738
764
|
|
|
739
765
|
end #class
|