cloud-mu 3.6.10 → 3.6.12

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.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/Berksfile +2 -3
  3. data/Berksfile.lock +11 -14
  4. data/bin/mu-aws-setup +16 -4
  5. data/bin/mu-configure +2 -1
  6. data/cloud-mu.gemspec +3 -3
  7. data/cookbooks/mu-firewall/Berksfile +1 -1
  8. data/cookbooks/mu-firewall/attributes/default.rb +2 -2
  9. data/cookbooks/mu-firewall/metadata.rb +3 -3
  10. data/cookbooks/mu-firewall/recipes/default.rb +11 -2
  11. data/cookbooks/mu-master/Berksfile +1 -1
  12. data/cookbooks/mu-master/attributes/default.rb +14 -1
  13. data/cookbooks/mu-master/files/default/389ds-perl/ASDialogs.pm +173 -0
  14. data/cookbooks/mu-master/files/default/389ds-perl/AdminMigration.pm +569 -0
  15. data/cookbooks/mu-master/files/default/389ds-perl/AdminServer.pm +952 -0
  16. data/cookbooks/mu-master/files/default/389ds-perl/AdminUtil.pm +983 -0
  17. data/cookbooks/mu-master/files/default/389ds-perl/ConfigDSDialogs.pm +449 -0
  18. data/cookbooks/mu-master/files/default/389ds-perl/DSCreate.pm +1551 -0
  19. data/cookbooks/mu-master/files/default/389ds-perl/DSDialogs.pm +233 -0
  20. data/cookbooks/mu-master/files/default/389ds-perl/DSMigration.pm +1175 -0
  21. data/cookbooks/mu-master/files/default/389ds-perl/DSUpdate.pm +534 -0
  22. data/cookbooks/mu-master/files/default/389ds-perl/DSUpdateDialogs.pm +152 -0
  23. data/cookbooks/mu-master/files/default/389ds-perl/DSUtil.pm +1710 -0
  24. data/cookbooks/mu-master/files/default/389ds-perl/Dialog.pm +249 -0
  25. data/cookbooks/mu-master/files/default/389ds-perl/DialogManager.pm +212 -0
  26. data/cookbooks/mu-master/files/default/389ds-perl/FileConn.pm +461 -0
  27. data/cookbooks/mu-master/files/default/389ds-perl/Inf.pm +268 -0
  28. data/cookbooks/mu-master/files/default/389ds-perl/Migration.pm +327 -0
  29. data/cookbooks/mu-master/files/default/389ds-perl/RegDSDialogs.pm +94 -0
  30. data/cookbooks/mu-master/files/default/389ds-perl/Resource.pm +137 -0
  31. data/cookbooks/mu-master/files/default/389ds-perl/Setup.pm +240 -0
  32. data/cookbooks/mu-master/files/default/389ds-perl/SetupDialogs.pm +243 -0
  33. data/cookbooks/mu-master/files/default/389ds-perl/SetupLog.pm +82 -0
  34. data/cookbooks/mu-master/files/default/setCertName.ldif +4 -0
  35. data/cookbooks/mu-master/libraries/mu.rb +2 -2
  36. data/cookbooks/mu-master/metadata.rb +1 -1
  37. data/cookbooks/mu-master/recipes/389ds.rb +71 -32
  38. data/cookbooks/mu-master/recipes/basepackages.rb +5 -0
  39. data/cookbooks/mu-master/recipes/default.rb +16 -5
  40. data/cookbooks/mu-master/recipes/init.rb +36 -3
  41. data/cookbooks/mu-master/recipes/ssl-certs.rb +6 -0
  42. data/cookbooks/mu-master/recipes/sssd.rb +85 -62
  43. data/cookbooks/mu-master/recipes/update_nagios_only.rb +7 -1
  44. data/cookbooks/mu-master/templates/default/389-directory-setup.inf.erb +11 -26
  45. data/cookbooks/mu-master/templates/default/sssd.conf.erb +18 -8
  46. data/cookbooks/mu-tools/files/default/Mu_CA.pem +33 -0
  47. data/cookbooks/mu-tools/metadata.rb +0 -1
  48. data/cookbooks/mu-tools/recipes/set_local_fw.rb +7 -1
  49. data/cookbooks/mu-tools/templates/amazon/sshd_config.erb +5 -1
  50. data/cookbooks/nagios/CHANGELOG.md +679 -0
  51. data/cookbooks/nagios/LICENSE +201 -0
  52. data/cookbooks/nagios/README.md +340 -0
  53. data/cookbooks/nagios/attributes/config.rb +163 -0
  54. data/cookbooks/nagios/attributes/default.rb +204 -0
  55. data/cookbooks/nagios/libraries/base.rb +311 -0
  56. data/cookbooks/nagios/libraries/command.rb +68 -0
  57. data/cookbooks/nagios/libraries/contact.rb +229 -0
  58. data/cookbooks/nagios/libraries/contactgroup.rb +111 -0
  59. data/cookbooks/{firewall/recipes/disable_firewall.rb → nagios/libraries/custom_option.rb} +20 -7
  60. data/cookbooks/nagios/libraries/data_bag_helper.rb +23 -0
  61. data/cookbooks/nagios/libraries/default.rb +90 -0
  62. data/cookbooks/nagios/libraries/helpers.rb +229 -0
  63. data/cookbooks/nagios/libraries/host.rb +410 -0
  64. data/cookbooks/nagios/libraries/hostdependency.rb +178 -0
  65. data/cookbooks/nagios/libraries/hostescalation.rb +170 -0
  66. data/cookbooks/nagios/libraries/hostgroup.rb +117 -0
  67. data/cookbooks/nagios/libraries/nagios.rb +277 -0
  68. data/cookbooks/nagios/libraries/resource.rb +59 -0
  69. data/cookbooks/nagios/libraries/service.rb +449 -0
  70. data/cookbooks/nagios/libraries/servicedependency.rb +213 -0
  71. data/cookbooks/nagios/libraries/serviceescalation.rb +193 -0
  72. data/cookbooks/nagios/libraries/servicegroup.rb +142 -0
  73. data/cookbooks/nagios/libraries/timeperiod.rb +159 -0
  74. data/cookbooks/nagios/libraries/users_helper.rb +54 -0
  75. data/cookbooks/nagios/metadata.json +44 -0
  76. data/cookbooks/nagios/metadata.rb +22 -0
  77. data/cookbooks/nagios/recipes/_load_databag_config.rb +153 -0
  78. data/cookbooks/nagios/recipes/_load_default_config.rb +241 -0
  79. data/cookbooks/nagios/recipes/apache.rb +114 -0
  80. data/cookbooks/nagios/recipes/default.rb +41 -0
  81. data/cookbooks/nagios/recipes/nginx.rb +114 -0
  82. data/cookbooks/nagios/recipes/pagerduty.rb +95 -0
  83. data/cookbooks/nagios/recipes/server.rb +182 -0
  84. data/cookbooks/nagios/recipes/server_package.rb +85 -0
  85. data/cookbooks/nagios/recipes/server_source.rb +137 -0
  86. data/cookbooks/nagios/resources/command.rb +34 -0
  87. data/cookbooks/nagios/resources/conf.rb +52 -0
  88. data/cookbooks/nagios/resources/contact.rb +34 -0
  89. data/cookbooks/nagios/resources/contactgroup.rb +35 -0
  90. data/cookbooks/nagios/resources/host.rb +35 -0
  91. data/cookbooks/nagios/resources/hostdependency.rb +35 -0
  92. data/cookbooks/nagios/resources/hostescalation.rb +36 -0
  93. data/cookbooks/nagios/resources/hostgroup.rb +35 -0
  94. data/cookbooks/nagios/resources/resource.rb +34 -0
  95. data/cookbooks/nagios/resources/service.rb +35 -0
  96. data/cookbooks/nagios/resources/servicedependency.rb +35 -0
  97. data/cookbooks/nagios/resources/serviceescalation.rb +35 -0
  98. data/cookbooks/nagios/resources/servicegroup.rb +35 -0
  99. data/cookbooks/nagios/resources/timeperiod.rb +35 -0
  100. data/cookbooks/nagios/templates/apache2.conf.erb +102 -0
  101. data/cookbooks/nagios/templates/cgi.cfg.erb +266 -0
  102. data/cookbooks/nagios/templates/commands.cfg.erb +13 -0
  103. data/cookbooks/nagios/templates/contacts.cfg.erb +37 -0
  104. data/cookbooks/nagios/templates/hostgroups.cfg.erb +25 -0
  105. data/cookbooks/nagios/templates/hosts.cfg.erb +15 -0
  106. data/cookbooks/nagios/templates/htpasswd.users.erb +6 -0
  107. data/cookbooks/nagios/templates/nagios.cfg.erb +22 -0
  108. data/cookbooks/nagios/templates/nginx.conf.erb +80 -0
  109. data/cookbooks/nagios/templates/pagerduty.cgi.erb +185 -0
  110. data/cookbooks/nagios/templates/resource.cfg.erb +27 -0
  111. data/cookbooks/nagios/templates/servicedependencies.cfg.erb +15 -0
  112. data/cookbooks/nagios/templates/servicegroups.cfg.erb +14 -0
  113. data/cookbooks/nagios/templates/services.cfg.erb +14 -0
  114. data/cookbooks/nagios/templates/spawn-fcgi.erb +10 -0
  115. data/cookbooks/nagios/templates/templates.cfg.erb +31 -0
  116. data/cookbooks/nagios/templates/timeperiods.cfg.erb +13 -0
  117. data/extras/platform_berksfile_base +3 -3
  118. data/extras/python_rpm/build.sh +4 -4
  119. data/extras/python_rpm/muthon.spec +2 -4
  120. data/extras/vault_tools/export_vaults.sh +11 -1
  121. data/install/installer +1 -1
  122. data/modules/mu/kittens.rb +27523 -0
  123. data/modules/mu/master/ldap.rb +48 -31
  124. data/modules/mu/master.rb +69 -0
  125. data/modules/mu/mu.yaml.rb +351 -0
  126. data/modules/mu/providers/aws/firewall_rule.rb +3 -1
  127. data/modules/mu/providers/aws.rb +11 -5
  128. data/modules/mu.rb +5 -4
  129. metadata +99 -68
  130. data/cookbooks/firewall/CHANGELOG.md +0 -488
  131. data/cookbooks/firewall/LICENSE +0 -202
  132. data/cookbooks/firewall/README.md +0 -366
  133. data/cookbooks/firewall/TODO.md +0 -6
  134. data/cookbooks/firewall/attributes/default.rb +0 -5
  135. data/cookbooks/firewall/attributes/firewalld.rb +0 -8
  136. data/cookbooks/firewall/attributes/iptables.rb +0 -17
  137. data/cookbooks/firewall/attributes/ufw.rb +0 -12
  138. data/cookbooks/firewall/attributes/windows.rb +0 -8
  139. data/cookbooks/firewall/libraries/helpers.rb +0 -105
  140. data/cookbooks/firewall/libraries/helpers_firewalld.rb +0 -116
  141. data/cookbooks/firewall/libraries/helpers_firewalld_dbus.rb +0 -72
  142. data/cookbooks/firewall/libraries/helpers_iptables.rb +0 -112
  143. data/cookbooks/firewall/libraries/helpers_nftables.rb +0 -170
  144. data/cookbooks/firewall/libraries/helpers_ufw.rb +0 -142
  145. data/cookbooks/firewall/libraries/helpers_windows.rb +0 -129
  146. data/cookbooks/firewall/libraries/provider_firewall_firewalld.rb +0 -179
  147. data/cookbooks/firewall/libraries/provider_firewall_iptables.rb +0 -171
  148. data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu.rb +0 -200
  149. data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu1404.rb +0 -200
  150. data/cookbooks/firewall/libraries/provider_firewall_rule.rb +0 -34
  151. data/cookbooks/firewall/libraries/provider_firewall_ufw.rb +0 -138
  152. data/cookbooks/firewall/libraries/provider_firewall_windows.rb +0 -126
  153. data/cookbooks/firewall/libraries/resource_firewall.rb +0 -26
  154. data/cookbooks/firewall/libraries/resource_firewall_rule.rb +0 -52
  155. data/cookbooks/firewall/metadata.json +0 -40
  156. data/cookbooks/firewall/metadata.rb +0 -15
  157. data/cookbooks/firewall/recipes/default.rb +0 -76
  158. data/cookbooks/firewall/recipes/firewalld.rb +0 -87
  159. data/cookbooks/firewall/resources/firewalld.rb +0 -28
  160. data/cookbooks/firewall/resources/firewalld_config.rb +0 -39
  161. data/cookbooks/firewall/resources/firewalld_helpers.rb +0 -106
  162. data/cookbooks/firewall/resources/firewalld_icmptype.rb +0 -88
  163. data/cookbooks/firewall/resources/firewalld_ipset.rb +0 -104
  164. data/cookbooks/firewall/resources/firewalld_policy.rb +0 -115
  165. data/cookbooks/firewall/resources/firewalld_service.rb +0 -98
  166. data/cookbooks/firewall/resources/firewalld_zone.rb +0 -118
  167. data/cookbooks/firewall/resources/nftables.rb +0 -71
  168. data/cookbooks/firewall/resources/nftables_rule.rb +0 -113
  169. data/cookbooks/firewall/templates/default/ufw/default.erb +0 -13
  170. /data/cookbooks/{firewall → nagios}/chefignore +0 -0
  171. /data/cookbooks/{firewall → nagios}/renovate.json +0 -0
