cloud-mu 1.9.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Berksfile +56 -0
- data/Berksfile.lock +250 -0
- data/Jenkinsfile +184 -0
- data/LICENSE.md +37 -0
- data/README.md +26 -0
- data/bin/mu-aws-setup +376 -0
- data/bin/mu-cleanup +68 -0
- data/bin/mu-configure +1133 -0
- data/bin/mu-deploy +166 -0
- data/bin/mu-firewall-allow-clients +30 -0
- data/bin/mu-gcp-setup +200 -0
- data/bin/mu-gen-docs +34 -0
- data/bin/mu-gen-env +42 -0
- data/bin/mu-load-config.rb +158 -0
- data/bin/mu-node-manage +683 -0
- data/bin/mu-self-update +228 -0
- data/bin/mu-ssh +23 -0
- data/bin/mu-tunnel-nagios +144 -0
- data/bin/mu-upload-chef-artifacts +757 -0
- data/bin/mu-user-manage +275 -0
- data/cookbooks/awscli/LICENSE +37 -0
- data/cookbooks/awscli/README.md +58 -0
- data/cookbooks/awscli/attributes/default.rb +1 -0
- data/cookbooks/awscli/libraries/instance_metadata.rb +21 -0
- data/cookbooks/awscli/metadata.rb +20 -0
- data/cookbooks/awscli/recipes/default.rb +56 -0
- data/cookbooks/awscli/templates/default/config.erb +18 -0
- data/cookbooks/mu-activedirectory/CHANGELOG.md +13 -0
- data/cookbooks/mu-activedirectory/LICENSE +37 -0
- data/cookbooks/mu-activedirectory/README.md +6 -0
- data/cookbooks/mu-activedirectory/attributes/default.rb +98 -0
- data/cookbooks/mu-activedirectory/files/default/password-auth +32 -0
- data/cookbooks/mu-activedirectory/files/default/sshd_pol.pp +0 -0
- data/cookbooks/mu-activedirectory/files/default/sshd_pol.te +32 -0
- data/cookbooks/mu-activedirectory/files/default/syslogd_oddjobd.pp +0 -0
- data/cookbooks/mu-activedirectory/files/default/syslogd_oddjobd.te +10 -0
- data/cookbooks/mu-activedirectory/files/default/system-auth +34 -0
- data/cookbooks/mu-activedirectory/files/default/winbindpol.pp +0 -0
- data/cookbooks/mu-activedirectory/files/default/winbindpol.te +37 -0
- data/cookbooks/mu-activedirectory/libraries/config.rb +106 -0
- data/cookbooks/mu-activedirectory/libraries/helper.rb +86 -0
- data/cookbooks/mu-activedirectory/metadata.rb +17 -0
- data/cookbooks/mu-activedirectory/providers/domain.rb +152 -0
- data/cookbooks/mu-activedirectory/providers/domain_controller.rb +89 -0
- data/cookbooks/mu-activedirectory/providers/domain_node.rb +275 -0
- data/cookbooks/mu-activedirectory/recipes/default.rb +8 -0
- data/cookbooks/mu-activedirectory/recipes/domain-controller.rb +44 -0
- data/cookbooks/mu-activedirectory/recipes/domain-node.rb +50 -0
- data/cookbooks/mu-activedirectory/recipes/domain.rb +43 -0
- data/cookbooks/mu-activedirectory/recipes/sssd.rb +185 -0
- data/cookbooks/mu-activedirectory/resources/domain.rb +25 -0
- data/cookbooks/mu-activedirectory/resources/domain_controller.rb +25 -0
- data/cookbooks/mu-activedirectory/resources/domain_node.rb +20 -0
- data/cookbooks/mu-activedirectory/templates/default/dhclient-eth0.conf.erb +4 -0
- data/cookbooks/mu-activedirectory/templates/default/interface +0 -0
- data/cookbooks/mu-activedirectory/templates/default/krb5.conf.erb +23 -0
- data/cookbooks/mu-activedirectory/templates/default/ntp.conf.erb +56 -0
- data/cookbooks/mu-activedirectory/templates/default/smb.conf.erb +33 -0
- data/cookbooks/mu-activedirectory/templates/default/sssd.conf.erb +60 -0
- data/cookbooks/mu-activedirectory/templates/windows/Backup.xml.erb +20 -0
- data/cookbooks/mu-activedirectory/templates/windows/bkupInfo.xml.erb +1 -0
- data/cookbooks/mu-activedirectory/templates/windows/gpreprt.xml.erb +198 -0
- data/cookbooks/mu-activedirectory/templates/windows/gptmpl.inf.erb +12 -0
- data/cookbooks/mu-activedirectory/templates/windows/manifest.xml.erb +1 -0
- data/cookbooks/mu-firewall/CHANGELOG.md +11 -0
- data/cookbooks/mu-firewall/LICENSE +37 -0
- data/cookbooks/mu-firewall/README.md +5 -0
- data/cookbooks/mu-firewall/attributes/default.rb +3 -0
- data/cookbooks/mu-firewall/metadata.rb +16 -0
- data/cookbooks/mu-firewall/recipes/default.rb +10 -0
- data/cookbooks/mu-glusterfs/CHANGELOG.md +13 -0
- data/cookbooks/mu-glusterfs/LICENSE +37 -0
- data/cookbooks/mu-glusterfs/README.md +5 -0
- data/cookbooks/mu-glusterfs/attributes/default.rb +34 -0
- data/cookbooks/mu-glusterfs/metadata.rb +17 -0
- data/cookbooks/mu-glusterfs/recipes/client.rb +62 -0
- data/cookbooks/mu-glusterfs/recipes/default.rb +16 -0
- data/cookbooks/mu-glusterfs/recipes/samba.rb +57 -0
- data/cookbooks/mu-glusterfs/recipes/server.rb +200 -0
- data/cookbooks/mu-glusterfs/templates/default/mu-gluster-client.erb +71 -0
- data/cookbooks/mu-glusterfs/templates/default/smb.conf.erb +14 -0
- data/cookbooks/mu-jenkins/CHANGELOG.md +13 -0
- data/cookbooks/mu-jenkins/LICENSE +37 -0
- data/cookbooks/mu-jenkins/README.md +105 -0
- data/cookbooks/mu-jenkins/attributes/default.rb +42 -0
- data/cookbooks/mu-jenkins/files/default/cleanup_deploy_config.xml +73 -0
- data/cookbooks/mu-jenkins/files/default/deploy_config.xml +44 -0
- data/cookbooks/mu-jenkins/metadata.rb +21 -0
- data/cookbooks/mu-jenkins/recipes/default.rb +195 -0
- data/cookbooks/mu-jenkins/recipes/node-ssh-config.rb +54 -0
- data/cookbooks/mu-jenkins/recipes/public_key.rb +24 -0
- data/cookbooks/mu-jenkins/templates/default/example_job.config.xml.erb +24 -0
- data/cookbooks/mu-jenkins/templates/default/org.jvnet.hudson.plugins.SSHBuildWrapper.xml.erb +14 -0
- data/cookbooks/mu-jenkins/templates/default/ssh_config.erb +6 -0
- data/cookbooks/mu-master/CHANGELOG.md +13 -0
- data/cookbooks/mu-master/LICENSE +37 -0
- data/cookbooks/mu-master/README.md +6 -0
- data/cookbooks/mu-master/attributes/default.rb +95 -0
- data/cookbooks/mu-master/files/default/0-mu-log-server.conf +19 -0
- data/cookbooks/mu-master/files/default/addRSA.ldif +8 -0
- data/cookbooks/mu-master/files/default/check_mem.pl +197 -0
- data/cookbooks/mu-master/files/default/cloudamatic.png +0 -0
- data/cookbooks/mu-master/files/default/dirsrv_admin.pp +0 -0
- data/cookbooks/mu-master/files/default/dirsrv_admin.te +13 -0
- data/cookbooks/mu-master/files/default/nagios_selinux.pp +0 -0
- data/cookbooks/mu-master/files/default/nagios_selinux.te +51 -0
- data/cookbooks/mu-master/files/default/nagios_selinux_7.pp +0 -0
- data/cookbooks/mu-master/files/default/nagios_selinux_7.te +17 -0
- data/cookbooks/mu-master/files/default/pam_sshd +18 -0
- data/cookbooks/mu-master/files/default/ssl_enable.ldif +18 -0
- data/cookbooks/mu-master/files/default/syslogd_oddjobd.pp +0 -0
- data/cookbooks/mu-master/files/default/syslogd_oddjobd.te +10 -0
- data/cookbooks/mu-master/files/default/vimrc +19 -0
- data/cookbooks/mu-master/libraries/mu.rb +29 -0
- data/cookbooks/mu-master/metadata.rb +30 -0
- data/cookbooks/mu-master/providers/user.rb +41 -0
- data/cookbooks/mu-master/recipes/389ds.rb +164 -0
- data/cookbooks/mu-master/recipes/basepackages.rb +58 -0
- data/cookbooks/mu-master/recipes/caching_nameserver.rb +37 -0
- data/cookbooks/mu-master/recipes/default.rb +451 -0
- data/cookbooks/mu-master/recipes/eks-kubectl.rb +41 -0
- data/cookbooks/mu-master/recipes/firewall-holes.rb +70 -0
- data/cookbooks/mu-master/recipes/init.rb +542 -0
- data/cookbooks/mu-master/recipes/ssl-certs.rb +109 -0
- data/cookbooks/mu-master/recipes/sssd.rb +89 -0
- data/cookbooks/mu-master/recipes/update_nagios_only.rb +242 -0
- data/cookbooks/mu-master/recipes/vault.rb +111 -0
- data/cookbooks/mu-master/resources/user.rb +19 -0
- data/cookbooks/mu-master/templates/default/389-directory-setup.inf.erb +28 -0
- data/cookbooks/mu-master/templates/default/chef-server.rb.erb +18 -0
- data/cookbooks/mu-master/templates/default/dhclient-eth0.conf.erb +9 -0
- data/cookbooks/mu-master/templates/default/mu-momma-cat.erb +149 -0
- data/cookbooks/mu-master/templates/default/mu.rc.erb +9 -0
- data/cookbooks/mu-master/templates/default/openssl.cnf.erb +354 -0
- data/cookbooks/mu-master/templates/default/sssd.conf.erb +44 -0
- data/cookbooks/mu-master/templates/default/web_app.conf.erb +90 -0
- data/cookbooks/mu-mongo/CHANGELOG.md +13 -0
- data/cookbooks/mu-mongo/LICENSE +37 -0
- data/cookbooks/mu-mongo/README.md +5 -0
- data/cookbooks/mu-mongo/attributes/default.rb +22 -0
- data/cookbooks/mu-mongo/files/default/keyfile +16 -0
- data/cookbooks/mu-mongo/files/default/remove_nodes.js +5 -0
- data/cookbooks/mu-mongo/metadata.rb +17 -0
- data/cookbooks/mu-mongo/recipes/default.rb +149 -0
- data/cookbooks/mu-mongo/recipes/yum-update-rule.rb +18 -0
- data/cookbooks/mu-mongo/templates/default/mongo_create_openfema_db.js.erb +2 -0
- data/cookbooks/mu-mongo/templates/default/mongo_init.js.erb +1 -0
- data/cookbooks/mu-mongo/templates/default/mongo_logrotate.erb +14 -0
- data/cookbooks/mu-mongo/templates/default/mongo_replset_addnodes.js.erb +6 -0
- data/cookbooks/mu-mongo/templates/default/replset_init.js.erb +2 -0
- data/cookbooks/mu-openvpn/CHANGELOG.md +13 -0
- data/cookbooks/mu-openvpn/LICENSE +37 -0
- data/cookbooks/mu-openvpn/README.md +6 -0
- data/cookbooks/mu-openvpn/attributes/default.rb +119 -0
- data/cookbooks/mu-openvpn/metadata.rb +18 -0
- data/cookbooks/mu-openvpn/recipes/default.rb +108 -0
- data/cookbooks/mu-openvpn/templates/default/users.json.erb +42 -0
- data/cookbooks/mu-php54/CHANGELOG.md +12 -0
- data/cookbooks/mu-php54/LICENSE +37 -0
- data/cookbooks/mu-php54/README.md +0 -0
- data/cookbooks/mu-php54/files/centos/php.ini +1802 -0
- data/cookbooks/mu-php54/files/ubuntu/php.ini +1870 -0
- data/cookbooks/mu-php54/metadata.rb +21 -0
- data/cookbooks/mu-php54/recipes/default.rb +97 -0
- data/cookbooks/mu-splunk/CHANGELOG.md +37 -0
- data/cookbooks/mu-splunk/LICENSE +37 -0
- data/cookbooks/mu-splunk/README.md +451 -0
- data/cookbooks/mu-splunk/attributes/default.rb +95 -0
- data/cookbooks/mu-splunk/attributes/upgrade.rb +49 -0
- data/cookbooks/mu-splunk/definitions/splunk_installer.rb +103 -0
- data/cookbooks/mu-splunk/files/default/splunk-nocheck +10 -0
- data/cookbooks/mu-splunk/libraries/helpers.rb +72 -0
- data/cookbooks/mu-splunk/libraries/splunk_app_provider.rb +156 -0
- data/cookbooks/mu-splunk/libraries/splunk_app_resource.rb +43 -0
- data/cookbooks/mu-splunk/metadata.json +30 -0
- data/cookbooks/mu-splunk/metadata.rb +17 -0
- data/cookbooks/mu-splunk/recipes/client.rb +143 -0
- data/cookbooks/mu-splunk/recipes/default.rb +31 -0
- data/cookbooks/mu-splunk/recipes/disabled.rb +41 -0
- data/cookbooks/mu-splunk/recipes/install_forwarder.rb +23 -0
- data/cookbooks/mu-splunk/recipes/install_server.rb +23 -0
- data/cookbooks/mu-splunk/recipes/server.rb +53 -0
- data/cookbooks/mu-splunk/recipes/service.rb +95 -0
- data/cookbooks/mu-splunk/recipes/setup_auth.rb +49 -0
- data/cookbooks/mu-splunk/recipes/setup_ssl.rb +63 -0
- data/cookbooks/mu-splunk/recipes/upgrade.rb +94 -0
- data/cookbooks/mu-splunk/recipes/user.rb +34 -0
- data/cookbooks/mu-splunk/templates/default/base_logs_unix_inputs.conf.erb +26 -0
- data/cookbooks/mu-splunk/templates/default/inputs.conf.erb +13 -0
- data/cookbooks/mu-splunk/templates/default/outputs.conf.erb +9 -0
- data/cookbooks/mu-splunk/templates/default/splunk-init.erb +74 -0
- data/cookbooks/mu-splunk/templates/default/system-web.conf.erb +7 -0
- data/cookbooks/mu-tools/CHANGELOG.md +12 -0
- data/cookbooks/mu-tools/LICENSE +37 -0
- data/cookbooks/mu-tools/README.md +188 -0
- data/cookbooks/mu-tools/attributes/default.rb +142 -0
- data/cookbooks/mu-tools/attributes/ebs_rolling_snapshots.rb +3 -0
- data/cookbooks/mu-tools/files/amazon/etc/freshclam.conf +235 -0
- data/cookbooks/mu-tools/files/centos/CentOS-Base.repo +52 -0
- data/cookbooks/mu-tools/files/centos/etc/bashrc +93 -0
- data/cookbooks/mu-tools/files/centos/etc/freshclam.conf +235 -0
- data/cookbooks/mu-tools/files/centos/etc/login.defs +72 -0
- data/cookbooks/mu-tools/files/centos/etc/profile +77 -0
- data/cookbooks/mu-tools/files/centos/etc/security/limits.conf +57 -0
- data/cookbooks/mu-tools/files/centos/etc/sysconfig/init +19 -0
- data/cookbooks/mu-tools/files/centos/etc/sysctl.conf +82 -0
- data/cookbooks/mu-tools/files/centos-6/README_MU +0 -0
- data/cookbooks/mu-tools/files/centos-6/etc/audit/stig.rules +173 -0
- data/cookbooks/mu-tools/files/centos-6/etc/bashrc +90 -0
- data/cookbooks/mu-tools/files/centos-6/etc/login.defs +70 -0
- data/cookbooks/mu-tools/files/centos-6/etc/pam.d/su +12 -0
- data/cookbooks/mu-tools/files/centos-6/etc/profile +83 -0
- data/cookbooks/mu-tools/files/centos-6/etc/securetty +12 -0
- data/cookbooks/mu-tools/files/centos-6/etc/sysconfig/init +30 -0
- data/cookbooks/mu-tools/files/centos-6/etc/sysctl.conf +40 -0
- data/cookbooks/mu-tools/files/default/Mu_CA.pem +34 -0
- data/cookbooks/mu-tools/files/default/PSWindowsUpdate.zip +0 -0
- data/cookbooks/mu-tools/files/default/ebs_snapshots.py +123 -0
- data/cookbooks/mu-tools/files/default/etc/BANNER +0 -0
- data/cookbooks/mu-tools/files/default/etc/BANNER-FEDERAL +19 -0
- data/cookbooks/mu-tools/files/default/gpo_no_uac.zip +0 -0
- data/cookbooks/mu-tools/files/default/mypol.pp +0 -0
- data/cookbooks/mu-tools/files/default/mypol.te +37 -0
- data/cookbooks/mu-tools/files/default/nrpe_c7.pp +0 -0
- data/cookbooks/mu-tools/files/default/nrpe_c7.te +31 -0
- data/cookbooks/mu-tools/files/default/nrpe_check_disk.pp +0 -0
- data/cookbooks/mu-tools/files/default/nrpe_check_disk.te +11 -0
- data/cookbooks/mu-tools/files/default/nrpe_disk.pp +0 -0
- data/cookbooks/mu-tools/files/default/nrpe_disk.te +10 -0
- data/cookbooks/mu-tools/files/default/nrpe_file.pp +0 -0
- data/cookbooks/mu-tools/files/default/nrpe_file.te +31 -0
- data/cookbooks/mu-tools/files/default/ntrights +0 -0
- data/cookbooks/mu-tools/files/default/serverclass.conf +18 -0
- data/cookbooks/mu-tools/files/default/splunk-apps/base_logs_unix/local/app.conf +1 -0
- data/cookbooks/mu-tools/files/default/splunk-apps/base_logs_unix/local/inputs.conf +13 -0
- data/cookbooks/mu-tools/files/default/splunk-apps/base_logs_windows/local/app.conf +1 -0
- data/cookbooks/mu-tools/files/default/splunk-apps/base_logs_windows/local/inputs.conf +8 -0
- data/cookbooks/mu-tools/files/default/sshd_pol.pp +0 -0
- data/cookbooks/mu-tools/files/default/sshd_pol.te +32 -0
- data/cookbooks/mu-tools/files/redhat/etc/bashrc +93 -0
- data/cookbooks/mu-tools/files/redhat/etc/freshclam.conf +235 -0
- data/cookbooks/mu-tools/files/redhat/etc/login.defs +72 -0
- data/cookbooks/mu-tools/files/redhat/etc/profile +77 -0
- data/cookbooks/mu-tools/files/redhat/etc/security/limits.conf +57 -0
- data/cookbooks/mu-tools/files/redhat/etc/sysconfig/init +19 -0
- data/cookbooks/mu-tools/files/redhat/etc/sysctl.conf +82 -0
- data/cookbooks/mu-tools/files/redhat-6/README_MU +0 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/audit/stig.rules +173 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/bashrc +90 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/login.defs +70 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/pam.d/su +12 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/profile +83 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/securetty +12 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/sysconfig/init +30 -0
- data/cookbooks/mu-tools/files/redhat-6/etc/sysctl.conf +40 -0
- data/cookbooks/mu-tools/files/redhat-7.1/etc/freshclam.conf +235 -0
- data/cookbooks/mu-tools/files/ubuntu-12.04/etc/bash.bashrc +64 -0
- data/cookbooks/mu-tools/files/ubuntu-12.04/etc/common-session +30 -0
- data/cookbooks/mu-tools/files/ubuntu-12.04/etc/login.defs +338 -0
- data/cookbooks/mu-tools/files/ubuntu-12.04/etc/profile +30 -0
- data/cookbooks/mu-tools/files/ubuntu-12.04/etc/security/limits.conf +56 -0
- data/cookbooks/mu-tools/files/ubuntu-12.04/etc/sysctl.conf +60 -0
- data/cookbooks/mu-tools/libraries/helper.rb +292 -0
- data/cookbooks/mu-tools/metadata.rb +28 -0
- data/cookbooks/mu-tools/recipes/add_admin_ssh_keys.rb +35 -0
- data/cookbooks/mu-tools/recipes/apply_security.rb +440 -0
- data/cookbooks/mu-tools/recipes/aws_api.rb +23 -0
- data/cookbooks/mu-tools/recipes/base_repositories.rb +31 -0
- data/cookbooks/mu-tools/recipes/cisbenchmark.rb +59 -0
- data/cookbooks/mu-tools/recipes/clamav.rb +53 -0
- data/cookbooks/mu-tools/recipes/cloudinit.rb +58 -0
- data/cookbooks/mu-tools/recipes/configure_oracle_tools.rb +81 -0
- data/cookbooks/mu-tools/recipes/disable-requiretty.rb +22 -0
- data/cookbooks/mu-tools/recipes/ebs_rolling_snapshots.rb +75 -0
- data/cookbooks/mu-tools/recipes/efs.rb +70 -0
- data/cookbooks/mu-tools/recipes/eks.rb +160 -0
- data/cookbooks/mu-tools/recipes/gcloud.rb +98 -0
- data/cookbooks/mu-tools/recipes/google_api.rb +25 -0
- data/cookbooks/mu-tools/recipes/maldet.rb +67 -0
- data/cookbooks/mu-tools/recipes/nagios.rb +19 -0
- data/cookbooks/mu-tools/recipes/newclient.rb +23 -0
- data/cookbooks/mu-tools/recipes/nrpe.rb +115 -0
- data/cookbooks/mu-tools/recipes/python_pip.rb +35 -0
- data/cookbooks/mu-tools/recipes/retrieve_application.rb +51 -0
- data/cookbooks/mu-tools/recipes/rsyslog.rb +65 -0
- data/cookbooks/mu-tools/recipes/set_local_fw.rb +57 -0
- data/cookbooks/mu-tools/recipes/set_mu_hostname.rb +81 -0
- data/cookbooks/mu-tools/recipes/split_var_partitions.rb +86 -0
- data/cookbooks/mu-tools/recipes/splunk-client.rb +69 -0
- data/cookbooks/mu-tools/recipes/splunk-server.rb +104 -0
- data/cookbooks/mu-tools/recipes/store_inspec_attr.rb +8 -0
- data/cookbooks/mu-tools/recipes/updates.rb +96 -0
- data/cookbooks/mu-tools/recipes/windows-client.rb +202 -0
- data/cookbooks/mu-tools/resources/aws_windows.rb +33 -0
- data/cookbooks/mu-tools/resources/disk.rb +88 -0
- data/cookbooks/mu-tools/resources/mommacat_request.rb +11 -0
- data/cookbooks/mu-tools/resources/scheduled_tasks.rb +29 -0
- data/cookbooks/mu-tools/resources/sshd_service.rb +45 -0
- data/cookbooks/mu-tools/resources/windows_users.rb +242 -0
- data/cookbooks/mu-tools/templates/amazon/sshd_config.erb +168 -0
- data/cookbooks/mu-tools/templates/centos-6/sshd_config.erb +212 -0
- data/cookbooks/mu-tools/templates/centos-7/sshd_config.erb +215 -0
- data/cookbooks/mu-tools/templates/default/0-mu-log-client.conf.erb +13 -0
- data/cookbooks/mu-tools/templates/default/conf.maldet.erb +137 -0
- data/cookbooks/mu-tools/templates/default/etc_hosts.erb +30 -0
- data/cookbooks/mu-tools/templates/default/etc_pamd_password-auth.erb +14 -0
- data/cookbooks/mu-tools/templates/default/etc_pamd_system-auth.erb +14 -0
- data/cookbooks/mu-tools/templates/default/etc_sysconfig_network.erb +12 -0
- data/cookbooks/mu-tools/templates/default/kubeconfig.erb +29 -0
- data/cookbooks/mu-tools/templates/default/kubelet.service.erb +35 -0
- data/cookbooks/mu-tools/templates/default/maldet_scanall.sh.erb +15 -0
- data/cookbooks/mu-tools/templates/default/nrpe.cfg.erb +233 -0
- data/cookbooks/mu-tools/templates/redhat-6/sshd_config.erb +213 -0
- data/cookbooks/mu-tools/templates/redhat-7/sshd_config.erb +215 -0
- data/cookbooks/mu-tools/templates/ubuntu-12.04/sshd_config.erb +146 -0
- data/cookbooks/mu-tools/templates/ubuntu-14.04/sshd_config.erb +145 -0
- data/cookbooks/mu-tools/templates/windows/Backup.xml.erb +20 -0
- data/cookbooks/mu-tools/templates/windows/bkupInfo.xml.erb +1 -0
- data/cookbooks/mu-tools/templates/windows/gpreprt.xml.erb +214 -0
- data/cookbooks/mu-tools/templates/windows/gptmpl.inf.erb +12 -0
- data/cookbooks/mu-tools/templates/windows/manifest.xml.erb +1 -0
- data/cookbooks/mu-tools/templates/windows/set_ad_dns_scheduled_task.ps1.erb +6 -0
- data/cookbooks/mu-tools/templates/windows/sshd_config.erb +136 -0
- data/cookbooks/mu-utility/CHANGELOG.md +12 -0
- data/cookbooks/mu-utility/LICENSE +37 -0
- data/cookbooks/mu-utility/README.md +6 -0
- data/cookbooks/mu-utility/attributes/default.rb +1 -0
- data/cookbooks/mu-utility/libraries/matchers.rb +21 -0
- data/cookbooks/mu-utility/metadata.rb +16 -0
- data/cookbooks/mu-utility/recipes/apt.rb +23 -0
- data/cookbooks/mu-utility/recipes/cleanup_image_helper.rb +118 -0
- data/cookbooks/mu-utility/recipes/iptables.rb +26 -0
- data/cookbooks/mu-utility/recipes/luks.rb +18 -0
- data/cookbooks/mu-utility/recipes/nat.rb +104 -0
- data/cookbooks/mu-utility/recipes/php.rb +33 -0
- data/cookbooks/mu-utility/recipes/rdp_gateway.rb +83 -0
- data/cookbooks/mu-utility/recipes/remi.rb +44 -0
- data/cookbooks/mu-utility/recipes/vim.rb +26 -0
- data/cookbooks/mu-utility/recipes/windows_basics.rb +37 -0
- data/cookbooks/mu-utility/recipes/zip.rb +26 -0
- data/cookbooks/mu-utility/templates/default/BundleConfig.xml.erb +34 -0
- data/cookbooks/mu-utility/templates/default/config.xml.erb +60 -0
- data/cookbooks/nagios/Berksfile +8 -0
- data/cookbooks/nagios/CHANGELOG.md +589 -0
- data/cookbooks/nagios/CONTRIBUTING.md +11 -0
- data/cookbooks/nagios/LICENSE +37 -0
- data/cookbooks/nagios/README.md +328 -0
- data/cookbooks/nagios/TESTING.md +2 -0
- data/cookbooks/nagios/attributes/config.rb +171 -0
- data/cookbooks/nagios/attributes/default.rb +228 -0
- data/cookbooks/nagios/chefignore +102 -0
- data/cookbooks/nagios/definitions/command.rb +33 -0
- data/cookbooks/nagios/definitions/contact.rb +33 -0
- data/cookbooks/nagios/definitions/contactgroup.rb +33 -0
- data/cookbooks/nagios/definitions/host.rb +33 -0
- data/cookbooks/nagios/definitions/hostdependency.rb +33 -0
- data/cookbooks/nagios/definitions/hostescalation.rb +34 -0
- data/cookbooks/nagios/definitions/hostgroup.rb +33 -0
- data/cookbooks/nagios/definitions/nagios_conf.rb +38 -0
- data/cookbooks/nagios/definitions/resource.rb +33 -0
- data/cookbooks/nagios/definitions/service.rb +33 -0
- data/cookbooks/nagios/definitions/servicedependency.rb +33 -0
- data/cookbooks/nagios/definitions/serviceescalation.rb +34 -0
- data/cookbooks/nagios/definitions/servicegroup.rb +33 -0
- data/cookbooks/nagios/definitions/timeperiod.rb +33 -0
- data/cookbooks/nagios/libraries/base.rb +314 -0
- data/cookbooks/nagios/libraries/command.rb +91 -0
- data/cookbooks/nagios/libraries/contact.rb +230 -0
- data/cookbooks/nagios/libraries/contactgroup.rb +112 -0
- data/cookbooks/nagios/libraries/custom_option.rb +36 -0
- data/cookbooks/nagios/libraries/data_bag_helper.rb +23 -0
- data/cookbooks/nagios/libraries/default.rb +90 -0
- data/cookbooks/nagios/libraries/host.rb +412 -0
- data/cookbooks/nagios/libraries/hostdependency.rb +181 -0
- data/cookbooks/nagios/libraries/hostescalation.rb +173 -0
- data/cookbooks/nagios/libraries/hostgroup.rb +119 -0
- data/cookbooks/nagios/libraries/nagios.rb +282 -0
- data/cookbooks/nagios/libraries/resource.rb +59 -0
- data/cookbooks/nagios/libraries/service.rb +455 -0
- data/cookbooks/nagios/libraries/servicedependency.rb +215 -0
- data/cookbooks/nagios/libraries/serviceescalation.rb +195 -0
- data/cookbooks/nagios/libraries/servicegroup.rb +144 -0
- data/cookbooks/nagios/libraries/timeperiod.rb +160 -0
- data/cookbooks/nagios/libraries/users_helper.rb +54 -0
- data/cookbooks/nagios/metadata.rb +25 -0
- data/cookbooks/nagios/recipes/_load_databag_config.rb +153 -0
- data/cookbooks/nagios/recipes/_load_default_config.rb +241 -0
- data/cookbooks/nagios/recipes/apache.rb +48 -0
- data/cookbooks/nagios/recipes/default.rb +204 -0
- data/cookbooks/nagios/recipes/nginx.rb +82 -0
- data/cookbooks/nagios/recipes/pagerduty.rb +143 -0
- data/cookbooks/nagios/recipes/server_package.rb +40 -0
- data/cookbooks/nagios/recipes/server_source.rb +164 -0
- data/cookbooks/nagios/templates/default/apache2.conf.erb +96 -0
- data/cookbooks/nagios/templates/default/cgi.cfg.erb +266 -0
- data/cookbooks/nagios/templates/default/commands.cfg.erb +13 -0
- data/cookbooks/nagios/templates/default/contacts.cfg.erb +37 -0
- data/cookbooks/nagios/templates/default/hostgroups.cfg.erb +25 -0
- data/cookbooks/nagios/templates/default/hosts.cfg.erb +15 -0
- data/cookbooks/nagios/templates/default/htpasswd.users.erb +6 -0
- data/cookbooks/nagios/templates/default/nagios.cfg.erb +22 -0
- data/cookbooks/nagios/templates/default/nginx.conf.erb +62 -0
- data/cookbooks/nagios/templates/default/pagerduty.cgi.erb +185 -0
- data/cookbooks/nagios/templates/default/resource.cfg.erb +27 -0
- data/cookbooks/nagios/templates/default/servicedependencies.cfg.erb +15 -0
- data/cookbooks/nagios/templates/default/servicegroups.cfg.erb +14 -0
- data/cookbooks/nagios/templates/default/services.cfg.erb +14 -0
- data/cookbooks/nagios/templates/default/templates.cfg.erb +31 -0
- data/cookbooks/nagios/templates/default/timeperiods.cfg.erb +13 -0
- data/cookbooks/s3fs/CHANGELOG.md +13 -0
- data/cookbooks/s3fs/LICENSE +37 -0
- data/cookbooks/s3fs/README.md +6 -0
- data/cookbooks/s3fs/attributes/default.rb +15 -0
- data/cookbooks/s3fs/files/default/fuse-2.9.3.zip +0 -0
- data/cookbooks/s3fs/metadata.rb +16 -0
- data/cookbooks/s3fs/recipes/default.rb +91 -0
- data/data_bags/demo/app.json +7 -0
- data/data_bags/nagios_services/chef.json +6 -0
- data/data_bags/nagios_services/linux_diskspace.json +5 -0
- data/data_bags/nagios_services/momma_cat.json +6 -0
- data/data_bags/nagios_services/mu-master-memory.json +5 -0
- data/data_bags/nagios_services/nagios_ui.json +6 -0
- data/data_bags/nagios_services/node_ssh.json +6 -0
- data/data_bags/nagios_services/ssh.json +6 -0
- data/demo/lambda_test.yaml +29 -0
- data/environments/DEV.json +8 -0
- data/environments/PROD.json +8 -0
- data/environments/dev.json +8 -0
- data/environments/development.json +8 -0
- data/environments/prod.json +8 -0
- data/extras/README.md +1 -0
- data/extras/admin-role-binding.yaml +16 -0
- data/extras/admin-user.yaml +6 -0
- data/extras/aws-auth-cm.yaml.erb +12 -0
- data/extras/clean-stock-amis +48 -0
- data/extras/git-fix-permissions-hook +12 -0
- data/extras/gitlab-eks-helper.sh.erb +20 -0
- data/extras/image-generators/README.md +2 -0
- data/extras/image-generators/aws/centos6.yaml +18 -0
- data/extras/image-generators/aws/centos7-govcloud.yaml +24 -0
- data/extras/image-generators/aws/centos7.yaml +17 -0
- data/extras/image-generators/aws/rhel7.yaml +17 -0
- data/extras/image-generators/aws/win2k12.yaml +16 -0
- data/extras/image-generators/aws/win2k16.yaml +16 -0
- data/extras/image-generators/aws/windows.yaml +18 -0
- data/extras/image-generators/gcp/centos6.yaml +17 -0
- data/extras/lambda_waf_domain_blacklist.py +103 -0
- data/extras/platform_berksfile_base +50 -0
- data/extras/ruby_rpm/build.sh +17 -0
- data/extras/ruby_rpm/muby.spec +44 -0
- data/extras/vault_tools/README.md +6 -0
- data/extras/vault_tools/export_vaults.sh +3 -0
- data/extras/vault_tools/recreate_vaults.sh +5 -0
- data/extras/vault_tools/test_vaults.sh +5 -0
- data/install/README.md +8 -0
- data/install/cfn_create_mu_master.json +1034 -0
- data/install/chef-server.rb.erb +19 -0
- data/install/deprecated-bash-library.sh +1891 -0
- data/install/images/Usage.png +0 -0
- data/install/installer +71 -0
- data/install/jenkinskeys.rb +8 -0
- data/install/user-dot-murc.erb +14 -0
- data/modules/html.erb +19 -0
- data/modules/mommacat.ru +426 -0
- data/modules/mu/cleanup.rb +339 -0
- data/modules/mu/cloud.rb +1446 -0
- data/modules/mu/clouds/README.md +201 -0
- data/modules/mu/clouds/aws/alarm.rb +319 -0
- data/modules/mu/clouds/aws/cache_cluster.rb +1010 -0
- data/modules/mu/clouds/aws/collection.rb +373 -0
- data/modules/mu/clouds/aws/container_cluster.rb +667 -0
- data/modules/mu/clouds/aws/database.rb +1836 -0
- data/modules/mu/clouds/aws/dnszone.rb +911 -0
- data/modules/mu/clouds/aws/firewall_rule.rb +641 -0
- data/modules/mu/clouds/aws/folder.rb +92 -0
- data/modules/mu/clouds/aws/function.rb +349 -0
- data/modules/mu/clouds/aws/group.rb +251 -0
- data/modules/mu/clouds/aws/loadbalancer.rb +888 -0
- data/modules/mu/clouds/aws/log.rb +363 -0
- data/modules/mu/clouds/aws/msg_queue.rb +480 -0
- data/modules/mu/clouds/aws/notification.rb +139 -0
- data/modules/mu/clouds/aws/role.rb +656 -0
- data/modules/mu/clouds/aws/search_domain.rb +646 -0
- data/modules/mu/clouds/aws/server.rb +2294 -0
- data/modules/mu/clouds/aws/server_pool.rb +1388 -0
- data/modules/mu/clouds/aws/storage_pool.rb +495 -0
- data/modules/mu/clouds/aws/user.rb +382 -0
- data/modules/mu/clouds/aws/userdata/README.md +4 -0
- data/modules/mu/clouds/aws/userdata/linux.erb +179 -0
- data/modules/mu/clouds/aws/userdata/windows.erb +278 -0
- data/modules/mu/clouds/aws/vpc.rb +1943 -0
- data/modules/mu/clouds/aws.rb +1009 -0
- data/modules/mu/clouds/cloudformation/alarm.rb +146 -0
- data/modules/mu/clouds/cloudformation/cache_cluster.rb +167 -0
- data/modules/mu/clouds/cloudformation/collection.rb +117 -0
- data/modules/mu/clouds/cloudformation/database.rb +278 -0
- data/modules/mu/clouds/cloudformation/dnszone.rb +274 -0
- data/modules/mu/clouds/cloudformation/firewall_rule.rb +308 -0
- data/modules/mu/clouds/cloudformation/loadbalancer.rb +193 -0
- data/modules/mu/clouds/cloudformation/log.rb +170 -0
- data/modules/mu/clouds/cloudformation/server.rb +370 -0
- data/modules/mu/clouds/cloudformation/server_pool.rb +279 -0
- data/modules/mu/clouds/cloudformation/vpc.rb +322 -0
- data/modules/mu/clouds/cloudformation.rb +733 -0
- data/modules/mu/clouds/docker.rb +30 -0
- data/modules/mu/clouds/google/container_cluster.rb +290 -0
- data/modules/mu/clouds/google/database.rb +152 -0
- data/modules/mu/clouds/google/firewall_rule.rb +267 -0
- data/modules/mu/clouds/google/group.rb +164 -0
- data/modules/mu/clouds/google/loadbalancer.rb +479 -0
- data/modules/mu/clouds/google/server.rb +1510 -0
- data/modules/mu/clouds/google/server_pool.rb +274 -0
- data/modules/mu/clouds/google/user.rb +266 -0
- data/modules/mu/clouds/google/userdata/README.md +4 -0
- data/modules/mu/clouds/google/userdata/linux.erb +137 -0
- data/modules/mu/clouds/google/userdata/windows.erb +275 -0
- data/modules/mu/clouds/google/vpc.rb +890 -0
- data/modules/mu/clouds/google.rb +811 -0
- data/modules/mu/config/README.md +11 -0
- data/modules/mu/config/alarm.rb +271 -0
- data/modules/mu/config/cache_cluster.rb +172 -0
- data/modules/mu/config/collection.rb +87 -0
- data/modules/mu/config/container_cluster.rb +103 -0
- data/modules/mu/config/container_cluster.yml +36 -0
- data/modules/mu/config/database.rb +458 -0
- data/modules/mu/config/database.yml +26 -0
- data/modules/mu/config/dnszone.rb +327 -0
- data/modules/mu/config/firewall_rule.rb +118 -0
- data/modules/mu/config/folder.rb +70 -0
- data/modules/mu/config/function.rb +140 -0
- data/modules/mu/config/group.rb +64 -0
- data/modules/mu/config/loadbalancer.rb +482 -0
- data/modules/mu/config/log.rb +47 -0
- data/modules/mu/config/log.yml +6 -0
- data/modules/mu/config/msg_queue.rb +47 -0
- data/modules/mu/config/msg_queue.yml +9 -0
- data/modules/mu/config/notification.rb +44 -0
- data/modules/mu/config/project.rb +71 -0
- data/modules/mu/config/role.rb +102 -0
- data/modules/mu/config/search_domain.rb +61 -0
- data/modules/mu/config/search_domain.yml +25 -0
- data/modules/mu/config/server.rb +587 -0
- data/modules/mu/config/server.yml +8 -0
- data/modules/mu/config/server_pool.rb +216 -0
- data/modules/mu/config/server_pool.yml +71 -0
- data/modules/mu/config/storage_pool.rb +145 -0
- data/modules/mu/config/user.rb +78 -0
- data/modules/mu/config/vpc.rb +743 -0
- data/modules/mu/config/vpc.yml +6 -0
- data/modules/mu/config.rb +2000 -0
- data/modules/mu/defaults/README.md +2 -0
- data/modules/mu/defaults/amazon_images.yaml +121 -0
- data/modules/mu/defaults/google_images.yaml +16 -0
- data/modules/mu/deploy.rb +686 -0
- data/modules/mu/groomer.rb +123 -0
- data/modules/mu/groomers/README.md +58 -0
- data/modules/mu/groomers/chef.rb +1024 -0
- data/modules/mu/kittens.rb +11319 -0
- data/modules/mu/logger.rb +208 -0
- data/modules/mu/master/README.md +27 -0
- data/modules/mu/master/chef.rb +471 -0
- data/modules/mu/master/ldap.rb +1005 -0
- data/modules/mu/master.rb +415 -0
- data/modules/mu/mommacat.rb +2703 -0
- data/modules/mu-load-config.rb +1 -0
- data/modules/mu.rb +724 -0
- data/modules/scratchpad.erb +1 -0
- data/modules/tests/super_complex_bok.yml +41 -0
- data/modules/tests/super_simple_bok.yml +40 -0
- data/mu.gemspec +62 -0
- data/roles/demo-dbservice-configure.json +19 -0
- data/roles/demo-portal-configure.json +19 -0
- data/roles/mu-master-jenkins.json +24 -0
- data/roles/mu-master-nagios-only.json +13 -0
- data/roles/mu-master.json +12 -0
- data/roles/mu-node.json +19 -0
- data/roles/mu-splunk-server.json +13 -0
- data/roles/mu-splunk.json +13 -0
- data/test/clean_up.py +25 -0
- data/test/demo-test-profile/README.md +3 -0
- data/test/demo-test-profile/controls/flask.rb +84 -0
- data/test/demo-test-profile/inspec.lock +7 -0
- data/test/demo-test-profile/inspec.yml +11 -0
- data/test/etco-test-profile/README.md +3 -0
- data/test/etco-test-profile/controls/all-in-one.rb +182 -0
- data/test/etco-test-profile/inspec.lock +7 -0
- data/test/etco-test-profile/inspec.yml +11 -0
- data/test/exec_inspec.py +246 -0
- data/test/exec_mu_install.py +241 -0
- data/test/exec_retry.py +44 -0
- data/test/mu-master-test/README.md +3 -0
- data/test/mu-master-test/controls/all_in_one.rb +557 -0
- data/test/mu-master-test/inspec.lock +3 -0
- data/test/mu-master-test/inspec.yml +11 -0
- data/test/mu-tools-test/README.md +3 -0
- data/test/mu-tools-test/controls/base.rb +265 -0
- data/test/mu-tools-test/inspec.lock +3 -0
- data/test/mu-tools-test/inspec.yml +8 -0
- data/test/simple-server-php-test/README.md +3 -0
- data/test/simple-server-php-test/controls/apachephp.rb +25 -0
- data/test/simple-server-php-test/controls/example.rb +19 -0
- data/test/simple-server-php-test/inspec.lock +7 -0
- data/test/simple-server-php-test/inspec.yml +12 -0
- data/test/simple-server-rails-test/README.md +3 -0
- data/test/simple-server-rails-test/controls/rails.rb +188 -0
- data/test/simple-server-rails-test/inspec.lock +7 -0
- data/test/simple-server-rails-test/inspec.yml +11 -0
- data/test/simple-windows-test/README.md +3 -0
- data/test/simple-windows-test/controls/windows.rb +20 -0
- data/test/simple-windows-test/inspec.lock +7 -0
- data/test/simple-windows-test/inspec.yml +11 -0
- data/test/smoke_test.rb +75 -0
- data/test/wordpress-test/README.md +3 -0
- data/test/wordpress-test/controls/wordpress.rb +97 -0
- data/test/wordpress-test/inspec.lock +7 -0
- data/test/wordpress-test/inspec.yml +11 -0
- metadata +979 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
name 'mu-php54'
|
2
|
+
maintainer 'Mu'
|
3
|
+
maintainer_email 'mu-developers@googlegroups.com'
|
4
|
+
license 'BSD-3-Clause'
|
5
|
+
|
6
|
+
description 'Installs/Configures php'
|
7
|
+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
8
|
+
source_url 'https://github.com/cloudamatic/mu'
|
9
|
+
issues_url 'https://github.com/cloudamatic/mu/issues'
|
10
|
+
chef_version '>= 14.0' if respond_to?(:chef_version)
|
11
|
+
version '0.3.0'
|
12
|
+
|
13
|
+
%w( centos ubuntu ).each do |os|
|
14
|
+
supports os
|
15
|
+
end
|
16
|
+
|
17
|
+
depends 'mu-utility'
|
18
|
+
depends 'simple_iptables', '~> 0.8.0'
|
19
|
+
depends 'apache2', '< 4.0'
|
20
|
+
depends 'mysql', '~> 8.5.1'
|
21
|
+
depends 'yum-epel', '~> 3.2.0'
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: php5-apache
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright (c) 2014 eGlobalTech, Inc., all rights reserved
|
6
|
+
#
|
7
|
+
# Licensed under the BSD-3 license (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License in the root of the project or at
|
10
|
+
#
|
11
|
+
# http://egt-labs.com/mu/LICENSE.html
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
include_recipe "apache2"
|
20
|
+
|
21
|
+
build_essential 'name' do
|
22
|
+
compile_time True
|
23
|
+
end
|
24
|
+
|
25
|
+
case node['platform']
|
26
|
+
|
27
|
+
when "centos"
|
28
|
+
include_recipe "yum-epel"
|
29
|
+
include_recipe "mu-utility::remi"
|
30
|
+
|
31
|
+
# PHP, from Remi (for 5.4)
|
32
|
+
["mysql-client", "mysql-libs", "mysql-devel", "compat-mysql51", "compat-mysql51-devel", "php", "php-cli"].each { |pkg|
|
33
|
+
package pkg do
|
34
|
+
options "--enablerepo=remi"
|
35
|
+
action :install
|
36
|
+
end
|
37
|
+
}
|
38
|
+
|
39
|
+
# What we really mean is "chef_gem" but that insists on running
|
40
|
+
# at compile time, before any of its dependencies are ready.
|
41
|
+
gem_package "mysql"
|
42
|
+
|
43
|
+
# Sundry libraries for PHP
|
44
|
+
["libmcrypt", "libmcrypt-devel", "php-devel", "php-pdo", "php-mysql", "php-pgsql", "php-gd", "php-pspell", "php-snmp", "php-xmlrpc", "php-xml", "php-mbstring", "php-mcrypt", "php-pear"].each { |pkg|
|
45
|
+
package pkg do
|
46
|
+
options "--enablerepo=remi"
|
47
|
+
action :install
|
48
|
+
end
|
49
|
+
}
|
50
|
+
# PECL modules
|
51
|
+
["php-pecl-memcache", "php-pecl-mongo", "php-pecl-sqlite"].each { |pkg|
|
52
|
+
package pkg do
|
53
|
+
options "--enablerepo=remi"
|
54
|
+
action :install
|
55
|
+
end
|
56
|
+
}
|
57
|
+
|
58
|
+
bash "Allow http and https through iptables" do
|
59
|
+
user "root"
|
60
|
+
not_if "/sbin/iptables -nL | egrep '^ACCEPT.*dpt:(80|443)($| )'"
|
61
|
+
code <<-EOH
|
62
|
+
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
|
63
|
+
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
|
64
|
+
service iptables save
|
65
|
+
EOH
|
66
|
+
end
|
67
|
+
|
68
|
+
when "ubuntu"
|
69
|
+
# XXX rewrite this: https://launchpad.net/~ondrej/+archive/php5-oldstable
|
70
|
+
bash "set default mysql passwords [bad]" do
|
71
|
+
user "root"
|
72
|
+
code <<-EOH
|
73
|
+
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password root'
|
74
|
+
debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password root'
|
75
|
+
EOH
|
76
|
+
end
|
77
|
+
["mysql-server", "php5", "php5-mysql", "libapache2-mod-php5", "php5-curl", "php5-gd", "php5-intl", "php-pear", "php5-imagick", "php5-imap", "php5-mcrypt", "php5-memcache", "php5-ming", "php5-ps", "php5-pspell", "php5-recode", "php5-snmp", "php5-sqlite", "php5-tidy", "php5-xmlrpc", "php5-xsl"].each { |pkg|
|
78
|
+
package pkg
|
79
|
+
}
|
80
|
+
bash "Allow http and https through iptables" do
|
81
|
+
user "root"
|
82
|
+
not_if "/sbin/iptables -nL | egrep '^ACCEPT.*dpt:(80|443)($| )'"
|
83
|
+
code <<-EOH
|
84
|
+
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
|
85
|
+
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
|
86
|
+
EOH
|
87
|
+
end
|
88
|
+
|
89
|
+
else
|
90
|
+
Chef::Log.info("Unsupported platform #{node['platform']}")
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
cookbook_file "/etc/php.ini" do
|
95
|
+
source "php.ini"
|
96
|
+
notifies :restart, "service[apache2]", :delayed
|
97
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
splunk CHANGELOG
|
2
|
+
================
|
3
|
+
|
4
|
+
v1.3.0 (2014-10-24)
|
5
|
+
-------------------
|
6
|
+
|
7
|
+
- Implement dynamic inputs.conf and outputs.conf configuration based on attributes in client recipe.
|
8
|
+
|
9
|
+
v1.2.2 (2014-08-25)
|
10
|
+
-------------------
|
11
|
+
|
12
|
+
- Implement capability to run Splunk as a non-root user
|
13
|
+
- Allow web port to be specified
|
14
|
+
|
15
|
+
v1.2.0 (2014-05-06)
|
16
|
+
-------------------
|
17
|
+
- [COOK-4621] - upgrade to Splunk 6.0.3 (for heartbleed)
|
18
|
+
- add ubuntu 14.04 to test-kitchen
|
19
|
+
|
20
|
+
v1.1.0 (2014-03-19)
|
21
|
+
-------------------
|
22
|
+
- [COOK-4450] - upgrade to Splunk 6.0.2
|
23
|
+
- [COOK-4451] - unbreak test harness
|
24
|
+
|
25
|
+
v1.0.4
|
26
|
+
------
|
27
|
+
- template sources should have .erb explicitly
|
28
|
+
- don't show the password in the execute resource name
|
29
|
+
|
30
|
+
v1.0.2
|
31
|
+
------
|
32
|
+
- Splunk init script supports status, use it in `stop` action for upgrade.
|
33
|
+
|
34
|
+
v1.0.0
|
35
|
+
-----
|
36
|
+
- Initial release
|
37
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Through accessing, reading, or utilizing this software in any manner whatsoever
|
2
|
+
or through any means whatsoever, whether the access, reading or use is either
|
3
|
+
solely looking at this software or this software has been integrated into any
|
4
|
+
derivative work, the party accessing, reading, or utilizing the software
|
5
|
+
directly or indirectly agrees to abide by the following license.
|
6
|
+
|
7
|
+
The eGlobalTech Cloud Automation Platform is the Copyright (c) 2014 of Global
|
8
|
+
Tech Inc. All rights reserved.
|
9
|
+
|
10
|
+
Redistribution and use in source and binary forms, with or without
|
11
|
+
modification, are permitted provided that the following conditions are met:
|
12
|
+
|
13
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
14
|
+
list of conditions and the following disclaimer.
|
15
|
+
|
16
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
17
|
+
this list of conditions and the following disclaimer in the documentation
|
18
|
+
and/or other materials provided with the distribution.
|
19
|
+
|
20
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
21
|
+
may be used to endorse or promote products derived from this software without
|
22
|
+
specific prior written permission.
|
23
|
+
|
24
|
+
Global Tech, Inc. is the co-owner of any derivative works created with this
|
25
|
+
software.
|
26
|
+
|
27
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
28
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
29
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
30
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
31
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
32
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
33
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
34
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
35
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
36
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
37
|
+
|
@@ -0,0 +1,451 @@
|
|
1
|
+
splunk Cookbook
|
2
|
+
===============
|
3
|
+
|
4
|
+
This cookbook manages a Splunk Universal Forwarder (client) or a
|
5
|
+
Splunk Enterprise (server) installation.
|
6
|
+
|
7
|
+
The Splunk default user is admin and the password is changeme. See the
|
8
|
+
`setup_auth` recipe below for more information about how to manage
|
9
|
+
changing the password with Chef and Chef Vault.
|
10
|
+
|
11
|
+
This recipe downloads packages from Splunk directly. There are
|
12
|
+
attributes to set a URL to retrieve the packages, so if the packages
|
13
|
+
are mirrored locally, supply the local URL instead. At this time the
|
14
|
+
cookbook doesn't support installing from networked package managers
|
15
|
+
(like apt or yum), since Splunk doesn't provide package repositories.
|
16
|
+
|
17
|
+
## Requirements
|
18
|
+
|
19
|
+
### Platforms
|
20
|
+
|
21
|
+
This cookbook uses Test Kitchen to do cross-platform convergence and
|
22
|
+
post-convergence tests. The tested platforms are considered supported.
|
23
|
+
This cookbook may work on other platforms or platform versions with or
|
24
|
+
without modification.
|
25
|
+
|
26
|
+
* Debian 7
|
27
|
+
* Ubuntu 10.04, 12.04
|
28
|
+
* CentOS 6
|
29
|
+
* OmniOS r151008
|
30
|
+
|
31
|
+
### Cookbooks
|
32
|
+
|
33
|
+
Used for managing secrets, see __Usage__:
|
34
|
+
|
35
|
+
* chef-vault
|
36
|
+
|
37
|
+
## Attributes
|
38
|
+
|
39
|
+
Attributes have default values set in `attributes/default.rb`. Where
|
40
|
+
possible or appropriate, the default values from Splunk Enterprise are
|
41
|
+
used.
|
42
|
+
|
43
|
+
General attributes:
|
44
|
+
|
45
|
+
* `node['splunk']['accept_license']`: Whether to accept the Splunk
|
46
|
+
EULA. Default is false. This *must* be set to true for Splunk to be
|
47
|
+
functional with this cookbook, which means end users must read the
|
48
|
+
EULA and agree to the terms.
|
49
|
+
* `node['splunk']['is_server']`: Set this to true if the node is a
|
50
|
+
splunk server, for example in a role. Default is false.
|
51
|
+
* `node['splunk']['disabled']`: Disable the splunk agent by setting
|
52
|
+
this to true. Default is false.
|
53
|
+
* `node['splunk']['receiver_port']`: The port that the receiver
|
54
|
+
(server) listens to. This is set to the Splunk Enterprise default,
|
55
|
+
9997.
|
56
|
+
* `node['splunk']['web_port']`: The port that the splunkweb service
|
57
|
+
listens to. This is set to the default for HTTPS, 443, as it is
|
58
|
+
configured by the `setup_ssl` recipe.
|
59
|
+
|
60
|
+
The two URL attributes below are selected by platform and architecture
|
61
|
+
by default.
|
62
|
+
|
63
|
+
* `node['splunk']['forwarder']['url']`: The URL to the Splunk
|
64
|
+
Universal Forwarder package file.
|
65
|
+
* `node['splunk']['server']['url']`: The URL to the Splunk Enterprise
|
66
|
+
package file.
|
67
|
+
|
68
|
+
Special attributes for managing the Splunk user:
|
69
|
+
|
70
|
+
* `node['splunk']['user']`: A hash of attributes to set for the splunk
|
71
|
+
user resource in the `user` recipe. It's unlikely that someone would
|
72
|
+
need to change these, other than the UID, but just in case...
|
73
|
+
|
74
|
+
- `username`: the username
|
75
|
+
- `comment`: gecos field
|
76
|
+
- `home`: the home directory, defaults to `/opt/splunkforwarder`, will
|
77
|
+
be set to `/opt/splunk` if `node['splunk']['is_server']` is true.
|
78
|
+
- `shell`: the shell to use
|
79
|
+
- `uid`: the numeric UID. The default, `396` is an integer arbitrarily
|
80
|
+
chosen and doesn't conflict with anything on the supported platforms
|
81
|
+
(see list above). It is within the `system` UID range on Linux
|
82
|
+
systems.
|
83
|
+
|
84
|
+
* `node['splunk']['server']['runasroot']`: if runasroot is true (which is the splunk upstream package default) then the splunk server runs as root. If runasroot is false modify the init script to run as the `node['splunk']['user']`. This does not apply to the splunk client as they may need root permissions to read logfiles. NOTE1: you may also need to change `node['splunk']['web_port']` on a splunk server to run on a port >1024 if you don't run as root (splunk user cannot bind to privelaged ports). NOTE2: If you want to switch from root to the splunk user or vice versa on an existing install, please stop the splunk service first before changing the runasroot boolean value.
|
85
|
+
|
86
|
+
The following attributes are related to setting up `splunkweb` with
|
87
|
+
SSL in the `setup_ssl` recipe.
|
88
|
+
|
89
|
+
* `node['splunk']['ssl_options']`: A hash of SSL options used in the
|
90
|
+
`setup_ssl` recipe
|
91
|
+
* `node['splunk']['ssl_options']['enable_ssl']`: Whether to enable
|
92
|
+
SSL, must be set to `true` to use the `setup_ssl` recipe. Defaults
|
93
|
+
to `false`, must be set using a boolean literal `true` or `false`.
|
94
|
+
* `node['splunk']['ssl_options']['data_bag']`: The data bag name to
|
95
|
+
load, defaults to `vault` (as chef-vault is used).
|
96
|
+
* `node['splunk']['ssl_options']['data_bag_item']`: The data bag item
|
97
|
+
name that contains the keyfile and crtfile, defaults to
|
98
|
+
`splunk_ceritficates`.
|
99
|
+
* `node['splunk']['ssl_options']['keyfile']`: The name of the SSL key
|
100
|
+
file, and the content will be written to
|
101
|
+
`etc/auth/splunkweb/KEYFILE`. Must be an element under `data` in the
|
102
|
+
data bag item. See __Usage__ for instructions. Defaults to
|
103
|
+
'`self-signed.example.com.key`', and should be changed to something
|
104
|
+
relevant for the local site before use, in a role or wrapper cookbook.
|
105
|
+
* `node['splunk']['ssl_options']['crtfile']`: The name of the SSL cert
|
106
|
+
(crt) file, and the content will be written to
|
107
|
+
`/etc/auth/splunkweb/CRTFILE`. Must be an element under `data` in
|
108
|
+
the data bag item. See __Usage__ for instructions. Defaults to
|
109
|
+
'`self-signed.example.com.crt`', and should be changed to something
|
110
|
+
relevant for the local site before use, in a role or wrapper cookbook.
|
111
|
+
|
112
|
+
The following attributes are related to setting up a splunk forwarder
|
113
|
+
with the `client` recipe
|
114
|
+
|
115
|
+
`node['splunk']['outputs_conf']` is a hash of configuration values that are used to dynamically populate the `outputs.conf` file's "`tcpout:splunk_indexers_PORT`" configuration section. Each key/value pair in the hash is used as configuration in the file. For example the `attributes/default.rb` has this:
|
116
|
+
|
117
|
+
```ruby
|
118
|
+
default['splunk']['outputs_conf'] = {
|
119
|
+
'forwardedindex.0.whitelist' => '.*',
|
120
|
+
'forwardedindex.1.blacklist' => '_.*',
|
121
|
+
'forwardedindex.2.whitelist' => '_audit',
|
122
|
+
'forwardedindex.filter.disable' => 'false'
|
123
|
+
}
|
124
|
+
```
|
125
|
+
|
126
|
+
This will result in the following being rendered in `outputs.conf`:
|
127
|
+
|
128
|
+
```
|
129
|
+
[tcpout:splunk_indexers_9997]
|
130
|
+
server=10.0.2.47:9997
|
131
|
+
forwardedindex.0.whitelist = .*
|
132
|
+
forwardedindex.1.blacklist = _.*
|
133
|
+
forwardedindex.2.whitelist = _audit
|
134
|
+
forwardedindex.filter.disable = false
|
135
|
+
```
|
136
|
+
|
137
|
+
The `tcpout:splunk_indexers_9997` section is defined by the search results for Splunk Servers, and the `server` directive is a comma-separated listed of server IPs and the ports. For example, to add an `sslCertPath` directive, define the attribute in your role, wrapper cookbook, etc:
|
138
|
+
|
139
|
+
```
|
140
|
+
node.default['splunk']['outputs_conf']['sslCertPath'] = '$SPLUNK_HOME/etc/certs/cert.pem'
|
141
|
+
```
|
142
|
+
|
143
|
+
`node['splunk']['inputs_conf']` is a hash of configuration values that are used to populate the `inputs.conf` file.
|
144
|
+
|
145
|
+
* `node['splunk']['inputs_conf']['host']`: A string that specifies the
|
146
|
+
default host name used in the inputs.conf file. The inputs.conf file
|
147
|
+
is not overwritten if this is not set or is an empty string.
|
148
|
+
* `node['splunk']['inputs_conf']['ports']`: An array of hashes that contain
|
149
|
+
the input port configuration necessary to generate the inputs.conf
|
150
|
+
file.
|
151
|
+
|
152
|
+
For example:
|
153
|
+
```
|
154
|
+
node.default['splunk']['inputs_conf'][ports] = [
|
155
|
+
{
|
156
|
+
port_num => 123123,
|
157
|
+
config => {
|
158
|
+
'sourcetype' => 'syslog'
|
159
|
+
}
|
160
|
+
}
|
161
|
+
]
|
162
|
+
```
|
163
|
+
|
164
|
+
The following attributes are related to upgrades in the `upgrade`
|
165
|
+
recipe. **Note** The version is set to 4.3.7 and should be modified to
|
166
|
+
suit in a role or wrapper, since we don't know what upgrade versions
|
167
|
+
may be relevant. Enabling the upgrade and blindly using the default
|
168
|
+
URLs may have undesirable consequences, hence this is not enabled, and
|
169
|
+
must be set explicitly elsewhere on the node(s).
|
170
|
+
|
171
|
+
* `node['splunk']['upgrade_enabled']`: Controls whether the upgrade is
|
172
|
+
enabled and the `attributes/upgrade.rb` file should be loaded. Set
|
173
|
+
this in a role or wrapper cookbook to perform an upgrade.
|
174
|
+
* `node['splunk']['upgrade']`: Sets `server_url` and `forwarder_url`
|
175
|
+
attributes based on platform and architecture. These are only loaded
|
176
|
+
if `upgrade_enabled` is set.
|
177
|
+
|
178
|
+
## Definitions
|
179
|
+
|
180
|
+
### splunk_installer
|
181
|
+
|
182
|
+
The Splunk Enterprise and Splunk Universal Forwarder package
|
183
|
+
installation is the same save the name of the package and the URL to
|
184
|
+
download. This definition abstracts the package installation to a
|
185
|
+
common baseline. Any new platform installation support should be added
|
186
|
+
by modifying the definition as appropriate. One goal of this
|
187
|
+
definition is to have a single occurance of a `package` resource,
|
188
|
+
using the appropriate "local package file" provider per platform. For
|
189
|
+
example, on RHEL, we use `rpm` and on Debian we use `dpkg`.
|
190
|
+
|
191
|
+
Package files will be downloaded to Chef's file cache path (e.g.,
|
192
|
+
`file_cache_path` in `/etc/chef/client.rb`, `/var/chef/cache` by
|
193
|
+
default).
|
194
|
+
|
195
|
+
The definition has two parameters.
|
196
|
+
|
197
|
+
* `name`: The name of the package (e.g., `splunk`).
|
198
|
+
* `url`: The URL to the package file.
|
199
|
+
|
200
|
+
#### Examples
|
201
|
+
|
202
|
+
For example, if the nodes in the environment are all Debian-family,
|
203
|
+
and the desired splunkforwarder package is provided locally as
|
204
|
+
`splunkforwarder.deb` on an internal HTTP server:
|
205
|
+
|
206
|
+
```ruby
|
207
|
+
splunk_installer 'splunkforwarder' do
|
208
|
+
url 'https://www-int.example.com/splunk/splunkforwarder.deb'
|
209
|
+
end
|
210
|
+
```
|
211
|
+
|
212
|
+
The `install_forwarder` and `install_server` recipes use the
|
213
|
+
definition with the appropriate `url` attribute.
|
214
|
+
|
215
|
+
## Recipes
|
216
|
+
|
217
|
+
This cookbook has several composable recipes that can be used in a
|
218
|
+
role, or a local "wrapper" cookbook. The `default`, `client`, and
|
219
|
+
`server` recipes are intended to be used wholesale with all the
|
220
|
+
assumptions they contain.
|
221
|
+
|
222
|
+
The general default assumption is that a node including the `default`
|
223
|
+
recipe will be a Splunk Universal Forwarder (client).
|
224
|
+
|
225
|
+
### client
|
226
|
+
|
227
|
+
This recipe encapsulates a completely configured "client" - a Splunk
|
228
|
+
Universal Forwarder configured to talk to a node that is the splunk
|
229
|
+
server (with node['splunk']['is_server'] true). The recipes can be
|
230
|
+
used on their own composed in a wrapper cookbook or role. This recipe
|
231
|
+
will include the `user`, `install_forwarder`, `service`, and
|
232
|
+
`setup_auth` recipes.
|
233
|
+
|
234
|
+
It will also search a Chef Server for a Splunk Enterprise (server)
|
235
|
+
node with `splunk_is_server:true` in the same `chef_environment` and
|
236
|
+
write out `etc/system/local/outputs.conf` with the server's IP and the
|
237
|
+
`receiver_port` attribute in the Splunk install directory
|
238
|
+
(`/opt/splunkforwarder`).
|
239
|
+
|
240
|
+
Setting node['splunk']['tcpout_server_config_map'] with key value pairs
|
241
|
+
updates the outputs.conf server configuration with those key value pairs.
|
242
|
+
These key value pairs can be used to setup SSL encryption on messages
|
243
|
+
forwarded through this client:
|
244
|
+
|
245
|
+
```
|
246
|
+
# Note that the ssl CA and certs must exist on the server.
|
247
|
+
node['splunk']['tcpout_server_config_map'] = {
|
248
|
+
'sslCommonNameToCheck' => 'sslCommonName',
|
249
|
+
'sslCertPath' => '$SPLUNK_HOME/etc/certs/cert.pem',
|
250
|
+
'sslPassword' => 'password'
|
251
|
+
'sslRootCAPath' => '$SPLUNK_HOME/etc/certs/cacert.pem'
|
252
|
+
'sslVerifyServerCert' => false
|
253
|
+
}
|
254
|
+
```
|
255
|
+
|
256
|
+
The inputs.conf file can also be managed through this recipe if you want to
|
257
|
+
setup a splunk forwarder just set the default host:
|
258
|
+
|
259
|
+
```
|
260
|
+
node['splunk']['inputs_conf']['host'] = 'myhost'
|
261
|
+
```
|
262
|
+
Then set up the port configuration for each input port:
|
263
|
+
|
264
|
+
```
|
265
|
+
node['splunk']['inputs_conf']['ports'] =
|
266
|
+
[
|
267
|
+
{
|
268
|
+
port_num => 123123,
|
269
|
+
config => {
|
270
|
+
'sourcetype' => 'syslog',
|
271
|
+
...
|
272
|
+
}
|
273
|
+
},
|
274
|
+
...
|
275
|
+
]
|
276
|
+
```
|
277
|
+
|
278
|
+
|
279
|
+
### default
|
280
|
+
|
281
|
+
The default recipe will include the `disabled` recipe if
|
282
|
+
`node['splunk']['disabled']` is true.
|
283
|
+
|
284
|
+
It will include the `client` or `server` recipe depending on whether
|
285
|
+
the `is_server` attribute is set.
|
286
|
+
|
287
|
+
The attribute use allows users to control the included recipes by
|
288
|
+
easily manipulating the attributes of a node, or a node's roles, or
|
289
|
+
through a wrapper cookbook.
|
290
|
+
|
291
|
+
### disabled
|
292
|
+
|
293
|
+
In some cases it may be required to disable Splunk on a particular
|
294
|
+
node. For example, it may be sending too much data to Splunk and
|
295
|
+
exceed the local license capacity. To use the `disabled` recipe, set
|
296
|
+
the `node['splunk']['disabled']` attribute to true, and include the
|
297
|
+
recipe on the required node, or just use the `default` recipe.
|
298
|
+
|
299
|
+
### install_forwarder
|
300
|
+
|
301
|
+
This recipe uses the `splunk_installer` definition to install the
|
302
|
+
splunkforwarder package from the specified URL (via the
|
303
|
+
`node['splunk']['forwarder']['url']` attribute).
|
304
|
+
|
305
|
+
### install_server
|
306
|
+
|
307
|
+
This recipe uses the `splunk_installer` definition to install the
|
308
|
+
splunk (Enterprise server) package from the specified URL (via the
|
309
|
+
`node['splunk']['server']['url']` attribute).
|
310
|
+
|
311
|
+
### server
|
312
|
+
|
313
|
+
This recipe encapsulates a completely configured "server" - Splunk
|
314
|
+
Enterprise configured to receive data from Splunk Universal Forwarder
|
315
|
+
clients. The recipe sets the attribute `node['splunk']['is_server']`
|
316
|
+
to true, and is included from the `default` recipe if the attribute is
|
317
|
+
true as well. The recipes can be used on their own composed in a
|
318
|
+
wrapper cookbook or role, too. This recipe will include the `user`,
|
319
|
+
`install_server`, `service`, and `setup_auth` recipes.
|
320
|
+
|
321
|
+
It will also enable Splunk Enterprise as an indexer, listening on the
|
322
|
+
`node['splunk']['receiver_port']`.
|
323
|
+
|
324
|
+
## service
|
325
|
+
|
326
|
+
This recipe sets up the `splunk` service, and applies to both client
|
327
|
+
and server use, since `splunk` is the same service for both
|
328
|
+
deployments of Splunk.
|
329
|
+
|
330
|
+
The attribute `node['splunk']['accept_license']` must be true in order
|
331
|
+
to set up the boot script. If it's true, then the boot script gets put
|
332
|
+
into place (`/etc/init.d/splunk` on Linux/Unix systems), with the
|
333
|
+
license accepted. The service is managed using the Chef `init` service
|
334
|
+
provider, which operates by using the `/etc/init.d/splunk` script for
|
335
|
+
start, stop, restart, etc commands.
|
336
|
+
|
337
|
+
## setup_auth
|
338
|
+
|
339
|
+
This recipe loads an encrypted data bag with the Splunk user
|
340
|
+
credentials as an `-auth` string, '`user:password`', using the
|
341
|
+
[chef-vault cookbook](http://ckbk.it/chef-vault) helper method,
|
342
|
+
`chef_vault_item`. See __Usage__ for how to set this up. The recipe
|
343
|
+
will edit the specified user (assuming `admin`), and then write a
|
344
|
+
state file to `etc/.setup_admin_password` to indicate in future Chef
|
345
|
+
runs that it has set the password. If the password should be changed,
|
346
|
+
then that file should be removed.
|
347
|
+
|
348
|
+
## upgrade
|
349
|
+
|
350
|
+
**Important** Read the upgrade documentation and release notes for any
|
351
|
+
particular Splunk version upgrades before performing an upgrade.
|
352
|
+
Also back up the Splunk directory, configuration, etc.
|
353
|
+
|
354
|
+
This recipe can be used to upgrade a splunk installation, for example
|
355
|
+
from an existing 4.2.1 to 4.3.7. The default recipe can be used for
|
356
|
+
6.0.1 after upgrading earlier versions is completed. Note that the
|
357
|
+
attributes file is only loaded w/ the URLs to the splunk packages to
|
358
|
+
upgrade if the `node['splunk']['upgrade_enabled']` attribute is set to
|
359
|
+
true. We recommend setting the actual URL attributes needed in a
|
360
|
+
wrapper cookbook or role.
|
361
|
+
|
362
|
+
## user
|
363
|
+
|
364
|
+
This recipe manages the `splunk` user and group. On Linux systems, the
|
365
|
+
user and group will be created with the `system` attribute; other
|
366
|
+
platforms may not be aware of `system` users/groups (e.g.,
|
367
|
+
illumos/solaris). Both resources will be created with the UID or GID
|
368
|
+
of the `node['splunk']['user']['uid']` attribute. The default value is
|
369
|
+
396, arbitrarily chosen to fall under the `system` UID/GID set by
|
370
|
+
`/etc/login.defs` on both RHEL and Debian family Linux systems. If
|
371
|
+
this is a conflicting UID/GID, then modify the attribute as required.
|
372
|
+
|
373
|
+
## Usage
|
374
|
+
|
375
|
+
### Data Bag Items
|
376
|
+
|
377
|
+
#### Admin User Authentication
|
378
|
+
|
379
|
+
Splunk admin user authentication information should be stored in a
|
380
|
+
data bag item that is encrypted using Chef Vault. Create a data bag
|
381
|
+
named `vault`, with an item `splunk_CHEF-ENVIRONMENT`, where
|
382
|
+
`CHEF-ENVIRONMENT` is the `node.chef_environment` that the Splunk
|
383
|
+
Enterprise server will be assigned. If environments are not used, use
|
384
|
+
`_default`. For example in a Chef Repository (not in a cookbook):
|
385
|
+
|
386
|
+
% cat data_bags/vault/splunk__default.json
|
387
|
+
{
|
388
|
+
"id": "splunk__default",
|
389
|
+
"auth": "admin:notarealpassword"
|
390
|
+
}
|
391
|
+
|
392
|
+
Or with an environment, '`production`':
|
393
|
+
|
394
|
+
% cat data_bags/vault/splunk_production.json
|
395
|
+
{
|
396
|
+
"id": "splunk_production",
|
397
|
+
"auth": "admin:notarealpassword"
|
398
|
+
}
|
399
|
+
|
400
|
+
Then, upload the data bag item to the Chef Server using the
|
401
|
+
`chef-vault` `knife encrypt` plugin (first example, `_default`
|
402
|
+
environment):
|
403
|
+
|
404
|
+
knife encrypt create vault splunk__default \
|
405
|
+
--json data_bags/vault/splunk__default.json \
|
406
|
+
--search 'splunk:*' --admins 'yourusername' \
|
407
|
+
--mode client
|
408
|
+
|
409
|
+
More information about Chef Vault is available on the
|
410
|
+
[GitHub Project Page](https://github.com/Nordstrom/chef-vault).
|
411
|
+
|
412
|
+
#### Web UI SSL
|
413
|
+
|
414
|
+
A Splunk server should have the Web UI available via HTTPS. This can
|
415
|
+
be set up using self-signed SSL certificates, or "real" SSL
|
416
|
+
certificates. This loaded via a data bag item with chef-vault. Using
|
417
|
+
the defaults from the attributes:
|
418
|
+
|
419
|
+
% cat data_bags/vault/splunk_certificates.json
|
420
|
+
{
|
421
|
+
"id": "splunk_certificates",
|
422
|
+
"data": {
|
423
|
+
"self-signed.example.com.crt": "-----BEGIN CERTIFICATE-----\n...SNIP",
|
424
|
+
"self-signed.example.com.key": "-----BEGIN RSA PRIVATE KEY-----\n...SNIP"
|
425
|
+
}
|
426
|
+
}
|
427
|
+
|
428
|
+
Like the authentication credentials above, run the `knife encrypt`
|
429
|
+
command. Note the search here is for the splunk server only:
|
430
|
+
|
431
|
+
knife encrypt create vault splunk_certificates \
|
432
|
+
--json data_bags/vault/splunk_certificates.json \
|
433
|
+
--search 'splunk_is_server:true' --admins 'yourusername' \
|
434
|
+
--mode client
|
435
|
+
|
436
|
+
## License and Authors
|
437
|
+
|
438
|
+
- Author: Joshua Timberman <joshua@getchef.com>
|
439
|
+
- Copyright 2013, Chef Software, Inc <legal@getchef.com>
|
440
|
+
|
441
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
442
|
+
you may not use this file except in compliance with the License.
|
443
|
+
You may obtain a copy of the License at
|
444
|
+
|
445
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
446
|
+
|
447
|
+
Unless required by applicable law or agreed to in writing, software
|
448
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
449
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
450
|
+
See the License for the specific language governing permissions and
|
451
|
+
limitations under the License.
|