cloud-mu 2.0.0.pre.alpha9 → 2.0.0.pre.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/Berksfile.lock +1 -1
  3. data/README.md +2 -0
  4. data/bin/mu-configure +2 -58
  5. data/bin/mu-gen-docs +29 -4
  6. data/bin/mu-load-config.rb +0 -1
  7. data/bin/mu-user-manage +4 -0
  8. data/cloud-mu.gemspec +2 -2
  9. data/cookbooks/mu-master/recipes/default.rb +3 -4
  10. data/cookbooks/mu-master/recipes/init.rb +3 -3
  11. data/cookbooks/mu-tools/files/default/Mu_CA.pem +15 -15
  12. data/cookbooks/mu-tools/libraries/helper.rb +1 -1
  13. data/cookbooks/mu-tools/recipes/eks.rb +3 -3
  14. data/cookbooks/mu-tools/recipes/set_local_fw.rb +1 -1
  15. data/cookbooks/mu-utility/recipes/remi.rb +1 -1
  16. data/cookbooks/nagios/libraries/base.rb +4 -4
  17. data/cookbooks/nagios/libraries/contact.rb +1 -1
  18. data/cookbooks/nagios/libraries/contactgroup.rb +1 -1
  19. data/cookbooks/nagios/libraries/host.rb +2 -2
  20. data/cookbooks/nagios/libraries/hostdependency.rb +3 -3
  21. data/cookbooks/nagios/libraries/hostescalation.rb +3 -3
  22. data/cookbooks/nagios/libraries/hostgroup.rb +2 -2
  23. data/cookbooks/nagios/libraries/nagios.rb +5 -5
  24. data/cookbooks/nagios/libraries/service.rb +3 -3
  25. data/cookbooks/nagios/libraries/servicedependency.rb +2 -2
  26. data/cookbooks/nagios/libraries/serviceescalation.rb +2 -2
  27. data/cookbooks/nagios/libraries/servicegroup.rb +2 -2
  28. data/cookbooks/nagios/libraries/timeperiod.rb +1 -1
  29. data/install/installer +1 -1
  30. data/modules/mu/cleanup.rb +1 -1
  31. data/modules/mu/cloud.rb +43 -1
  32. data/modules/mu/clouds/aws.rb +55 -35
  33. data/modules/mu/clouds/aws/bucket.rb +287 -0
  34. data/modules/mu/clouds/aws/database.rb +65 -11
  35. data/modules/mu/clouds/aws/endpoint.rb +592 -0
  36. data/modules/mu/clouds/aws/firewall_rule.rb +4 -0
  37. data/modules/mu/clouds/aws/function.rb +138 -93
  38. data/modules/mu/clouds/aws/nosqldb.rb +387 -0
  39. data/modules/mu/clouds/aws/role.rb +1 -1
  40. data/modules/mu/clouds/aws/server.rb +5 -5
  41. data/modules/mu/clouds/aws/server_pool.rb +60 -3
  42. data/modules/mu/clouds/azure.rb +0 -1
  43. data/modules/mu/clouds/google.rb +34 -12
  44. data/modules/mu/clouds/google/bucket.rb +179 -0
  45. data/modules/mu/config.rb +1 -1
  46. data/modules/mu/config/bucket.rb +69 -0
  47. data/modules/mu/config/bucket.yml +10 -0
  48. data/modules/mu/config/database.rb +1 -1
  49. data/modules/mu/config/endpoint.rb +71 -0
  50. data/modules/mu/config/function.rb +6 -0
  51. data/modules/mu/config/nosqldb.rb +49 -0
  52. data/modules/mu/config/nosqldb.yml +44 -0
  53. data/modules/mu/config/notifier.yml +2 -2
  54. data/modules/mu/config/vpc.rb +0 -1
  55. data/modules/mu/defaults/amazon_images.yaml +32 -30
  56. data/modules/mu/groomers/chef.rb +1 -1
  57. data/modules/mu/kittens.rb +2430 -1511
  58. data/modules/mu/master/ldap.rb +1 -1
  59. data/modules/tests/super_complex_bok.yml +7 -0
  60. data/modules/tests/super_simple_bok.yml +7 -0
  61. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 790ce8fae27d10b6c380d4f4e47d439e18af712d4ef4d4c6121f6344ee7e3cc3
