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
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/eGT-Labs/knife-windows.git
|
|
3
|
+
revision: d9ed1c2da3fa60a6adaa4e3089cbab32a5999e93
|
|
4
|
+
branch: winrm_cert_auth
|
|
5
|
+
specs:
|
|
6
|
+
knife-windows (2.0.3)
|
|
7
|
+
winrm (~> 2.1)
|
|
8
|
+
winrm-elevated (~> 1.0)
|
|
9
|
+
|
|
10
|
+
PATH
|
|
11
|
+
remote: ..
|
|
12
|
+
specs:
|
|
13
|
+
cloud-mu (3.4.0)
|
|
14
|
+
addressable (~> 2.5)
|
|
15
|
+
bundler (~> 2.1.4)
|
|
16
|
+
chronic_duration (~> 0.10)
|
|
17
|
+
color (~> 1.8)
|
|
18
|
+
colorize (~> 0.8)
|
|
19
|
+
erubis (~> 2.7)
|
|
20
|
+
googleauth (~> 0.6)
|
|
21
|
+
inifile (~> 3.0)
|
|
22
|
+
json-schema (~> 2.8)
|
|
23
|
+
net-ldap (~> 0.16)
|
|
24
|
+
net-ssh (~> 4.2)
|
|
25
|
+
net-ssh-multi (~> 1.2, >= 1.2.1)
|
|
26
|
+
netaddr (~> 2.0)
|
|
27
|
+
nokogiri (~> 1.10)
|
|
28
|
+
openssl-oaep (~> 0.1)
|
|
29
|
+
optimist (~> 3.0)
|
|
30
|
+
rack (~> 2.0)
|
|
31
|
+
rubocop (~> 0.58)
|
|
32
|
+
ruby-graphviz (~> 1.2)
|
|
33
|
+
rubyzip (~> 2.3)
|
|
34
|
+
simple-password-gen (~> 0.1)
|
|
35
|
+
slack-notifier (~> 2.3)
|
|
36
|
+
solve (~> 4.0)
|
|
37
|
+
thin (~> 1.7)
|
|
38
|
+
winrm (~> 2.3, >= 2.3.4)
|
|
39
|
+
yard (~> 0.9)
|
|
40
|
+
|
|
41
|
+
GEM
|
|
42
|
+
remote: https://rubygems.org/
|
|
43
|
+
specs:
|
|
44
|
+
activesupport (6.0.3.4)
|
|
45
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
46
|
+
i18n (>= 0.7, < 2)
|
|
47
|
+
minitest (~> 5.1)
|
|
48
|
+
tzinfo (~> 1.1)
|
|
49
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
50
|
+
addressable (2.5.2)
|
|
51
|
+
public_suffix (>= 2.0.2, < 4.0)
|
|
52
|
+
ast (2.4.1)
|
|
53
|
+
berkshelf (7.0.10)
|
|
54
|
+
chef (>= 13.6.52)
|
|
55
|
+
chef-config
|
|
56
|
+
cleanroom (~> 1.0)
|
|
57
|
+
concurrent-ruby (~> 1.0)
|
|
58
|
+
minitar (>= 0.6)
|
|
59
|
+
mixlib-archive (>= 0.4, < 2.0)
|
|
60
|
+
mixlib-config (>= 2.2.5)
|
|
61
|
+
mixlib-shellout (>= 2.0, < 4.0)
|
|
62
|
+
octokit (~> 4.0)
|
|
63
|
+
retryable (>= 2.0, < 4.0)
|
|
64
|
+
solve (~> 4.0)
|
|
65
|
+
thor (>= 0.20)
|
|
66
|
+
builder (3.2.4)
|
|
67
|
+
chef (14.15.6)
|
|
68
|
+
addressable
|
|
69
|
+
bundler (>= 1.10)
|
|
70
|
+
chef-config (= 14.15.6)
|
|
71
|
+
chef-zero (>= 13.0, < 15.0)
|
|
72
|
+
diff-lcs (~> 1.2, >= 1.2.4)
|
|
73
|
+
erubis (~> 2.7)
|
|
74
|
+
ffi (~> 1.9, >= 1.9.25)
|
|
75
|
+
ffi-yajl (~> 2.2)
|
|
76
|
+
highline (~> 1.6, >= 1.6.9)
|
|
77
|
+
iniparse (~> 1.4)
|
|
78
|
+
mixlib-archive (>= 0.4, < 2.0)
|
|
79
|
+
mixlib-authentication (~> 2.1)
|
|
80
|
+
mixlib-cli (>= 1.7, < 3.0)
|
|
81
|
+
mixlib-log (>= 2.0.3, < 4.0)
|
|
82
|
+
mixlib-shellout (>= 2.4, < 4.0)
|
|
83
|
+
net-sftp (~> 2.1, >= 2.1.2)
|
|
84
|
+
net-ssh (~> 4.2)
|
|
85
|
+
net-ssh-multi (~> 1.2, >= 1.2.1)
|
|
86
|
+
ohai (~> 14.0)
|
|
87
|
+
plist (~> 3.2)
|
|
88
|
+
proxifier (~> 1.0)
|
|
89
|
+
rspec-core (~> 3.5)
|
|
90
|
+
rspec-expectations (~> 3.5)
|
|
91
|
+
rspec-mocks (~> 3.5)
|
|
92
|
+
rspec_junit_formatter (~> 0.2.0)
|
|
93
|
+
serverspec (~> 2.7)
|
|
94
|
+
specinfra (~> 2.10)
|
|
95
|
+
syslog-logger (~> 1.6)
|
|
96
|
+
uuidtools (~> 2.1.5)
|
|
97
|
+
chef-config (14.15.6)
|
|
98
|
+
addressable
|
|
99
|
+
fuzzyurl
|
|
100
|
+
mixlib-config (>= 2.2.12, < 4.0)
|
|
101
|
+
mixlib-shellout (>= 2.0, < 4.0)
|
|
102
|
+
tomlrb (~> 1.2)
|
|
103
|
+
chef-dk (3.2.30)
|
|
104
|
+
addressable (>= 2.3.5, < 2.6)
|
|
105
|
+
chef (~> 14.0)
|
|
106
|
+
chef-provisioning (~> 2.0)
|
|
107
|
+
cookbook-omnifetch (~> 0.5)
|
|
108
|
+
diff-lcs (~> 1.0)
|
|
109
|
+
ffi-yajl (>= 1.0, < 3.0)
|
|
110
|
+
minitar (~> 0.6)
|
|
111
|
+
mixlib-cli (~> 1.7)
|
|
112
|
+
mixlib-shellout (~> 2.0)
|
|
113
|
+
paint (~> 1.0)
|
|
114
|
+
solve (> 2.0, < 5.0)
|
|
115
|
+
chef-provisioning (2.7.6)
|
|
116
|
+
cheffish (>= 4.0, < 15.0)
|
|
117
|
+
inifile (>= 2.0.2)
|
|
118
|
+
mixlib-install (>= 1.0)
|
|
119
|
+
net-scp (~> 1.0)
|
|
120
|
+
net-ssh (>= 2.9, < 5.0)
|
|
121
|
+
net-ssh-gateway (> 1.2, < 3.0)
|
|
122
|
+
winrm (~> 2.0)
|
|
123
|
+
winrm-elevated (~> 1.0)
|
|
124
|
+
winrm-fs (~> 1.0)
|
|
125
|
+
chef-sugar (5.1.12)
|
|
126
|
+
chef-vault (3.4.3)
|
|
127
|
+
chef-zero (14.0.17)
|
|
128
|
+
ffi-yajl (~> 2.2)
|
|
129
|
+
hashie (>= 2.0, < 4.0)
|
|
130
|
+
mixlib-log (>= 2.0, < 4.0)
|
|
131
|
+
rack (~> 2.0, >= 2.0.6)
|
|
132
|
+
uuidtools (~> 2.1)
|
|
133
|
+
cheffish (14.0.13)
|
|
134
|
+
chef-zero (~> 14.0)
|
|
135
|
+
net-ssh
|
|
136
|
+
chronic_duration (0.10.6)
|
|
137
|
+
numerizer (~> 0.1.1)
|
|
138
|
+
cleanroom (1.0.0)
|
|
139
|
+
color (1.8)
|
|
140
|
+
colorize (0.8.1)
|
|
141
|
+
concurrent-ruby (1.1.7)
|
|
142
|
+
cookbook-omnifetch (0.11.1)
|
|
143
|
+
mixlib-archive (>= 0.4, < 2.0)
|
|
144
|
+
cucumber-core (8.0.1)
|
|
145
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
|
146
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
147
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
|
148
|
+
cucumber-gherkin (15.0.2)
|
|
149
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
|
150
|
+
cucumber-messages (13.2.1)
|
|
151
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
|
152
|
+
cucumber-tag-expressions (2.0.4)
|
|
153
|
+
daemons (1.3.1)
|
|
154
|
+
diff-lcs (1.4.4)
|
|
155
|
+
erubi (1.10.0)
|
|
156
|
+
erubis (2.7.0)
|
|
157
|
+
eventmachine (1.2.7)
|
|
158
|
+
faraday (1.1.0)
|
|
159
|
+
multipart-post (>= 1.2, < 3)
|
|
160
|
+
ruby2_keywords
|
|
161
|
+
ffi (1.13.1)
|
|
162
|
+
ffi-libarchive (1.0.4)
|
|
163
|
+
ffi (~> 1.0)
|
|
164
|
+
ffi-yajl (2.3.4)
|
|
165
|
+
libyajl2 (~> 1.2)
|
|
166
|
+
foodcritic (14.1.0)
|
|
167
|
+
cucumber-core (>= 1.3)
|
|
168
|
+
erubis
|
|
169
|
+
ffi-yajl (~> 2.0)
|
|
170
|
+
nokogiri (>= 1.5, < 2.0)
|
|
171
|
+
rake
|
|
172
|
+
rufus-lru (~> 1.0)
|
|
173
|
+
treetop (~> 1.4)
|
|
174
|
+
fuzzyurl (0.9.0)
|
|
175
|
+
googleauth (0.14.0)
|
|
176
|
+
faraday (>= 0.17.3, < 2.0)
|
|
177
|
+
jwt (>= 1.4, < 3.0)
|
|
178
|
+
memoist (~> 0.16)
|
|
179
|
+
multi_json (~> 1.11)
|
|
180
|
+
os (>= 0.9, < 2.0)
|
|
181
|
+
signet (~> 0.14)
|
|
182
|
+
gssapi (1.3.1)
|
|
183
|
+
ffi (>= 1.0.1)
|
|
184
|
+
gyoku (1.3.1)
|
|
185
|
+
builder (>= 2.1.2)
|
|
186
|
+
hashie (3.6.0)
|
|
187
|
+
highline (1.7.10)
|
|
188
|
+
httpclient (2.8.3)
|
|
189
|
+
i18n (1.8.5)
|
|
190
|
+
concurrent-ruby (~> 1.0)
|
|
191
|
+
inifile (3.0.0)
|
|
192
|
+
iniparse (1.5.0)
|
|
193
|
+
ipaddress (0.8.3)
|
|
194
|
+
json-schema (2.8.1)
|
|
195
|
+
addressable (>= 2.4)
|
|
196
|
+
jwt (2.2.2)
|
|
197
|
+
libyajl2 (1.2.0)
|
|
198
|
+
little-plugger (1.1.4)
|
|
199
|
+
logging (2.3.0)
|
|
200
|
+
little-plugger (~> 1.1)
|
|
201
|
+
multi_json (~> 1.14)
|
|
202
|
+
memoist (0.16.2)
|
|
203
|
+
middleware (0.1.0)
|
|
204
|
+
mini_portile2 (2.4.0)
|
|
205
|
+
minitar (0.9)
|
|
206
|
+
minitest (5.14.2)
|
|
207
|
+
mixlib-archive (1.0.7)
|
|
208
|
+
mixlib-log
|
|
209
|
+
mixlib-authentication (2.1.1)
|
|
210
|
+
mixlib-cli (1.7.0)
|
|
211
|
+
mixlib-config (3.0.9)
|
|
212
|
+
tomlrb
|
|
213
|
+
mixlib-install (3.12.5)
|
|
214
|
+
mixlib-shellout
|
|
215
|
+
mixlib-versioning
|
|
216
|
+
thor
|
|
217
|
+
mixlib-log (3.0.9)
|
|
218
|
+
mixlib-shellout (2.4.4)
|
|
219
|
+
mixlib-versioning (1.2.12)
|
|
220
|
+
molinillo (0.7.0)
|
|
221
|
+
multi_json (1.15.0)
|
|
222
|
+
multipart-post (2.1.1)
|
|
223
|
+
mysql2 (0.5.2)
|
|
224
|
+
net-ldap (0.17.0)
|
|
225
|
+
net-scp (1.2.1)
|
|
226
|
+
net-ssh (>= 2.6.5)
|
|
227
|
+
net-sftp (2.1.2)
|
|
228
|
+
net-ssh (>= 2.6.5)
|
|
229
|
+
net-ssh (4.2.0)
|
|
230
|
+
net-ssh-gateway (2.0.0)
|
|
231
|
+
net-ssh (>= 4.0.0)
|
|
232
|
+
net-ssh-multi (1.2.1)
|
|
233
|
+
net-ssh (>= 2.6.5)
|
|
234
|
+
net-ssh-gateway (>= 1.2.0)
|
|
235
|
+
net-telnet (0.1.1)
|
|
236
|
+
netaddr (2.0.4)
|
|
237
|
+
nokogiri (1.10.10)
|
|
238
|
+
mini_portile2 (~> 2.4.0)
|
|
239
|
+
nori (2.6.0)
|
|
240
|
+
numerizer (0.1.1)
|
|
241
|
+
octokit (4.19.0)
|
|
242
|
+
faraday (>= 0.9)
|
|
243
|
+
sawyer (~> 0.8.0, >= 0.5.3)
|
|
244
|
+
ohai (14.15.0)
|
|
245
|
+
chef-config (>= 12.8, < 15)
|
|
246
|
+
ffi (~> 1.9)
|
|
247
|
+
ffi-yajl (~> 2.2)
|
|
248
|
+
ipaddress
|
|
249
|
+
mixlib-cli (>= 1.7.0)
|
|
250
|
+
mixlib-config (>= 2.0, < 4.0)
|
|
251
|
+
mixlib-log (>= 2.0.1, < 4.0)
|
|
252
|
+
mixlib-shellout (>= 2.0, < 4.0)
|
|
253
|
+
plist (~> 3.1)
|
|
254
|
+
systemu (~> 2.6.4)
|
|
255
|
+
wmi-lite (~> 1.0)
|
|
256
|
+
openssl-oaep (0.1.0)
|
|
257
|
+
optimist (3.0.1)
|
|
258
|
+
os (1.1.1)
|
|
259
|
+
paint (1.0.1)
|
|
260
|
+
parallel (1.20.1)
|
|
261
|
+
parser (2.7.2.0)
|
|
262
|
+
ast (~> 2.4.1)
|
|
263
|
+
plist (3.5.0)
|
|
264
|
+
polyglot (0.3.5)
|
|
265
|
+
protobuf-cucumber (3.10.8)
|
|
266
|
+
activesupport (>= 3.2)
|
|
267
|
+
middleware
|
|
268
|
+
thor
|
|
269
|
+
thread_safe
|
|
270
|
+
proxifier (1.0.3)
|
|
271
|
+
public_suffix (3.1.1)
|
|
272
|
+
rack (2.2.3)
|
|
273
|
+
rainbow (3.0.0)
|
|
274
|
+
rake (13.0.1)
|
|
275
|
+
regexp_parser (2.0.0)
|
|
276
|
+
retryable (3.0.5)
|
|
277
|
+
rexml (3.2.4)
|
|
278
|
+
rspec (3.10.0)
|
|
279
|
+
rspec-core (~> 3.10.0)
|
|
280
|
+
rspec-expectations (~> 3.10.0)
|
|
281
|
+
rspec-mocks (~> 3.10.0)
|
|
282
|
+
rspec-core (3.10.0)
|
|
283
|
+
rspec-support (~> 3.10.0)
|
|
284
|
+
rspec-expectations (3.10.0)
|
|
285
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
286
|
+
rspec-support (~> 3.10.0)
|
|
287
|
+
rspec-its (1.3.0)
|
|
288
|
+
rspec-core (>= 3.0.0)
|
|
289
|
+
rspec-expectations (>= 3.0.0)
|
|
290
|
+
rspec-mocks (3.10.0)
|
|
291
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
292
|
+
rspec-support (~> 3.10.0)
|
|
293
|
+
rspec-support (3.10.0)
|
|
294
|
+
rspec_junit_formatter (0.2.3)
|
|
295
|
+
builder (< 4)
|
|
296
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
|
297
|
+
rubocop (0.93.1)
|
|
298
|
+
parallel (~> 1.10)
|
|
299
|
+
parser (>= 2.7.1.5)
|
|
300
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
301
|
+
regexp_parser (>= 1.8)
|
|
302
|
+
rexml
|
|
303
|
+
rubocop-ast (>= 0.6.0)
|
|
304
|
+
ruby-progressbar (~> 1.7)
|
|
305
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
306
|
+
rubocop-ast (1.3.0)
|
|
307
|
+
parser (>= 2.7.1.5)
|
|
308
|
+
ruby-graphviz (1.2.5)
|
|
309
|
+
rexml
|
|
310
|
+
ruby-progressbar (1.10.1)
|
|
311
|
+
ruby-wmi (0.4.0)
|
|
312
|
+
ruby2_keywords (0.0.2)
|
|
313
|
+
rubyntlm (0.6.2)
|
|
314
|
+
rubyzip (2.3.0)
|
|
315
|
+
rufus-lru (1.1.0)
|
|
316
|
+
sawyer (0.8.2)
|
|
317
|
+
addressable (>= 2.3.5)
|
|
318
|
+
faraday (> 0.8, < 2.0)
|
|
319
|
+
semverse (3.0.0)
|
|
320
|
+
serverspec (2.41.5)
|
|
321
|
+
multi_json
|
|
322
|
+
rspec (~> 3.0)
|
|
323
|
+
rspec-its
|
|
324
|
+
specinfra (~> 2.72)
|
|
325
|
+
sfl (2.3)
|
|
326
|
+
signet (0.14.0)
|
|
327
|
+
addressable (~> 2.3)
|
|
328
|
+
faraday (>= 0.17.3, < 2.0)
|
|
329
|
+
jwt (>= 1.5, < 3.0)
|
|
330
|
+
multi_json (~> 1.10)
|
|
331
|
+
simple-password-gen (0.1.5)
|
|
332
|
+
slack-notifier (2.3.2)
|
|
333
|
+
solve (4.0.4)
|
|
334
|
+
molinillo (~> 0.6)
|
|
335
|
+
semverse (>= 1.1, < 4.0)
|
|
336
|
+
specinfra (2.82.22)
|
|
337
|
+
net-scp
|
|
338
|
+
net-ssh (>= 2.7)
|
|
339
|
+
net-telnet (= 0.1.1)
|
|
340
|
+
sfl
|
|
341
|
+
syslog-logger (1.6.8)
|
|
342
|
+
systemu (2.6.5)
|
|
343
|
+
thin (1.8.0)
|
|
344
|
+
daemons (~> 1.0, >= 1.0.9)
|
|
345
|
+
eventmachine (~> 1.0, >= 1.0.4)
|
|
346
|
+
rack (>= 1, < 3)
|
|
347
|
+
thor (1.0.1)
|
|
348
|
+
thread_safe (0.3.6)
|
|
349
|
+
tomlrb (1.3.0)
|
|
350
|
+
treetop (1.6.11)
|
|
351
|
+
polyglot (~> 0.3)
|
|
352
|
+
tzinfo (1.2.8)
|
|
353
|
+
thread_safe (~> 0.1)
|
|
354
|
+
unicode-display_width (1.7.0)
|
|
355
|
+
uuidtools (2.1.5)
|
|
356
|
+
winrm (2.3.5)
|
|
357
|
+
builder (>= 2.1.2)
|
|
358
|
+
erubi (~> 1.8)
|
|
359
|
+
gssapi (~> 1.2)
|
|
360
|
+
gyoku (~> 1.0)
|
|
361
|
+
httpclient (~> 2.2, >= 2.2.0.2)
|
|
362
|
+
logging (>= 1.6.1, < 3.0)
|
|
363
|
+
nori (~> 2.0)
|
|
364
|
+
rubyntlm (~> 0.6.0, >= 0.6.1)
|
|
365
|
+
winrm-elevated (1.2.3)
|
|
366
|
+
erubi (~> 1.8)
|
|
367
|
+
winrm (~> 2.0)
|
|
368
|
+
winrm-fs (~> 1.0)
|
|
369
|
+
winrm-fs (1.3.5)
|
|
370
|
+
erubi (~> 1.8)
|
|
371
|
+
logging (>= 1.6.1, < 3.0)
|
|
372
|
+
rubyzip (~> 2.0)
|
|
373
|
+
winrm (~> 2.0)
|
|
374
|
+
wmi-lite (1.0.5)
|
|
375
|
+
yard (0.9.25)
|
|
376
|
+
zeitwerk (2.4.2)
|
|
377
|
+
|
|
378
|
+
PLATFORMS
|
|
379
|
+
ruby
|
|
380
|
+
|
|
381
|
+
DEPENDENCIES
|
|
382
|
+
berkshelf (~> 7.0)
|
|
383
|
+
chef-dk (~> 3.2.30)
|
|
384
|
+
chef-sugar
|
|
385
|
+
chef-vault (~> 3.4)
|
|
386
|
+
cloud-mu!
|
|
387
|
+
ffi-libarchive
|
|
388
|
+
foodcritic (~> 14.1.0)
|
|
389
|
+
knife-windows!
|
|
390
|
+
mysql2 (<= 0.5.2)
|
|
391
|
+
ruby-wmi
|
|
392
|
+
|
|
393
|
+
BUNDLED WITH
|
|
394
|
+
2.1.4
|
|
File without changes
|
|
File without changes
|
data/extras/clean-stock-amis
CHANGED
|
@@ -23,7 +23,7 @@ $opts = Optimist::options do
|
|
|
23
23
|
#{$0} [-c credentials] [-i imagename]
|
|
24
24
|
EOS
|
|
25
25
|
opt :credentials, "Use these AWS credentials from mu.yaml instead of the default set", :required => false, :type => :string
|
|
26
|
-
opt :image, "Purge a specific image, instead of just
|
|
26
|
+
opt :image, "Purge a specific image, instead of just scrubbing old ones", :required => false, :type => :string
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
filters = [
|
|
@@ -33,12 +33,14 @@ filters = [
|
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
|
|
36
|
+
in_use = MU::Cloud.getStockImage("AWS").values.flatten.map { |h| h.values }.flatten
|
|
36
37
|
|
|
37
38
|
MU::Cloud::AWS.listRegions.each { | r|
|
|
38
39
|
images = MU::Cloud::AWS.ec2(region: r, credentials: $opts[:credentials]).describe_images(
|
|
39
40
|
filters: filters + [{ "name" => "state", "values" => ["available"]}]
|
|
40
41
|
).images
|
|
41
42
|
images.each { |ami|
|
|
43
|
+
next if in_use.include?(ami)
|
|
42
44
|
if ($opts[:image] and ami.name == $opts[:image]) or
|
|
43
45
|
((DateTime.now.to_time - DateTime.parse(ami.creation_date).to_time) > 15552000 and ami.name.match(/^MU-(PROD|DEV)/))
|
|
44
46
|
snaps = []
|
|
@@ -52,9 +54,15 @@ MU::Cloud::AWS.listRegions.each { | r|
|
|
|
52
54
|
MU::Cloud::AWS.ec2(region: r, credentials: $opts[:credentials]).deregister_image(image_id: ami.image_id)
|
|
53
55
|
rescue Aws::EC2::Errors::InvalidAMIIDUnavailable
|
|
54
56
|
end
|
|
55
|
-
|
|
57
|
+
snaps.each { |snap_id|
|
|
58
|
+
begin
|
|
56
59
|
MU::Cloud::AWS.ec2(region: r, credentials: $opts[:credentials]).delete_snapshot(snapshot_id: snap_id)
|
|
57
|
-
|
|
60
|
+
rescue Aws::EC2::Errors::InvalidSnapshotInUse
|
|
61
|
+
sleep 5
|
|
62
|
+
retry
|
|
63
|
+
rescue Aws::EC2::Errors::InvalidSnapshotNotFound
|
|
64
|
+
end
|
|
65
|
+
}
|
|
58
66
|
end
|
|
59
67
|
}
|
|
60
68
|
}
|
|
@@ -63,6 +63,7 @@ end
|
|
|
63
63
|
now = DateTime.now
|
|
64
64
|
|
|
65
65
|
exitcode = 0
|
|
66
|
+
succeeded = 0
|
|
66
67
|
$opts[:clouds].each { |cloud|
|
|
67
68
|
current_images = MU::Cloud.getStockImage(cloud, fail_hard: true)
|
|
68
69
|
$opts[:platforms].each { |platform|
|
|
@@ -114,6 +115,7 @@ $opts[:clouds].each { |cloud|
|
|
|
114
115
|
# Scrub any loose metadata left over from our image deployment. It's
|
|
115
116
|
# ok, this won't touch the images we just made.
|
|
116
117
|
MU::Cleanup.run(deployer.mommacat.deploy_id, skipsnapshots: true, verbosity: MU::Logger::QUIET)
|
|
118
|
+
succeeded += 1
|
|
117
119
|
rescue Exception => e
|
|
118
120
|
MU.log e.message, MU::ERR
|
|
119
121
|
exitcode = 1
|
|
@@ -122,10 +124,11 @@ $opts[:clouds].each { |cloud|
|
|
|
122
124
|
end
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
if
|
|
127
|
+
if !$opts[:dryrun] and succeeded > 0
|
|
126
128
|
puts current_images.to_yaml
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
if available_clouds.keys.include?("AWS")
|
|
130
|
+
MU::Cloud::AWS::Bucket.upload($opts[:upload_to]+"/"+cloud+".yaml", data: current_images.to_yaml, credentials: $opts[:aws_creds], acl: "public-read")
|
|
131
|
+
end
|
|
129
132
|
end
|
|
130
133
|
}
|
|
131
134
|
|