@@ -0,0 +1,15 @@
1
+ # $Id: Generated by chef for node: <%= node['hostname'] %>
2
+ # ----------------------------------------------------------------
3
+ # NOTE: This file is controlled by chef templates!
4
+ # Do not edit or change this file but change the following:
5
+ # template file : servicedependencies.cfg.erb
6
+ # ----------------------------------------------------------------
7
+ # Service Dependency Definitions
8
+ # ----------------------------------------------------------------
9
+
10
+ <% Nagios.instance.servicedependencies.each do |key,dependency| -%>
11
+ <% if dependency.name.nil? # Skipping all the template servicedependencies %>
12
+ <%= dependency.definition %>
13
+
14
+ <% end %>
15
+ <% end -%>
@@ -0,0 +1,14 @@
1
+ # ----------------------------------------------------------------
2
+ # NOTE: This file is controlled by chef templates!
3
+ # Do not edit or change this file but change the following:
4
+ # template file : servicegroups.cfg.erb
5
+ # ----------------------------------------------------------------
6
+ # Servicegroup definitions
7
+ # ----------------------------------------------------------------
8
+
9
+ <% Nagios.instance.servicegroups.each do |key,servicegroup| -%>
10
+ <% if servicegroup.name.nil? # Skipping all the template servicegroups %>
11
+ <%= servicegroup.definition %>
12
+
13
+ <% end %>
14
+ <% end -%>
@@ -0,0 +1,14 @@
1
+ # ----------------------------------------------------------------
2
+ # NOTE: This file is controlled by chef templates!
3
+ # Do not edit or change this file but change the following:
4
+ # template file : services.cfg.erb
5
+ # ----------------------------------------------------------------
6
+ # Service definitions
7
+ # ----------------------------------------------------------------
8
+
9
+ <% Nagios.instance.services.each do |key,service| -%>
10
+ <% if service.name.nil? # Skipping all the template services %>
11
+ <%= service.definition %>
12
+
13
+ <% end %>
14
+ <% end -%>
@@ -0,0 +1,10 @@
1
+ #
2
+ # Generated by chef for node: <%= node['hostname'] %>
3
+ #
4
+ FCGI_SOCKET=<%= node['nagios']['server']['nginx_dispatch']['cgi_url'].split(':').last %>
5
+ ## FCGI_PROGRAM=/usr/bin/php-cgi
6
+ FCGI_PROGRAM=/usr/sbin/fcgiwrap
7
+ FCGI_USER=<%= @nginx_user %>
8
+ FCGI_GROUP=<%= @nginx_user %>
9
+ FCGI_EXTRA_OPTIONS="-M 0750"
10
+ OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"
@@ -0,0 +1,31 @@
1
+ # $Id: Generated by chef for node: <%= node['hostname'] %>
2
+ # ----------------------------------------------------------------
3
+ # NOTE: This file is controlled by chef templates!
4
+ # Do not edit or change this file but change the following:
5
+ # template file : templates.cfg.erb
6
+ # ----------------------------------------------------------------
7
+ # Contact definitions
8
+ # Host definitions
9
+ # Service definitions
10
+ # ----------------------------------------------------------------
11
+
12
+ <% Nagios.instance.contacts.each do |key,contact| -%>
13
+ <% if contact.name # Only get all the template contacts %>
14
+ <%= contact.definition %>
15
+
16
+ <% end %>
17
+ <% end -%>
18
+
19
+ <% Nagios.instance.hosts.each do |key,host| -%>
20
+ <% if host.name # Only get all the template hosts %>
21
+ <%= host.definition %>
22
+
23
+ <% end %>
24
+ <% end -%>
25
+
26
+ <% Nagios.instance.services.each do |key,service| -%>
27
+ <% if service.name # Only get all the template services %>
28
+ <%= service.definition %>
29
+
30
+ <% end %>
31
+ <% end -%>
@@ -0,0 +1,13 @@
1
+ # $Id: Generated by chef for node: <%= node['hostname'] %>
2
+ # ----------------------------------------------------------------
3
+ # NOTE: This file is controlled by chef templates!
4
+ # Do not edit or change this file but change the following:
5
+ # template file : timeperiods.cfg.erb
6
+ # ----------------------------------------------------------------
7
+ # Time period definitions
8
+ # ----------------------------------------------------------------
9
+
10
+ <% Nagios.instance.timeperiods.each do |entry,timeperiod| -%>
11
+ <%= timeperiod.definition %>
12
+
13
+ <% end -%>
@@ -6,16 +6,16 @@ if ENV.include? "MU_COOKBOOK_ROOT"
6
6
  siteCookbookPath = "#{ENV['MU_COOKBOOK_ROOT']}/site_cookbooks"