4
- data.tar.gz: 2806098d099298a14ac361e6fcca0eff92bd2b3c22c07d78a7fd922bbc2fda28
3
+ metadata.gz: 27ff913665cbcb6838ce2e1b2b521307b1cc5061daf2ac576a240aca3eb29b19
4
+ data.tar.gz: 8ab03cef1d7c16b43f9c609b7789801b5e27ac4cc48ae3f53e603d530bbe7016
5
5
  SHA512:
6
- metadata.gz: 2f59448f52ce45d0570c8ec2f3005bca682b89ff9772ed26b3f4e16f0c04ea9481b05c4c0509be350cfd44e8baba5bb2e70f4faa7a5b1d3d96ba36f7d1a9e45d
7
- data.tar.gz: 7008b9a63c3eae1efd630d698587da27b244f846e8b88e871d10dbdcef31fe2bf4349c3c046e30b30ffbf28f42e1db7c24ab5fdb38d7cd27966ad3aaa4a028cc
6
+ metadata.gz: 3df2ed93f9f72ed6afae31023d0e06123705628b46f25e59cf9a7958ed398deb014470ecc9a0947b109b3b5c112fed2bdd1932568e488751cede8703ff0f8408
7
+ data.tar.gz: b075b39cc903276cee6e27d2d3969072d743a96f39e9bd77b3130e91cc19f822de5399e8b164dc84ebeebc47a87b67586bc2c4de92cc18d99d2b0aa5a6af1c56
data/Berksfile.lock CHANGED
@@ -183,7 +183,7 @@ GRAPH
183
183
  yum-epel (>= 0.0.0)
184
184
  rubyzip (1.3.1)
185
185
  poise (~> 2.2)
186
- runit (4.3.1)
186
+ runit (5.0.1)
187
187
  packagecloud (>= 0.0.0)
188
188
  yum-epel (>= 0.0.0)
189
189
  s3fs (3.0.1)
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  mu -- Cloudamatic Automation Tooling
2
2
  ===
