cloud-mu 3.1.6 → 3.4.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/bin/mu-adopt +15 -12
- data/bin/mu-azure-tests +57 -0
- data/bin/mu-cleanup +2 -4
- data/bin/mu-configure +37 -1
- data/bin/mu-deploy +3 -3
- data/bin/mu-findstray-tests +25 -0
- data/bin/mu-gen-docs +2 -4
- data/bin/mu-load-config.rb +2 -1
- data/bin/mu-run-tests +37 -12
- data/cloud-mu.gemspec +4 -4
- data/cookbooks/mu-tools/attributes/default.rb +7 -0
- data/cookbooks/mu-tools/libraries/helper.rb +87 -3
- data/cookbooks/mu-tools/recipes/apply_security.rb +39 -23
- data/cookbooks/mu-tools/recipes/aws_api.rb +13 -0
- data/cookbooks/mu-tools/recipes/google_api.rb +4 -0
- data/cookbooks/mu-tools/recipes/rsyslog.rb +8 -1
- data/cookbooks/mu-tools/resources/disk.rb +33 -12
- data/cookbooks/mu-tools/resources/mommacat_request.rb +1 -2
- data/cookbooks/mu-tools/templates/centos-8/sshd_config.erb +215 -0
- data/extras/clean-stock-amis +10 -2
- data/extras/generate-stock-images +7 -3
- 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/modules/mommacat.ru +2 -2
- data/modules/mu.rb +84 -97
- data/modules/mu/adoption.rb +359 -59
- data/modules/mu/cleanup.rb +67 -44
- data/modules/mu/cloud.rb +108 -1754
- data/modules/mu/cloud/database.rb +49 -0
- data/modules/mu/cloud/dnszone.rb +44 -0
- data/modules/mu/cloud/machine_images.rb +212 -0
- data/modules/mu/cloud/providers.rb +81 -0
- data/modules/mu/cloud/resource_base.rb +929 -0
- data/modules/mu/cloud/server.rb +40 -0
- data/modules/mu/cloud/server_pool.rb +1 -0
- data/modules/mu/cloud/ssh_sessions.rb +228 -0
- data/modules/mu/cloud/winrm_sessions.rb +237 -0
- data/modules/mu/cloud/wrappers.rb +178 -0
- data/modules/mu/config.rb +122 -80
- data/modules/mu/config/alarm.rb +2 -6
- data/modules/mu/config/bucket.rb +32 -3
- data/modules/mu/config/cache_cluster.rb +2 -2
- data/modules/mu/config/cdn.rb +100 -0
- data/modules/mu/config/collection.rb +1 -1
- data/modules/mu/config/container_cluster.rb +2 -2
- data/modules/mu/config/database.rb +84 -105
- data/modules/mu/config/database.yml +1 -2
- data/modules/mu/config/dnszone.rb +5 -4
- data/modules/mu/config/doc_helpers.rb +4 -5
- data/modules/mu/config/endpoint.rb +2 -1
- data/modules/mu/config/firewall_rule.rb +3 -19
- data/modules/mu/config/folder.rb +1 -1
- data/modules/mu/config/function.rb +17 -8
- data/modules/mu/config/group.rb +1 -1
- data/modules/mu/config/habitat.rb +1 -1
- data/modules/mu/config/job.rb +89 -0
- data/modules/mu/config/loadbalancer.rb +57 -11
- data/modules/mu/config/log.rb +1 -1
- data/modules/mu/config/msg_queue.rb +1 -1
- data/modules/mu/config/nosqldb.rb +1 -1
- data/modules/mu/config/notifier.rb +8 -19
- data/modules/mu/config/ref.rb +81 -9
- data/modules/mu/config/role.rb +1 -1
- data/modules/mu/config/schema_helpers.rb +30 -34
- data/modules/mu/config/search_domain.rb +1 -1
- data/modules/mu/config/server.rb +5 -13
- data/modules/mu/config/server_pool.rb +3 -7
- data/modules/mu/config/storage_pool.rb +1 -1
- data/modules/mu/config/tail.rb +10 -0
- data/modules/mu/config/user.rb +1 -1
- data/modules/mu/config/vpc.rb +13 -17
- data/modules/mu/defaults/AWS.yaml +106 -106
- data/modules/mu/defaults/Azure.yaml +1 -0
- data/modules/mu/defaults/Google.yaml +1 -0
- data/modules/mu/deploy.rb +33 -19
- data/modules/mu/groomer.rb +15 -0
- data/modules/mu/groomers/chef.rb +3 -0
- data/modules/mu/logger.rb +120 -144
- data/modules/mu/master.rb +22 -1
- data/modules/mu/mommacat.rb +71 -26
- data/modules/mu/mommacat/daemon.rb +23 -14
- data/modules/mu/mommacat/naming.rb +82 -3
- data/modules/mu/mommacat/search.rb +59 -16
- data/modules/mu/mommacat/storage.rb +119 -48
- data/modules/mu/{clouds → providers}/README.md +1 -1
- data/modules/mu/{clouds → providers}/aws.rb +248 -62
- data/modules/mu/{clouds → providers}/aws/alarm.rb +3 -3
- data/modules/mu/{clouds → providers}/aws/bucket.rb +275 -41
- data/modules/mu/{clouds → providers}/aws/cache_cluster.rb +14 -50
- data/modules/mu/providers/aws/cdn.rb +782 -0
- data/modules/mu/{clouds → providers}/aws/collection.rb +5 -5
- data/modules/mu/{clouds → providers}/aws/container_cluster.rb +65 -63
- data/modules/mu/providers/aws/database.rb +1747 -0
- data/modules/mu/{clouds → providers}/aws/dnszone.rb +26 -12
- data/modules/mu/providers/aws/endpoint.rb +1072 -0
- data/modules/mu/{clouds → providers}/aws/firewall_rule.rb +39 -32
- data/modules/mu/{clouds → providers}/aws/folder.rb +1 -1
- data/modules/mu/{clouds → providers}/aws/function.rb +291 -133
- data/modules/mu/{clouds → providers}/aws/group.rb +18 -20
- data/modules/mu/{clouds → providers}/aws/habitat.rb +3 -3
- data/modules/mu/providers/aws/job.rb +469 -0
- data/modules/mu/{clouds → providers}/aws/loadbalancer.rb +77 -47
- data/modules/mu/{clouds → providers}/aws/log.rb +5 -5
- data/modules/mu/{clouds → providers}/aws/msg_queue.rb +14 -11
- data/modules/mu/{clouds → providers}/aws/nosqldb.rb +96 -5
- data/modules/mu/{clouds → providers}/aws/notifier.rb +135 -63
- data/modules/mu/{clouds → providers}/aws/role.rb +112 -78
- data/modules/mu/{clouds → providers}/aws/search_domain.rb +172 -41
- data/modules/mu/{clouds → providers}/aws/server.rb +120 -145
- data/modules/mu/{clouds → providers}/aws/server_pool.rb +42 -60
- data/modules/mu/{clouds → providers}/aws/storage_pool.rb +21 -38
- data/modules/mu/{clouds → providers}/aws/user.rb +12 -16
- data/modules/mu/{clouds → providers}/aws/userdata/README.md +0 -0
- data/modules/mu/{clouds → providers}/aws/userdata/linux.erb +5 -4
- data/modules/mu/{clouds → providers}/aws/userdata/windows.erb +0 -0
- data/modules/mu/{clouds → providers}/aws/vpc.rb +141 -73
- data/modules/mu/{clouds → providers}/aws/vpc_subnet.rb +0 -0
- data/modules/mu/{clouds → providers}/azure.rb +4 -1
- data/modules/mu/{clouds → providers}/azure/container_cluster.rb +1 -5
- data/modules/mu/{clouds → providers}/azure/firewall_rule.rb +8 -1
- data/modules/mu/{clouds → providers}/azure/habitat.rb +0 -0
- data/modules/mu/{clouds → providers}/azure/loadbalancer.rb +0 -0
- data/modules/mu/{clouds → providers}/azure/role.rb +0 -0
- data/modules/mu/{clouds → providers}/azure/server.rb +32 -24
- data/modules/mu/{clouds → providers}/azure/user.rb +1 -1
- data/modules/mu/{clouds → providers}/azure/userdata/README.md +0 -0
- data/modules/mu/{clouds → providers}/azure/userdata/linux.erb +0 -0
- data/modules/mu/{clouds → providers}/azure/userdata/windows.erb +0 -0
- data/modules/mu/{clouds → providers}/azure/vpc.rb +4 -6
- data/modules/mu/{clouds → providers}/cloudformation.rb +1 -1
- data/modules/mu/{clouds → providers}/cloudformation/alarm.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/cache_cluster.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/collection.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/database.rb +6 -17
- data/modules/mu/{clouds → providers}/cloudformation/dnszone.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/firewall_rule.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/loadbalancer.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/log.rb +3 -3
- data/modules/mu/{clouds → providers}/cloudformation/server.rb +7 -7
- data/modules/mu/{clouds → providers}/cloudformation/server_pool.rb +5 -5
- data/modules/mu/{clouds → providers}/cloudformation/vpc.rb +3 -3
- data/modules/mu/{clouds → providers}/docker.rb +0 -0
- data/modules/mu/{clouds → providers}/google.rb +15 -6
- data/modules/mu/{clouds → providers}/google/bucket.rb +2 -2
- data/modules/mu/{clouds → providers}/google/container_cluster.rb +29 -14
- data/modules/mu/{clouds → providers}/google/database.rb +2 -9
- data/modules/mu/{clouds → providers}/google/firewall_rule.rb +3 -3
- data/modules/mu/{clouds → providers}/google/folder.rb +5 -9
- data/modules/mu/{clouds → providers}/google/function.rb +4 -4
- data/modules/mu/{clouds → providers}/google/group.rb +9 -17
- data/modules/mu/{clouds → providers}/google/habitat.rb +4 -8
- data/modules/mu/{clouds → providers}/google/loadbalancer.rb +2 -2
- data/modules/mu/{clouds → providers}/google/role.rb +46 -35
- data/modules/mu/{clouds → providers}/google/server.rb +26 -11
- data/modules/mu/{clouds → providers}/google/server_pool.rb +11 -11
- data/modules/mu/{clouds → providers}/google/user.rb +32 -22
- data/modules/mu/{clouds → providers}/google/userdata/README.md +0 -0
- data/modules/mu/{clouds → providers}/google/userdata/linux.erb +0 -0
- data/modules/mu/{clouds → providers}/google/userdata/windows.erb +0 -0
- data/modules/mu/{clouds → providers}/google/vpc.rb +38 -3
- data/modules/tests/aws-jobs-functions.yaml +46 -0
- data/modules/tests/centos6.yaml +15 -0
- data/modules/tests/centos7.yaml +15 -0
- data/modules/tests/centos8.yaml +12 -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/microservice_app.yaml +288 -0
- data/modules/tests/rds.yaml +108 -0
- data/modules/tests/regrooms/rds.yaml +123 -0
- 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
- data/spec/mu/clouds/azure_spec.rb +2 -2
- metadata +126 -98
- data/modules/mu/clouds/aws/database.rb +0 -1974
- data/modules/mu/clouds/aws/endpoint.rb +0 -596
data/modules/mu/config/user.rb
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
module MU
|
|
16
16
|
class Config
|
|
17
|
-
# Basket of Kittens config schema and parser logic. See modules/mu/
|
|
17
|
+
# Basket of Kittens config schema and parser logic. See modules/mu/providers/*/user.rb
|
|
18
18
|
class User
|
|
19
19
|
|
|
20
20
|
# Base configuration schema for a User
|
data/modules/mu/config/vpc.rb
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
module MU
|
|
16
16
|
class Config
|
|
17
|
-
# Basket of Kittens config schema and parser logic. See modules/mu/
|
|
17
|
+
# Basket of Kittens config schema and parser logic. See modules/mu/providers/*/vpc.rb
|
|
18
18
|
class VPC
|
|
19
19
|
|
|
20
20
|
# Base configuration schema for a VPC
|
|
@@ -417,9 +417,10 @@ 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
|
-
if v['name'] == vpc['name']
|
|
423
|
+
if v['name'].to_s == vpc['name'].to_s
|
|
423
424
|
vpc['ip_block'] = v['ip_block']
|
|
424
425
|
vpc['peers'] ||= []
|
|
425
426
|
vpc['peers'].concat(v['peers'])
|
|
@@ -431,6 +432,10 @@ module MU
|
|
|
431
432
|
break
|
|
432
433
|
end
|
|
433
434
|
}
|
|
435
|
+
if !vpc['ip_block']
|
|
436
|
+
MU.log "Loading existing deploy but can't find IP block of VPC #{vpc['name']}", MU::ERR
|
|
437
|
+
ok = false
|
|
438
|
+
end
|
|
434
439
|
else
|
|
435
440
|
using_default_cidr = true
|
|
436
441
|
vpc['ip_block'] = "10.0.0.0/16"
|
|
@@ -539,7 +544,7 @@ module MU
|
|
|
539
544
|
# Clouds that don't have some kind of native NAT gateway can also
|
|
540
545
|
# leverage this host to honor "gateway" => "#NAT" situations.
|
|
541
546
|
if !can_peer and !already_peered and have_public and vpc["create_bastion"]
|
|
542
|
-
serverclass =
|
|
547
|
+
serverclass = MU::Cloud.resourceClass(vpc["cloud"], "Server")
|
|
543
548
|
bastion = serverclass.genericNAT.dup
|
|
544
549
|
bastion["groomer_variables"] = {
|
|
545
550
|
"nat_ip_block" => vpc["ip_block"].to_s
|
|
@@ -558,10 +563,7 @@ module MU
|
|
|
558
563
|
"name" => vpc["name"],
|
|
559
564
|
"subnet_pref" => "public"
|
|
560
565
|
}
|
|
561
|
-
vpc["
|
|
562
|
-
"type" => "server",
|
|
563
|
-
"name" => bastion['name'],
|
|
564
|
-
}
|
|
566
|
+
MU::Config.addDependency(vpc, bastion['name'], "server", no_create_wait: true)
|
|
565
567
|
vpc["bastion"] = MU::Config::Ref.get(
|
|
566
568
|
name: bastion['name'],
|
|
567
569
|
cloud: vpc['cloud'],
|
|
@@ -596,7 +598,7 @@ module MU
|
|
|
596
598
|
MU.log "Skipping malformed VPC peer in #{vpc['name']}", MU::ERR, details: peer
|
|
597
599
|
next
|
|
598
600
|
end
|
|
599
|
-
peer["#MU_CLOUDCLASS"] =
|
|
601
|
+
peer["#MU_CLOUDCLASS"] = MU::Cloud.loadBaseType("VPC")
|
|
600
602
|
# We check for multiple siblings because some implementations
|
|
601
603
|
# (Google) can split declared VPCs into parts to get the mimic the
|
|
602
604
|
# routing behaviors we expect.
|
|
@@ -613,17 +615,11 @@ module MU
|
|
|
613
615
|
append_me = { "vpc" => peer["vpc"].dup }
|
|
614
616
|
append_me['vpc']['name'] = sib['name']
|
|
615
617
|
append << append_me
|
|
616
|
-
vpc["
|
|
617
|
-
"type" => "vpc",
|
|
618
|
-
"name" => sib['name']
|
|
619
|
-
}
|
|
618
|
+
MU::Config.addDependency(vpc, sib['name'], "vpc", phase: "groom", no_create_wait: true)
|
|
620
619
|
end
|
|
621
620
|
delete << peer
|
|
622
621
|
else
|
|
623
|
-
vpc["
|
|
624
|
-
"type" => "vpc",
|
|
625
|
-
"name" => peer['vpc']["name"]
|
|
626
|
-
}
|
|
622
|
+
MU::Config.addDependency(vpc, peer['vpc']['name'], "vpc", phase: "groom", no_create_wait: true)
|
|
627
623
|
end
|
|
628
624
|
delete << peer if sib['name'] == vpc['name']
|
|
629
625
|
}
|
|
@@ -800,7 +796,7 @@ MU.log "VPC lookup cache hit", MU::WARN, details: vpc_block
|
|
|
800
796
|
@@reference_cache[vpc_block] ||= ext_vpc if ok
|
|
801
797
|
end
|
|
802
798
|
rescue StandardError => e
|
|
803
|
-
raise MuError
|
|
799
|
+
raise MuError.new e.inspect, details: { "my call stack" => caller, "exception call stack" => e.backtrace }
|
|
804
800
|
ensure
|
|
805
801
|
if !ext_vpc and vpc_block['cloud'] != "CloudFormation"
|
|
806
802
|
MU.log "Couldn't resolve VPC reference to a unique live VPC in #{parent_type} #{parent['name']} (called by #{caller[0]})", MU::ERR, details: vpc_block
|
|
@@ -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
|
-
|
|
22
|
-
ap-northeast-
|
|
23
|
-
ap-
|
|
24
|
-
ap-
|
|
25
|
-
ap-southeast-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
eu-
|
|
29
|
-
eu-
|
|
30
|
-
eu-west-
|
|
31
|
-
eu-west-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
us-west-1: ami-
|
|
35
|
-
us-west-2: ami-
|
|
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-0ccdc671f12147a1d
|
|
21
|
+
us-east-2: ami-00d0e8bc2f05ab949
|
|
22
|
+
ap-northeast-1: ami-0726801ceef87f5f8
|
|
23
|
+
ap-northeast-2: ami-05fa4afc4a0493b0a
|
|
24
|
+
ap-south-1: ami-0d6e4f3b6592b3139
|
|
25
|
+
ap-southeast-1: ami-0c988e3dc80b14653
|
|
26
|
+
ap-southeast-2: ami-02ac856fd094675ef
|
|
27
|
+
ca-central-1: ami-0ce7e343953af2292
|
|
28
|
+
eu-central-1: ami-0ce8317423cea27b8
|
|
29
|
+
eu-north-1: ami-0a923b493d5fc9743
|
|
30
|
+
eu-west-1: ami-06e0f02328921c865
|
|
31
|
+
eu-west-2: ami-07ae118c8814df140
|
|
32
|
+
eu-west-3: ami-03c1017cd1ccc6e9d
|
|
33
|
+
sa-east-1: ami-05212ae133b9c3ba1
|
|
34
|
+
us-west-1: ami-0b05ec54412b9f8b0
|
|
35
|
+
us-west-2: ami-0447e036b102b2ca0
|
|
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-0be9d646b29a9f51d
|
|
38
|
+
ap-northeast-1: ami-0ea500fc488406ad8
|
|
39
|
+
ap-northeast-2: ami-062d5536e5ebf04e9
|
|
40
|
+
ap-south-1: ami-0c2bf51384a5dcd92
|
|
41
|
+
ap-southeast-1: ami-0a8022e9bb353022f
|
|
42
|
+
ap-southeast-2: ami-03d47c88f2e01203b
|
|
43
|
+
ca-central-1: ami-0f0dc8a3e18a28544
|
|
44
|
+
eu-central-1: ami-0ea618bc5a1f372a2
|
|
45
|
+
eu-north-1: ami-02b062056e7dd4741
|
|
46
|
+
eu-west-1: ami-03851110db1a143e7
|
|
47
|
+
eu-west-2: ami-03800a8fe524171d2
|
|
48
|
+
eu-west-3: ami-074acd461ca002f0a
|
|
49
|
+
sa-east-1: ami-00c88550221a205f9
|
|
50
|
+
us-east-2: ami-098da5da2eef484e5
|
|
51
|
+
us-west-1: ami-0eea632474ef51860
|
|
52
|
+
us-west-2: ami-075aad0e6e9fc5654
|
|
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
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
centos6: ¢os6 OpenLogic/CentOS/6
|
|
3
3
|
#centos7: ¢os7 westernoceansoftwaresprivatelimited/centos-7-6/centos-7-6-server
|
|
4
4
|
centos7: ¢os7 OpenLogic/CentOS/7
|
|
5
|
+
centos8: ¢os7 OpenLogic/CentOS/8
|
|
5
6
|
rhel8: &rhel8 RedHat/RHEL/8
|
|
6
7
|
rhel7: &rhel7 RedHat/RHEL/7
|
|
7
8
|
rhel6: &rhel6 RedHat/RHEL/6
|
data/modules/mu/deploy.rb
CHANGED
|
@@ -157,6 +157,7 @@ module MU
|
|
|
157
157
|
_shortclass, _cfg_name, _cfg_plural, classname = MU::Cloud.getResourceNames(data[:cfg_plural])
|
|
158
158
|
@main_config[data[:cfg_plural]].each { |resource|
|
|
159
159
|
resource["#MU_CLOUDCLASS"] = classname
|
|
160
|
+
# resource["#MU_CLOUDCLASS"] = MU::Cloud.resourceClass(resource['cloud'], data[:cfg_plural])
|
|
160
161
|
}
|
|
161
162
|
setThreadDependencies(@main_config[data[:cfg_plural]])
|
|
162
163
|
end
|
|
@@ -265,7 +266,7 @@ module MU
|
|
|
265
266
|
# Run cloud provider-specific deploy meta-artifact creation (ssh keys,
|
|
266
267
|
# resource groups, etc)
|
|
267
268
|
@mommacat.cloudsUsed.each { |cloud|
|
|
268
|
-
cloudclass =
|
|
269
|
+
cloudclass = MU::Cloud.cloudClass(cloud)
|
|
269
270
|
cloudclass.initDeploy(@mommacat)
|
|
270
271
|
}
|
|
271
272
|
|
|
@@ -311,6 +312,17 @@ module MU
|
|
|
311
312
|
|
|
312
313
|
@mommacat.save!
|
|
313
314
|
|
|
315
|
+
# XXX Functions have a special behavior where we re-invoke their groom
|
|
316
|
+
# methods one more time at the end, so we can guarantee their
|
|
317
|
+
# environments are fully populated with all sibling resource idents
|
|
318
|
+
# regardless of dependency order. This is, obviously, a disgusting
|
|
319
|
+
# hack, and we should revisit our dependency language in the next big
|
|
320
|
+
# release.
|
|
321
|
+
if !@main_config["functions"].nil? and
|
|
322
|
+
@main_config["functions"].size > 0
|
|
323
|
+
createResources(@main_config["functions"], "groom")
|
|
324
|
+
end
|
|
325
|
+
|
|
314
326
|
rescue StandardError => e
|
|
315
327
|
MU.log e.class.name, MU::ERR, details: caller
|
|
316
328
|
|
|
@@ -425,10 +437,10 @@ module MU
|
|
|
425
437
|
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
|
|
426
438
|
ensure
|
|
427
439
|
MU.setLogging(@verbosity)
|
|
428
|
-
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" complete", details: deployment, verbosity: @verbosity
|
|
440
|
+
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" #{@updating ? "updated" : "complete"}", details: deployment, verbosity: @verbosity
|
|
429
441
|
end
|
|
430
442
|
else
|
|
431
|
-
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" complete", details: deployment, verbosity: @verbosity
|
|
443
|
+
MU.log "Deployment #{MU.deploy_id} \"#{MU.handle}\" #{@updating ? "updated" : "complete"}", details: deployment, verbosity: @verbosity
|
|
432
444
|
end
|
|
433
445
|
|
|
434
446
|
|
|
@@ -438,7 +450,7 @@ module MU
|
|
|
438
450
|
}
|
|
439
451
|
end
|
|
440
452
|
|
|
441
|
-
@mommacat.sendAdminSlack("Deploy
|
|
453
|
+
@mommacat.sendAdminSlack("Deploy #{MU.deploy_id} \"#{MU.handle}\" #{@updating ? "updated" : "complete"}", msg: MU.summary.join("\n"))
|
|
442
454
|
end
|
|
443
455
|
|
|
444
456
|
private
|
|
@@ -554,16 +566,9 @@ MESSAGE_END
|
|
|
554
566
|
@dependency_threads["#{name}_groom"]=["#{name}_create", "mu_groom_container"]
|
|
555
567
|
|
|
556
568
|
MU.log "Setting dependencies for #{name}", MU::DEBUG, details: resource["dependencies"]
|
|
557
|
-
if resource["dependencies"]
|
|
569
|
+
if !resource["dependencies"].nil? then
|
|
558
570
|
resource["dependencies"].each { |dependency|
|
|
559
|
-
parent_class =
|
|
560
|
-
MU::Cloud.resource_types.each_pair { |res_class, attrs|
|
|
561
|
-
if attrs[:cfg_name] == dependency['type'] or
|
|
562
|
-
attrs[:cfg_plural] == dependency['type']
|
|
563
|
-
parent_class = Object.const_get("MU").const_get("Cloud").const_get(res_class)
|
|
564
|
-
break
|
|
565
|
-
end
|
|
566
|
-
}
|
|
571
|
+
parent_class = MU::Cloud.loadBaseType(dependency['type'])
|
|
567
572
|
|
|
568
573
|
parent_type = parent_class.cfg_name
|
|
569
574
|
|
|
@@ -572,10 +577,10 @@ MESSAGE_END
|
|
|
572
577
|
addDependentThread(parent, "#{name}_groom")
|
|
573
578
|
|
|
574
579
|
# should our creation thread also wait on our parent's create?
|
|
575
|
-
if !
|
|
580
|
+
if !dependency["no_create_wait"] and
|
|
576
581
|
(resource["#MU_CLOUDCLASS"].waits_on_parent_completion or
|
|
577
582
|
dependency['phase'] == "create" or
|
|
578
|
-
|
|
583
|
+
parent_class.deps_wait_on_my_creation)
|
|
579
584
|
addDependentThread(parent, "#{name}_create")
|
|
580
585
|
end
|
|
581
586
|
|
|
@@ -584,12 +589,18 @@ MESSAGE_END
|
|
|
584
589
|
if (dependency['phase'] == "groom" or resource["#MU_CLOUDCLASS"].waits_on_parent_completion) and parent_class.instance_methods(false).include?(:groom)
|
|
585
590
|
parent = parent_type+"_"+dependency["name"]+"_groom"
|
|
586
591
|
addDependentThread(parent, "#{name}_groom")
|
|
587
|
-
if
|
|
592
|
+
if !dependency["no_create_wait"] and (
|
|
593
|
+
parent_class.deps_wait_on_my_creation or
|
|
594
|
+
resource["#MU_CLOUDCLASS"].waits_on_parent_completion or
|
|
595
|
+
dependency['phase'] == "groom"
|
|
596
|
+
)
|
|
588
597
|
addDependentThread(parent, "#{name}_create")
|
|
589
598
|
end
|
|
590
599
|
end
|
|
591
600
|
}
|
|
592
601
|
end
|
|
602
|
+
MU.log "Thread dependencies #{res_type}[#{name}]", MU::DEBUG, details: { "create" => @dependency_threads["#{name}_create"], "groom" => @dependency_threads["#{name}_groom"] }
|
|
603
|
+
@dependency_threads["#{name}_groom"]=["#{name}_create", "mu_groom_container"]
|
|
593
604
|
}
|
|
594
605
|
end
|
|
595
606
|
|
|
@@ -623,7 +634,7 @@ MESSAGE_END
|
|
|
623
634
|
begin
|
|
624
635
|
if myservice['#MUOBJECT'].nil?
|
|
625
636
|
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)
|
|
637
|
+
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
638
|
if @updating and ext_obj
|
|
628
639
|
ext_obj.config!(myservice)
|
|
629
640
|
end
|
|
@@ -651,8 +662,9 @@ MESSAGE_END
|
|
|
651
662
|
run_this_method = myservice['#MUOBJECT'].method(mode)
|
|
652
663
|
rescue StandardError => e
|
|
653
664
|
MU::MommaCat.unlockAll
|
|
654
|
-
@main_thread.raise MuError, "Error invoking #{myservice["#
|
|
655
|
-
|
|
665
|
+
@main_thread.raise MuError, "Error invoking #{myservice["#MUOBJECT"].class.name}.#{mode} for #{myservice['name']} (#{e.inspect})", e.backtrace
|
|
666
|
+
return
|
|
667
|
+
# raise e
|
|
656
668
|
end
|
|
657
669
|
begin
|
|
658
670
|
MU.log "Checking whether to run #{myservice['#MUOBJECT']}.#{mode} (updating: #{@updating})", MU::DEBUG
|
|
@@ -732,7 +744,9 @@ MESSAGE_END
|
|
|
732
744
|
sleep 10+Random.rand(20)
|
|
733
745
|
retry
|
|
734
746
|
end
|
|
747
|
+
|
|
735
748
|
end
|
|
749
|
+
|
|
736
750
|
end
|
|
737
751
|
|
|
738
752
|
end #class
|