7
7
  if ENV.include? "MU_DEPRESOLVE"
8
8
  ["cookbooks", "site_cookbooks"].each { |dir|
9
- next if !Dir.exists?(ENV['MU_COOKBOOK_ROOT']+"/"+dir)
9
+ next if !Dir.exist?(ENV['MU_COOKBOOK_ROOT']+"/"+dir)
10
10
  Dir.foreach(ENV['MU_COOKBOOK_ROOT']+"/"+dir).each { |cb|
11
11
  next if cb == "." or cb == ".."
12
12
  path = ENV['MU_COOKBOOK_ROOT']+"/"+dir+"/"+cb
13
- next if !File.exists?(path+"/metadata.rb") and !File.exists?(path+"/metadata.json")
13
+ next if !File.exist?(path+"/metadata.rb") and !File.exist?(path+"/metadata.json")
14
14
  addtl_cookbooks[cb] = { "path" => path }
15
15
  }
16
16
  }
17
17
  # now to smoke some rocks
18
- if File.exists?("#{ENV['MU_COOKBOOK_ROOT']}/Berksfile.lock")
18
+ if File.exist?("#{ENV['MU_COOKBOOK_ROOT']}/Berksfile.lock")
19
19
  in_deps = false
20
20
  File.open("#{ENV['MU_COOKBOOK_ROOT']}/Berksfile.lock").each { |line|
21
21
  if in_deps
@@ -5,17 +5,17 @@ rpm -q rpm-build || yum -y install rpm-build
5
5
  base="/opt/mu/lib/extras/python_rpm"
6
6
 
7
7
  for d in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS;do
8
- mkdir -p ~/rpmbuild/$d
8
+ mkdir -p /root/rpmbuild/$d
9
9
  done
10
- cd ~/rpmbuild
10
+ cd /root/rpmbuild
11
11
 
12
12
  echo "Temporarily deleting /usr/local/python-current so rpmbuild can create it"
13
13
  link="`readlink /usr/local/python-current`"
14
14
  rm -f /usr/local/python-current
15
15
  chmod 000 /usr/bin/python # otherwise this brain-dead build system tries to compile parts of itself with the wrong executable
16
- env -i PATH="/bin:/usr/bin" /usr/bin/rpmbuild -ba $base/muthon.spec
16
+ env -i HOME=/root PATH="/bin:/usr/bin" /usr/bin/rpmbuild -ba $base/muthon.spec
17
17
  chmod 755 /usr/bin/python
18
- find ~/rpmbuild/ -type f -name 'muthon*' -exec ls -la {} \;
18
+ find /root/rpmbuild/ -type f -name 'muthon*' -exec ls -la {} \;
19
19
  if [ "$link" != "" ];then
20
20
  ln -s "$link" /usr/local/python-current
21
21
  fi
@@ -1,7 +1,7 @@
1
1
  Summary: Python for Mu
2
2
  BuildArch: x86_64
3
3
  Name: muthon
4
- Version: 3.8.3
4
+ Version: 3.13.1
5
5
  Release: 1%{dist}
6
6
  Group: Development/Languages
7
7
  License: https://docs.python.org/3/license.html
@@ -12,9 +12,6 @@ Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tgz
12
12
  # auto-require inserts nonsensical things, like a dependency on our own
13
13
  # executable, so I guess we'll declare dependencies by package ourselves
14
14
  AutoReq: no
15
- # XXX these don't work for some reason
16
- #%global __requires_exclude ^/usr/local/bin/python$
17
- #%global __requires_exclude ^/opt/pythons/Python-%{version}/bin/python.*$
18
15
 
19
16
  %{?el6:BuildRequires: mussl}
20
17
  %{?el6:BuildRequires: muqlite}
@@ -63,6 +60,7 @@ env -i PATH="/bin:/usr/bin" make
63
60
  %install
64
61
  cd $RPM_BUILD_DIR/Python-%{version}
65
62
  env -i PATH="/bin:/usr/bin" make install
63
+ sed -i 's/^#!\/usr\/bin\/env python/\/usr\/bin\/python3/' /opt/pythons/Python-3.13.1/lib/python3.13/encodings/rot_13.py
66
64
  %{prefix}/Python-%{version}/bin/python3 $RPM_SOURCE_DIR/get-pip.py --prefix %{prefix}/Python-%{version}/ || ( ldd %{prefix}/Python-%{version}/bin/python3 ; exit 1 )
67
65
  mkdir -p $RPM_BUILD_ROOT%{prefix}
68
66
  mv %{prefix}/Python-%{version} $RPM_BUILD_ROOT%{prefix}/
@@ -1,3 +1,13 @@
1
1
  #!/bin/bash
2
2
  # Exports existing vaults to a vaults directory for use by test_vaults and recreate_vaults
3
- mkdir -p ~/vaults ; for i in `knife data bag list | grep -vE -- '-[0-9]{10}-'`;do echo $i; mkdir -p vaults/$i ; for j in `knife data bag show $i | grep -v '_keys$'`;do echo " $j"; knife vault show $i $j -F json > vaults/$i/$j.json;done;done ; find vaults -empty -delete
3
+ mkdir -p ~/vaults
4
+ cd
5
+ for i in `knife vault list | egrep -v '^INFO:'`;do
6
+ echo "VAULTNAME: $i"
7
+ mkdir -p vaults/$i
8
+ for j in `knife data bag show $i | egrep -v '^INFO:|_keys$'`;do
9
+ echo " ITEM: $j"
10
+ knife vault show "$i" "$j" -F json | grep -v '^INFO:' > ~/vaults/$i/$j.json
11
+ done
12
+ done
13
+ find ~/vaults -empty -delete
data/install/installer CHANGED
@@ -4,7 +4,7 @@
4
4
  yum -y install git dmidecode
5
5
  BOLD=`tput bold`
6
6
  NORM=`tput sgr0`
7
- CHEF_CLIENT_VERSION="18.5.0"
7
+ CHEF_CLIENT_VERSION="18.7.6"
8
8
  if [ "$MU_BRANCH" == "" ];then
9
9
  MU_BRANCH="master"
10
10
  mydir="`dirname $0`"