3
3
  [![pipeline status](https://gitlab.com/cloudamatic/mu/badges/master/pipeline.svg)](https://gitlab.com/cloudamatic/mu/commits/master)
4
+ [![Gem Version](https://badge.fury.io/rb/cloud-mu.svg)](https://badge.fury.io/rb/cloud-mu)
4
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/dd4e5d867890336accd1/maintainability)](https://codeclimate.com/github/cloudamatic/mu/maintainability)
6
+ [![Inline docs](http://inch-ci.org/github/cloudamatic/mu.svg?branch=master)](http://inch-ci.org/github/cloudamatic/mu)
5
7
  [![coverage report](https://gitlab.com/cloudamatic/mu/badges/master/coverage.svg)](https://gitlab.com/cloudamatic/mu/commits/master)
6
8
 
7
9
  # About mu
data/bin/mu-configure CHANGED
@@ -105,31 +105,6 @@ $CONFIGURABLES = {
105
105
  "desc" => "If set to true, Mu will be allowed to modify routing and peering behavior of VPCs which it did not create, but for which it has permissions.",
106
106
  "boolean" => true
107
107
  },
108
- "jenkins" => {
109
- "title" => "Jenkins Continuous Integration",
110
- "rootonly" => true,
111
- "subtree" => {
112
- "enable" => {
113
- "title" => "Enable Jenkins",
114
- "desc" => "Enable Jenkins, with UI web-accessible at /jenkins.",
115
- "default" => false,
116
- "boolean" => true,
117
- "changes" => ["chefrun"]
118
- },
119
- "admin_email" => {
120
- "title" => "Jenkins Admin Email",
121
- "desc" => "Administative contact email for Jenkins",
122
- "pattern" => /\A([\w+\-].?)+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i,
123
- "changes" => ["chefrun"]
124
- },
125
- "admin_user" => {
126
- "title" => "Jenkins admin username",
127
- "desc" => "The name of a Mu user who will serve as the Jenkins admin.",
128
- "default" => "jenkins",
129
- "changes" => ["chefrun"]
130
- }
131
- }
132
- },
133
108
  "aws" => {
134
109
  "title" => "Amazon Web Services",
135
110
  "named_subentries" => true,
@@ -589,9 +564,6 @@ def setDefaults
589
564
  $CONFIGURABLES["public_address"]["default"] = ips.first
590
565
  $CONFIGURABLES["hostname"]["default"] = Socket.gethostname
591
566
  $CONFIGURABLES["banner"]["default"] = "Mu Master at #{$CONFIGURABLES["public_address"]["default"]}"
592
- if $CONFIGURABLES["mu_admin_email"]["value"]
593
- $CONFIGURABLES["jenkins"]["subtree"]["admin_email"]["default"] = $CONFIGURABLES["mu_admin_email"]["value"]
594
- end
595
567
  if $IN_AWS
596
568
  # XXX move this crap to a callback hook for puttering around in the AWS submenu
597
569
  aws = JSON.parse(open("http://169.254.169.254/latest/dynamic/instance-identity/document").read)
@@ -977,8 +949,6 @@ def menu(tree = $CONFIGURABLES, map = $MENU_MAP, submenu_name = nil, in_use_name
977
949
  # $CONFIGURABLES["google"]["subtree"]["log_bucket_name"]["default"] = newval
978
950
  elsif map[answer]['title'] == "Public Address"
979
951
  $CONFIGURABLES["banner"]["default"] = "Mu Master at #{newval}"
980
- elsif map[answer]['title'] == "Mu Admin Email"
981
- $CONFIGURABLES["jenkins"]["subtree"]["admin_email"]["default"] = newval
982
952
  end
983
953
  changed = true
984
954
  puts ""
@@ -1006,8 +976,8 @@ else
1006
976
  end
1007
977
 
1008
978
  if AMROOT
1009
- require File.realpath(File.expand_path(File.dirname(__FILE__)+"/mu-load-config.rb"))
1010
979
  newcfg = cloneHash($MU_CFG)
980
+ require File.realpath(File.expand_path(File.dirname(__FILE__)+"/mu-load-config.rb"))
1011
981
  newcfg['multiuser'] = true
1012
982
  saveMuConfig(newcfg)
1013
983
  $MU_CFG = loadMuConfig($MU_SET_DEFAULTS)
@@ -1293,37 +1263,11 @@ if $MU_CFG['ldap']['type'] == "389 Directory Services"
1293
1263
  end
1294
1264
  end
1295
1265
 
1296
- if $MU_CFG['jenkins'] and $MU_CFG['jenkins']['enable']
1297
- MU::Groomer::Chef.loadChefLib
1298
- chef_node = ::Chef::Node.load("MU-MASTER")
1299
- begin
1300
- data = MU::Groomer::Chef.getSecret(vault: "jenkins", item: "admin")
1301
- MU::Groomer::Chef.grantSecretAccess("MU-MASTER", "jenkins", "admin")
1302
- rescue MU::Groomer::Chef::MuNoSuchSecret
1303
- MU.log "Saving keys for Jenkins admin user '#{$MU_CFG['jenkins']['admin_user']}' into Vault jenkins:admin", MU::NOTICE
1304
- if !File.exists?("#{HOMEDIR}/.ssh/mu-jenkins-admin.pub") and !File.exists?("#{HOMEDIR}/.ssh/mu-jenkins-admin.pub")
1305
- system("/usr/bin/ssh-keygen -N '' -f #{HOMEDIR}/.ssh/mu-jenkins-admin")
1306
- end
1307
- public_key = File.read("#{HOMEDIR}/.ssh/mu-jenkins-admin.pub").chomp
1308
- private_key = File.read("#{HOMEDIR}/.ssh/mu-jenkins-admin").chomp
1309
- MU::Groomer::Chef.saveSecret(
1310
- vault: "jenkins",
1311
- item: "admin",
1312
- data: {
1313
- "username": $MU_CFG['jenkins']['admin_user'],
1314
- "private_key": private_key,
1315
- "public_key": public_key
1316
- }
1317
- )
1318
- end
1319
- end
1320
-
1321
1266
  # Figure out if our run list is dumb
1322
1267
  MU.log "Verifying MU-MASTER's Chef run list", MU::NOTICE
1323
1268
  MU::Groomer::Chef.loadChefLib
1324
1269
  chef_node = ::Chef::Node.load("MU-MASTER")
1325
1270
  run_list = ["role[mu-master]"]
1326
- run_list << "role[mu-master-jenkins]" if $MU_CFG['jenkins'] and $MU_CFG['jenkins']['enable']
1327
1271
  run_list.concat($MU_CFG['master_runlist_extras']) if $MU_CFG['master_runlist_extras'].is_a?(Array)
1328
1272
  set_runlist = false
1329
1273
  run_list.each { |rl|
@@ -1382,7 +1326,7 @@ MU.log "Regenerating documentation in /var/www/html/docs"
1382
1326
 
1383
1327
  if $INITIALIZE
1384
1328
  MU.log "Setting initial password for admin user 'mu', for logging into Nagios and other built-in services.", MU::NOTICE
1385
- puts %x{#{MU_BASE}/lib/bin/mu-user-manage -g mu}
1329
+ puts %x{#{MU_BASE}/lib/bin/mu-user-manage -g mu -n "#{$MU_CFG['mu_admin_name']}"}
1386
1330
  MU.log "If Scratchpad web interface is not accessible, try the following:", MU::NOTICE
1387
1331
  puts "#{MU_BASE}/lib/bin/mu-user-manage -g --no-scratchpad mu".bold
1388
1332
  end
data/bin/mu-gen-docs CHANGED
@@ -26,11 +26,36 @@ require 'optimist'
26
26
  require 'json-schema'
27
27
  require File.realpath(File.expand_path(File.dirname(__FILE__)+"/mu-load-config.rb"))
28
28
  require 'mu'
29
- require 'yard'
30
29
 
31
- bindir = File.dirname(Gem.ruby)
30
+ ENV['PATH'] += ":"+File.dirname(Gem.ruby)
31
+
32
+ begin
33
+ MU.log "Looking up the system YARD"
34
+ yard = `which yard 2>&1`.chomp
35
+
36
+ if yard.include? "no yard in"
37
+ MU.log "No system YARD found. Trying YARD gem"
38
+ yard = File.dirname(Gem.ruby)+'/yard'
39
+ end
40
+
41
+ rescue
42
+ MU.log "Using the YARD gem"
43
+ yard = File.dirname(Gem.ruby)+'/yard'
44
+ end
45
+
46
+
32
47
 
33
48
  MU::Config.emitSchemaAsRuby
34
49
  MU.log "Generating YARD documentation in /var/www/html/docs (see http://#{$MU_CFG['public_address']}/docs/frames.html)"
35
- File.umask(0022)
36
- exec "cd #{MU.myRoot} && umask 0022 && env -i PATH=#{ENV['PATH']} HOME=#{ENV['HOME']} #{bindir}/yard doc modules -m markdown -o /var/www/html/docs && chcon -R -h -t httpd_sys_script_exec_t /var/www/html/ ; #{bindir}/yard stats --list-undoc modules"
50
+
51
+ File.umask 0022
52
+
53
+ Dir.chdir(MU.myRoot) do
54
+ #exec "env -i PATH=#{ENV['PATH']} HOME=#{ENV['HOME']} #{yard} doc modules -m markdown -o /var/www/html/docs" THIS DOESNT WORK IN CICD
55
+
56
+ system(%Q{#{yard} doc modules -m markdown -o /var/www/html/docs})
57
+
58
+ system(%Q{chcon -R -h -t httpd_sys_script_exec_t /var/www/html/})
59
+
60
+ system(%Q{#{yard} stats --list-undoc modules})
61
+ end
@@ -75,7 +75,6 @@ def loadMuConfig(default_cfg_overrides = nil)
75
75
  "chain" => "/opt/mu/var/ssl/Mu_CA.pem"
76
76
  },
77
77
  "mu_admin_email" => "root@localhost",
78
- "jenkins_admin_email" => "root@localhost",
79
78
  "allow_invade_foreign_vpcs" => false,
80
79
  "mu_repo" => "cloudamatic/mu.git",
81
80
  "public_address" => Socket.gethostname || "localhost",
data/bin/mu-user-manage CHANGED
@@ -245,6 +245,10 @@ else
245
245
  exit 1 if bail
246
246
  end
247
247
 
248
+ if !$cur_users[$username]['realname'] or $cur_users[$username]['realname'].empty?
249
+ $cur_users[$username]['realname'] = $username
250
+ end
251
+
248
252
  if !MU::Master.manageUser(
249
253
  $username,
250
254
  chef_username: $cur_users[$username]['chef_user'],
data/cloud-mu.gemspec CHANGED
@@ -17,8 +17,8 @@ end
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = 'cloud-mu'
20
- s.version = '2.0.0-alpha9'
21
- s.date = '2019-02-14'
20
+ s.version = '2.0.0-beta1'
21
+ s.date = '2019-02-18'
22
22
  s.require_paths = ['modules']
23
23
  s.required_ruby_version = '>= 2.4'
24
24
  s.summary = "The eGTLabs Mu toolkit for unified cloud deployments"
@@ -239,6 +239,7 @@ if !node['update_nagios_only']
239
239
  node.normal['postfix']['main']['inet_interfaces'] = "all"
240
240
  node.save
241
241
 
242
+ mubranch=`cd #{MU_BASE}/lib && git rev-parse --abbrev-ref HEAD` # ~FC048
242
243
 
243
244
  file "/var/www/html/index.html" do
244
245
  owner "apache"
@@ -254,7 +255,7 @@ if !node['update_nagios_only']
254
255
  <a href='https://#{MU.mu_public_addr}/jenkins/'>Jenkins interface GUI</a>
255
256
  </p>
256
257
  <p>
257
- <a href='http://#{MU.mu_public_addr}/docs/frames.html'>Mu API documentation</a>
258
+ <a href='#{(mubranch.nil? or mubranch == "master" or mubranch.match(/detached from/)) ? "https://cloudamatic.gitlab.io/mu/" : "http://"+MU.mu_public_addr+"/docs"}'>Mu API documentation</a>
258
259
  </p>
259
260
  "
260
261
  end
@@ -430,9 +431,7 @@ if !node['update_nagios_only']
430
431
 
431
432
  Nagios monitoring GUI: https://#{MU.mu_public_addr}/nagios/
432
433
 
433
- Jenkins interface GUI: https://#{MU.mu_public_addr}/jenkins/
434
-
435
- Mu API documentation: http://#{MU.mu_public_addr}/docs/frames.html
434
+ Mu API documentation: #{(mubranch.nil? or mubranch == "master" or mubranch.match(/detached from/)) ? "https://cloudamatic.gitlab.io/mu/" : "http://"+MU.mu_public_addr+"/docs"}
436
435
 
437
436
  Mu metadata are stored in #{MU.mainDataDir}
438
437
 
@@ -39,7 +39,7 @@ CHEF_SERVER_VERSION="12.17.15-1"
39
39
  CHEF_CLIENT_VERSION="14.4.56"
40
40
  KNIFE_WINDOWS="1.9.0"
41
41
  MU_BASE="/opt/mu"
42
- MU_BRANCH="Azure_you_want_azure" # GIT HOOK EDITABLE DO NOT TOUCH
42
+ MU_BRANCH="master" # GIT HOOK EDITABLE DO NOT TOUCH
43
43
  realbranch=`cd #{MU_BASE}/lib && git rev-parse --abbrev-ref HEAD` # ~FC048
44
44
 
45
45
  if ENV.key?('MU_BRANCH')
@@ -174,7 +174,7 @@ if platform_family?("rhel")
174
174
 
175
175
 
176
176
  if elversion < 6 or elversion >= 8
177
- raise "Mu Masters on RHEL-family hosts must be equivalent to RHEL6 or RHEL7 (got #{elversion.to_s})"
177
+ raise "Mu Masters on RHEL-family hosts must be equivalent to RHEL6 or RHEL7 (got #{elversion})"
178
178
 
179
179
  # RHEL6, CentOS6, Amazon Linux
180
180
  elsif elversion < 7
@@ -185,7 +185,7 @@ if platform_family?("rhel")
185
185
 
186
186
  # RHEL7, CentOS7
187
187
  elsif elversion < 8
188
- basepackages.concat(["libX11", "tcl", "tk", "mariadb-devel"])
188
+ basepackages.concat(["libX11", "tcl", "tk", "mariadb-devel", "cryptsetup"])
189
189
  rpms["ruby25"] = "https://s3.amazonaws.com/cloudamatic/muby-2.5.3-1.el7.x86_64.rpm"
190
190
  removepackages = ["nagios", "firewalld"]
191
191
  end
@@ -1,8 +1,8 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIF2zCCA8OgAwIBAgIJAJSp1wu4cHj9MA0GCSqGSIb3DQEBDQUAMF0xFjAUBgNV
2
+ MIIF2zCCA8OgAwIBAgIJAOx2Krw2HGFkMA0GCSqGSIb3DQEBDQUAMF0xFjAUBgNV
3
3
  BAMMDTU0LjE3NS44Ni4xOTQxIDAeBgNVBAsMF011IFNlcnZlciA1NC4xNzUuODYu
4
- MTk0MRQwEgYDVQQKDAtlR2xvYmFsVGVjaDELMAkGA1UEBhMCVVMwHhcNMTkwMTIy
5
- MTUzMjM4WhcNMjExMTExMTUzMjM4WjBdMRYwFAYDVQQDDA01NC4xNzUuODYuMTk0
4
+ MTk0MRQwEgYDVQQKDAtlR2xvYmFsVGVjaDELMAkGA1UEBhMCVVMwHhcNMTkwMjI3
5
+ MTQ0ODA2WhcNMjExMjE3MTQ0ODA2WjBdMRYwFAYDVQQDDA01NC4xNzUuODYuMTk0
6
6
  MSAwHgYDVQQLDBdNdSBTZXJ2ZXIgNTQuMTc1Ljg2LjE5NDEUMBIGA1UECgwLZUds
7
7
  b2JhbFRlY2gxCzAJBgNVBAYTAlVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
8
8
  CgKCAgEAo7rntOFj/WPNvh00SN55aJBusppsY9arq7QF5gt/9+cBPsjcXn7jJMu0
@@ -19,16 +19,16 @@ e4Q3VnxhRfmkS1NqEzIvPabVLg9qvN419cubpE6HAtBJw/f3ocUCAwEAAaOBnTCB
19
19
  mjBKBgNVHREEQzBBhwQ2r1bCgglsb2NhbGhvc3SHBH8AAAGCGXN0YW5nZS1tdS1k
20
20
  ZXYucGxhdGZvcm0tbXWCDXN0YW5nZS1tdS1kZXYwHQYDVR0OBBYEFK/EmtGebCwd
21
21
  5QpM8y/3EKdYNVbcMB8GA1UdIwQYMBaAFK/EmtGebCwd5QpM8y/3EKdYNVbcMAwG
22
- A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQENBQADggIBAEQ1l3JqlK7hQHhhA7Y4Odhk
23
- mGsEJ8m1Kdb6wq9/hMAAOhzFPtzIzxPaDUuN29nGT/d4urTdJ+fSa7f8uhFyzKEL
24
- retbsal0n4MFD7Iu+QopYBSTsS3w7y9a4HGj2AW6IMrYjWFBtl1QjRMKPymwTV6Y
25
- ngjfJdJy4ySUP1FTl7hG1LdN+My6Q2ykQznyY/g51RzSNzmreWkK9Qfy/bk7G8ss
26
- vDPQOqocwQE/5GoO4WqDn+6IFw1bgs+rPt897MOv0YjLZR3B5Q8SYivp+7CVvLZT
27
- hKhIHL41k3H8R7khmV+Ak6ok9k+hCnT6pWC40g0jMyuy/HnlfeXcz9betiNm0Vhg
28
- 98pxFjISd7GaSmzqH4L+NbNshgRBhgTA+qm5Nu7hETf5b4tV1gBi0MA/CzpD3cq5
29
- MadyWDkDnbGnSPqrLHvZwKjvDwUhPYw+6jYU9ejkG8I3G8ntmo4j7el+bYNDa1Yu
30
- o60AIxVn2LpDIPICibf2cpspOqxQMB0fClAttajklXCwZ73TomQP/9TegjMeLJMl
31
- p2KreRF3lvflajjrV7KHQ6tm8t9NIqljd3q5KW1RqatRwyMQUBWo8i8DlD6HQ+w0
32
- gipxlcwMUqjVEIQyUtCNax6RDpysdOsB6uPPkUxb825bRwOWnAHPVCTc/HaTVzmA
33
- FTNwHY0pyDGREcu+cb/A
22
+ A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQENBQADggIBACrhE0wT4DBanIUiWNU74e5k
23
+ tH4DC2vOfdPuF7AOFpDDmvR7HHoztWMyV7+KjrsQy/khAWNDq+JJ9Ya1E7mo9Jhy
24
+ w3Ty9xM1FfA39D1dXoGFhfG++HbQSqVXvVWmwa4M/9VmL5YgqCkeEiRf8WQ7TpjT
25
+ ldQUovcIICRAkeZG/lqjHJ/jAADIepCbsOeP0Gs2T0jdLmN2jKkcwFZkqpEi8PQB
26
+ wyhtJvUyU/B7xVBI5etrqmwxApg5RmkmnnsBXAxtSnJP1SvLv0o1IQZfOKzR9Ivn
27
+ IAJaXAp9q2AecHMQhu6TMpNCgifLKcwsGBlmrL+6wgU6+AedWYl80iewzk2kYrEw
28
+ MpIRETKBEOOsIo0jaNzdK/SyxdBtol7T9s6cwGXSr2n06Vtqvwc5d94gqgZyGBgg
29
+ GYnBVfVvRTxGP+2rHry1DRPLlr4/pwzo1XkCPb4QViaYL3jtuQUrj3a6EZZJnS4V
30
+ c9U7RFY8t9uGuIhHN8ZzeZyF0TaAwsMJtkvriRt2rK5BoBn5n6273QOey1YmqnfW
31
+ Xh919XQbuEha1XMG0xRD2RYURJjfSFV81humvQ2vSfZZqZplieXI98TOStRN6cmn
32
+ RE0Zx1kpQ5VVsukYCvQYZ1FzR2PmtOum4IrWQJRWdK8k7hrW+b9YzFDlcimf4Yiv
33
+ uaxTeq345Wu1zn+Pj9AI
34
34
  -----END CERTIFICATE-----
@@ -242,7 +242,7 @@ module Mutools
242
242
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE # XXX this sucks
243
243
  response = http.request(req)
244
244
  if response.code != "200"
245
- Chef::Log.error("Got #{response.code.to_s} back from #{uri} on #{action} => #{arg}")
245
+ Chef::Log.error("Got #{response.code} back from #{uri} on #{action} => #{arg}")
246
246
  end
247
247
  rescue EOFError => e
248
248
  # Sometimes deployment metadata is incomplete and missing a
@@ -66,7 +66,7 @@ EOH
66
66
  package "kubelet"
67
67
  package "kubectl"
68
68
  else
69
- Chef::Log.info("I don't know how to turn this #{node['platform']} AMI (#{node['platform_version'].to_s}) into a Kubernetes worker, hopefully it's the official, pre-configured AMI")
69
+ Chef::Log.info("I don't know how to turn this #{node['platform']} AMI (#{node['platform_version']}) into a Kubernetes worker, hopefully it's the official, pre-configured AMI")
70
70
  end
71
71
 
72
72
  service "docker" do
@@ -137,8 +137,8 @@ EOH
137
137
 
138
138
  opento.uniq.each { |src|
139
139
  [:tcp, :udp, :icmp].each { |proto|
140
- execute "iptables -I INPUT -p #{proto.to_s} -s #{src}" do
141
- not_if "iptables -L -n | tr -s ' ' | grep -- '#{proto.to_s} -- #{src.sub(/\/32$/, "")}' > /dev/null"
140
+ execute "iptables -I INPUT -p #{proto} -s #{src}" do
141
+ not_if "iptables -L -n | tr -s ' ' | grep -- '#{proto} -- #{src.sub(/\/32$/, "")}' > /dev/null"
142
142
  end
143
143
  }
144
144
  }
@@ -48,7 +48,7 @@ when platform_family?('rhel')
48
48
 
49
49
  opento.uniq.each { |src|
50
50
  [:tcp, :udp, :icmp].each { |proto|
51
- firewall_rule "allow all #{src} #{proto.to_s} traffic" do
51
+ firewall_rule "allow all #{src} #{proto} traffic" do
52
52
  source src
53
53
  protocol proto
54
54
  end
@@ -26,7 +26,7 @@ case node['platform']
26
26
 
27
27
  remirepo=yum_repository "remi" do
28
28
  description "Les RPM de Remi"
29
- mirrorlist "http://rpms.famillecollet.com/enterprise/#{node['platform_version'].to_i.to_s}/remi/mirror"
29
+ mirrorlist "http://rpms.famillecollet.com/enterprise/#{node['platform_version'].to_i}/remi/mirror"
30
30
  enabled false
31
31
  gpgkey "http://rpms.famillecollet.com/RPM-GPG-KEY-remi"
32
32
  if node[['cap_global_compile_run']] then
@@ -127,7 +127,7 @@ class Nagios
127
127
  check_use_and_name(Nagios.instance.default_timeperiod)
128
128
  end
129
129
  end
130
- # rubocop:enable MethodLength
130
+
131
131
 
132
132
  def get_commands(obj)
133
133
  obj.map(&:to_s).join(',')
@@ -197,7 +197,7 @@ class Nagios
197
197
  end
198
198
  members
199
199
  end
200
- # rubocop:enable MethodLength
200
+
201
201
 
202
202
  def get_timeperiod(obj)
203
203
  return nil if obj.nil?
@@ -263,7 +263,7 @@ class Nagios
263
263
  end
264
264
  commands
265
265
  end
266
- # rubocop:enable MethodLength
266
+
267
267
 
268
268
  def hostname(name)
269
269
  if Nagios.instance.normalize_hostname
@@ -302,7 +302,7 @@ class Nagios
302
302
  n.push(self) if remote
303
303
  end
304
304
  end
305
- # rubocop:enable MethodLength
305
+
306
306
 
307
307
  def update_dependency_members(hash, option, object)
308
308
  return if blank?(hash) || hash[option].nil?
@@ -119,7 +119,7 @@ class Nagios
119
119
  end
120
120
  end
121
121
  end
122
- # rubocop:enable MethodLength
122
+
123
123
 
124
124
  def service_notification_commands
125
125
  get_commands(@service_notification_commands)
@@ -84,7 +84,7 @@ class Nagios
84
84
  end
85
85
  end
86
86
  end
87
- # rubocop:enable MethodLength
87
+
88
88
 
89
89
  def to_s
90
90
  contactgroup_name
@@ -207,7 +207,7 @@ class Nagios
207
207
  end
208
208
  end
209
209
  end
210
- # rubocop:enable MethodLength
210
+
211
211
 
212
212
  def self.create(name)
213
213
  Nagios.instance.find(Nagios::Host.new(name))
@@ -399,7 +399,7 @@ class Nagios
399
399
  'register' => 'register',
400
400
  }
401
401
  end
402
- # rubocop:enable MethodLength
402
+
403
403
 
404
404
  def merge_members(obj)
405
405
  obj.parents.each { |m| push(m) }
@@ -126,7 +126,7 @@ class Nagios
126
126
  end
127
127
  end
128
128
  end
129
- # rubocop:enable MethodLength
129
+
130
130
 
131
131
  def self.create(name)
132
132
  Nagios.instance.find(Nagios::Hostdependency.new(name))
@@ -168,7 +168,7 @@ class Nagios
168
168
  'notification_failure_criteria' => 'notification_failure_criteria',
169
169
  }
170
170
  end
171
- # rubocop:enable MethodLength
171
+
172
172
 
173
173
  def merge_members(obj)
174
174
  obj.host_name.each { |m| push(m) }
@@ -178,4 +178,4 @@ class Nagios
178
178
  end
179
179
  end
180
180
  end
181
- # rubocop:enable ClassLength
181
+