puppet 3.0.0.rc5 → 3.0.0.rc7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/LICENSE +1 -1
- data/README_DEVELOPER.md +209 -1
- data/README_HIERA.md +148 -0
- data/Rakefile +25 -27
- data/bin/extlookup2hiera +56 -0
- data/conf/auth.conf +34 -34
- data/examples/hiera/README.md +91 -0
- data/examples/hiera/etc/hiera.yaml +15 -0
- data/examples/hiera/etc/hieradb/common.yaml +3 -0
- data/examples/hiera/etc/hieradb/dc1.yaml +6 -0
- data/examples/hiera/etc/hieradb/development.yaml +2 -0
- data/examples/hiera/etc/puppet.conf +3 -0
- data/examples/hiera/modules/data/manifests/common.pp +3 -0
- data/examples/hiera/modules/ntp/manifests/config.pp +5 -0
- data/examples/hiera/modules/ntp/manifests/data.pp +3 -0
- data/examples/hiera/modules/ntp/templates/ntp.conf.erb +3 -0
- data/examples/hiera/modules/users/manifests/common.pp +3 -0
- data/examples/hiera/modules/users/manifests/dc1.pp +3 -0
- data/examples/hiera/modules/users/manifests/development.pp +3 -0
- data/examples/hiera/site.pp +3 -0
- data/ext/build_defaults.yaml +23 -0
- data/ext/debian/README.Debian +8 -0
- data/ext/debian/README.source +2 -0
- data/ext/debian/TODO.Debian +1 -0
- data/ext/debian/changelog.erb +1104 -0
- data/ext/debian/compat +1 -0
- data/ext/debian/control +143 -0
- data/ext/debian/copyright +361 -0
- data/ext/debian/docs +1 -0
- data/ext/debian/fileserver.conf +17 -0
- data/ext/debian/puppet-common.dirs +8 -0
- data/ext/debian/puppet-common.install +4 -0
- data/ext/debian/puppet-common.lintian-overrides +5 -0
- data/ext/debian/puppet-common.manpages +2 -0
- data/ext/debian/puppet-common.postinst +35 -0
- data/ext/debian/puppet-common.postrm +32 -0
- data/ext/debian/puppet-el.dirs +1 -0
- data/ext/debian/puppet-el.emacsen-install +25 -0
- data/ext/debian/puppet-el.emacsen-remove +11 -0
- data/ext/debian/puppet-el.emacsen-startup +9 -0
- data/ext/debian/puppet-el.install +1 -0
- data/ext/debian/puppet-testsuite.install +2 -0
- data/ext/debian/puppet-testsuite.lintian-overrides +4 -0
- data/ext/debian/puppet.conf +14 -0
- data/ext/debian/puppet.default +7 -0
- data/ext/debian/puppet.init +118 -0
- data/ext/debian/puppet.lintian-overrides +3 -0
- data/ext/debian/puppet.logrotate +11 -0
- data/ext/debian/puppet.manpages +32 -0
- data/ext/debian/puppet.postinst +20 -0
- data/ext/debian/puppet.postrm +20 -0
- data/ext/debian/puppet.preinst +20 -0
- data/ext/debian/puppetmaster-common.install +2 -0
- data/ext/debian/puppetmaster-common.manpages +2 -0
- data/ext/debian/puppetmaster-common.puppetqd.default +27 -0
- data/ext/debian/puppetmaster-common.puppetqd.init +84 -0
- data/ext/debian/puppetmaster-passenger.dirs +4 -0
- data/ext/debian/puppetmaster-passenger.postinst +66 -0
- data/ext/debian/puppetmaster-passenger.postrm +33 -0
- data/ext/debian/puppetmaster.README.debian +16 -0
- data/ext/debian/puppetmaster.default +38 -0
- data/ext/debian/puppetmaster.init +158 -0
- data/ext/debian/puppetmaster.lintian-overrides +3 -0
- data/ext/debian/puppetmaster.postinst +20 -0
- data/ext/debian/puppetmaster.postrm +5 -0
- data/ext/debian/puppetmaster.preinst +22 -0
- data/ext/debian/rules +128 -0
- data/ext/debian/source/format +1 -0
- data/ext/debian/source/options +1 -0
- data/ext/debian/vim-puppet.README.Debian +13 -0
- data/ext/debian/vim-puppet.dirs +3 -0
- data/ext/debian/vim-puppet.yaml +5 -0
- data/ext/debian/watch +2 -0
- data/ext/emacs/puppet-mode.el +1 -0
- data/ext/envpuppet +4 -0
- data/ext/envpuppet.bat +3 -2
- data/{conf → ext}/freebsd/puppetd +0 -0
- data/{conf → ext}/freebsd/puppetmasterd +0 -0
- data/{conf → ext}/gentoo/conf.d/puppet +0 -0
- data/{conf → ext}/gentoo/conf.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/init.d/puppet +0 -0
- data/{conf → ext}/gentoo/init.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/puppet/fileserver.conf +0 -0
- data/{conf → ext}/gentoo/puppet/puppet.conf +0 -0
- data/ext/ips/puppet-agent +49 -0
- data/ext/ips/puppet-master +44 -0
- data/ext/ips/puppet.conf +29 -0
- data/ext/ips/puppet.p5m.erb +12 -0
- data/ext/ips/puppetagent.xml +46 -0
- data/ext/ips/puppetmaster.xml +42 -0
- data/ext/ips/rules +19 -0
- data/ext/ips/transforms +34 -0
- data/{conf → ext}/osx/PackageInfo.plist +0 -0
- data/{conf → ext}/osx/createpackage.sh +1 -1
- data/ext/osx/file_mapping.yaml +33 -0
- data/ext/osx/preflight.erb +37 -0
- data/{tasks/rake/templates → ext/osx}/prototype.plist.erb +0 -0
- data/ext/packaging/README-Solaris.md +117 -0
- data/ext/packaging/README.md +89 -0
- data/ext/packaging/tasks/00_utils.rb +236 -0
- data/ext/packaging/tasks/10_setupvars.rake +62 -0
- data/ext/packaging/tasks/apple.rake +201 -0
- data/ext/packaging/tasks/clean.rake +5 -0
- data/ext/packaging/tasks/deb.rake +105 -0
- data/ext/packaging/tasks/gem.rake +52 -0
- data/ext/packaging/tasks/ips.rake +78 -0
- data/ext/packaging/tasks/mock.rake +88 -0
- data/ext/packaging/tasks/release.rake +20 -0
- data/ext/packaging/tasks/rpm.rake +39 -0
- data/ext/packaging/tasks/ship.rake +34 -0
- data/ext/packaging/tasks/sign.rake +76 -0
- data/ext/packaging/tasks/tar.rake +20 -0
- data/ext/project_data.yaml +25 -0
- data/ext/rack/files/apache2.conf +2 -1
- data/{conf → ext}/redhat/client.init +0 -0
- data/{conf → ext}/redhat/client.sysconfig +0 -0
- data/{conf → ext}/redhat/fileserver.conf +0 -0
- data/{conf → ext}/redhat/logrotate +0 -0
- data/{conf → ext}/redhat/puppet.conf +0 -0
- data/{conf/redhat/puppet.spec → ext/redhat/puppet.spec.erb} +140 -33
- data/{conf → ext}/redhat/queue.init +0 -0
- data/{conf → ext}/redhat/rundir-perms.patch +0 -0
- data/{conf → ext}/redhat/server.init +0 -0
- data/{conf → ext}/redhat/server.sysconfig +0 -0
- data/{conf → ext}/solaris/pkginfo +0 -0
- data/{conf → ext}/solaris/smf/puppetd.xml +0 -0
- data/{conf → ext}/solaris/smf/puppetmasterd.xml +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetd +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetmasterd +0 -0
- data/{conf → ext}/suse/client.init +0 -0
- data/{conf → ext}/suse/fileserver.conf +0 -0
- data/{conf → ext}/suse/logrotate +0 -0
- data/{conf → ext}/suse/puppet.conf +0 -0
- data/{conf → ext}/suse/puppet.spec +1 -1
- data/{conf → ext}/suse/server.init +0 -0
- data/ext/systemd/puppetagent.service +13 -0
- data/ext/systemd/puppetmaster.service +13 -0
- data/{conf → ext}/windows/eventlog/Rakefile +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.dll +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.mc +0 -0
- data/ext/windows/service/daemon.bat +6 -0
- data/ext/windows/service/daemon.rb +90 -0
- data/install.rb +22 -32
- data/lib/hiera/backend/puppet_backend.rb +102 -0
- data/lib/hiera/scope.rb +42 -0
- data/lib/hiera_puppet.rb +89 -0
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/agent/locker.rb +12 -9
- data/lib/puppet/application.rb +10 -8
- data/lib/puppet/application/agent.rb +12 -8
- data/lib/puppet/application/apply.rb +2 -2
- data/lib/puppet/application/cert.rb +6 -6
- data/lib/puppet/application/certificate.rb +1 -4
- data/lib/puppet/application/describe.rb +1 -1
- data/lib/puppet/application/device.rb +5 -2
- data/lib/puppet/application/doc.rb +1 -1
- data/lib/puppet/application/face_base.rb +3 -13
- data/lib/puppet/application/filebucket.rb +1 -1
- data/lib/puppet/application/inspect.rb +1 -1
- data/lib/puppet/application/kick.rb +4 -2
- data/lib/puppet/application/master.rb +2 -2
- data/lib/puppet/application/queue.rb +3 -1
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/configurer.rb +11 -7
- data/lib/puppet/configurer/downloader.rb +1 -4
- data/lib/puppet/daemon.rb +4 -4
- data/lib/puppet/defaults.rb +64 -60
- data/lib/puppet/external/dot.rb +1 -1
- data/lib/puppet/external/pson/common.rb +15 -0
- data/lib/puppet/external/pson/pure.rb +0 -62
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +2 -2
- data/lib/puppet/face/ca.rb +19 -14
- data/lib/puppet/face/config.rb +2 -2
- data/lib/puppet/face/facts.rb +1 -1
- data/lib/puppet/face/help/action.erb +0 -1
- data/lib/puppet/face/help/face.erb +0 -1
- data/lib/puppet/face/help/man.erb +3 -6
- data/lib/puppet/face/module/install.rb +1 -1
- data/lib/puppet/face/module/list.rb +1 -1
- data/lib/puppet/face/module/uninstall.rb +1 -1
- data/lib/puppet/face/node.rb +1 -1
- data/lib/puppet/face/node/clean.rb +30 -25
- data/lib/puppet/feature/base.rb +0 -3
- data/lib/puppet/feature/rails.rb +2 -1
- data/lib/puppet/file_serving/terminus_selector.rb +1 -1
- data/lib/puppet/indirector/catalog/active_record.rb +5 -0
- data/lib/puppet/indirector/catalog/static_compiler.rb +2 -3
- data/lib/puppet/indirector/certificate/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_request/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/face.rb +3 -3
- data/lib/puppet/indirector/facts/active_record.rb +5 -0
- data/lib/puppet/indirector/facts/facter.rb +1 -4
- data/lib/puppet/indirector/facts/inventory_active_record.rb +6 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +2 -1
- data/lib/puppet/indirector/indirection.rb +2 -2
- data/lib/puppet/indirector/key/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/node/active_record.rb +5 -0
- data/lib/puppet/indirector/request.rb +4 -0
- data/lib/puppet/indirector/resource/active_record.rb +5 -0
- data/lib/puppet/network/authentication.rb +30 -0
- data/lib/puppet/network/http.rb +0 -13
- data/lib/puppet/network/http/connection.rb +10 -2
- data/lib/puppet/network/http/handler.rb +8 -0
- data/lib/puppet/network/http/mongrel/rest.rb +5 -0
- data/lib/puppet/network/http/rack/rest.rb +7 -0
- data/lib/puppet/network/http/webrick.rb +3 -6
- data/lib/puppet/network/http/webrick/rest.rb +4 -0
- data/lib/puppet/network/server.rb +9 -33
- data/lib/puppet/node.rb +1 -1
- data/lib/puppet/node/facts.rb +0 -1
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions.rb +12 -1
- data/lib/puppet/parser/functions/hiera.rb +8 -0
- data/lib/puppet/parser/functions/hiera_array.rb +8 -0
- data/lib/puppet/parser/functions/hiera_hash.rb +8 -0
- data/lib/puppet/parser/functions/hiera_include.rb +11 -0
- data/lib/puppet/parser/functions/shellquote.rb +21 -29
- data/lib/puppet/parser/lexer.rb +2 -1
- data/lib/puppet/parser/scope.rb +8 -0
- data/lib/puppet/provider/exec/windows.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +2 -3
- data/lib/puppet/provider/package/pkg.rb +37 -10
- data/lib/puppet/provider/service/daemontools.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +8 -3
- data/lib/puppet/provider/user/windows_adsi.rb +11 -0
- data/lib/puppet/provider/zfs/zfs.rb +29 -2
- data/lib/puppet/provider/zone/solaris.rb +144 -39
- data/lib/puppet/provider/zpool/zpool.rb +7 -10
- data/lib/puppet/settings.rb +50 -86
- data/lib/puppet/settings/duration_setting.rb +34 -0
- data/lib/puppet/settings/terminus_setting.rb +16 -0
- data/lib/puppet/ssl/base.rb +49 -9
- data/lib/puppet/ssl/certificate.rb +13 -9
- data/lib/puppet/ssl/certificate_authority.rb +4 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +10 -17
- data/lib/puppet/ssl/certificate_factory.rb +4 -21
- data/lib/puppet/ssl/certificate_request.rb +1 -10
- data/lib/puppet/ssl/certificate_revocation_list.rb +1 -3
- data/lib/puppet/ssl/digest.rb +20 -0
- data/lib/puppet/ssl/host.rb +31 -6
- data/lib/puppet/test/test_helper.rb +1 -1
- data/lib/puppet/transaction/report.rb +2 -1
- data/lib/puppet/type.rb +1 -1
- data/lib/puppet/type/augeas.rb +1 -1
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +7 -8
- data/lib/puppet/type/file.rb +1 -1
- data/lib/puppet/type/file/content.rb +2 -2
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/mode.rb +1 -1
- data/lib/puppet/type/file/selcontext.rb +6 -2
- data/lib/puppet/type/file/source.rb +1 -1
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +1 -1
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/zone.rb +126 -253
- data/lib/puppet/util.rb +10 -23
- data/lib/puppet/util/adsi.rb +22 -14
- data/lib/puppet/util/log/destinations.rb +7 -0
- data/lib/puppet/util/log/rate_limited_logger.rb +40 -0
- data/lib/puppet/util/metric.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +8 -0
- data/lib/puppet/util/platform.rb +7 -0
- data/lib/puppet/util/selinux.rb +31 -36
- data/lib/puppet/util/windows/error.rb +1 -1
- data/lib/puppet/util/windows/process.rb +3 -3
- data/lib/puppet/util/windows/security.rb +7 -7
- data/lib/puppet/util/windows/user.rb +65 -2
- data/lib/puppet/util/zaml.rb +90 -46
- data/lib/puppet/version.rb +1 -1
- data/spec/fixtures/hiera.yaml +9 -0
- data/spec/fixtures/manifests/site.pp +0 -0
- data/spec/integration/defaults_spec.rb +25 -11
- data/spec/integration/faces/ca_spec.rb +11 -16
- data/spec/integration/network/server/webrick_spec.rb +14 -27
- data/spec/integration/node_spec.rb +4 -1
- data/spec/integration/parser/functions/require_spec.rb +3 -3
- data/spec/integration/parser/undef_param_spec.rb +88 -0
- data/spec/integration/provider/mount_spec.rb +4 -1
- data/spec/integration/ssl/certificate_authority_spec.rb +18 -0
- data/spec/lib/puppet_spec/files.rb +3 -3
- data/spec/lib/puppet_spec/settings.rb +0 -1
- data/spec/shared_contexts/platform.rb +8 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/agent/locker_spec.rb +8 -2
- data/spec/unit/application/agent_spec.rb +29 -7
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/device_spec.rb +18 -1
- data/spec/unit/application/face_base_spec.rb +16 -2
- data/spec/unit/application/kick_spec.rb +8 -0
- data/spec/unit/application/queue_spec.rb +5 -0
- data/spec/unit/application_spec.rb +13 -23
- data/spec/unit/configurer/downloader_spec.rb +2 -11
- data/spec/unit/configurer_spec.rb +6 -0
- data/spec/unit/face/node_spec.rb +1 -1
- data/spec/unit/hiera/backend/puppet_backend_spec.rb +140 -0
- data/spec/unit/hiera/scope_spec.rb +62 -0
- data/spec/unit/hiera_puppet_spec.rb +111 -0
- data/spec/unit/indirector/catalog/active_record_spec.rb +4 -0
- data/spec/unit/indirector/catalog/static_compiler_spec.rb +194 -0
- data/spec/unit/indirector/certificate/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_request/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_revocation_list/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/facts/active_record_spec.rb +37 -26
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -0
- data/spec/unit/indirector/hiera_spec.rb +2 -1
- data/spec/unit/indirector/key/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/node/active_record_spec.rb +7 -0
- data/spec/unit/indirector/request_spec.rb +22 -0
- data/spec/unit/indirector/resource/active_record_spec.rb +5 -0
- data/spec/unit/module_tool/application_spec.rb +1 -1
- data/spec/unit/network/authentication_spec.rb +86 -0
- data/spec/unit/network/http/connection_spec.rb +21 -0
- data/spec/unit/network/http/handler_spec.rb +12 -0
- data/spec/unit/network/http/rack/rest_spec.rb +7 -0
- data/spec/unit/network/http/webrick_spec.rb +11 -26
- data/spec/unit/network/server_spec.rb +79 -192
- data/spec/unit/node/facts_spec.rb +2 -2
- data/spec/unit/parser/ast/vardef_spec.rb +4 -4
- data/spec/unit/parser/files_spec.rb +3 -0
- data/spec/unit/parser/functions/defined_spec.rb +5 -5
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_array_spec.rb +23 -0
- data/spec/unit/parser/functions/hiera_hash_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_include_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_spec.rb +21 -0
- data/spec/unit/parser/functions/include_spec.rb +3 -3
- data/spec/unit/parser/functions/realize_spec.rb +3 -3
- data/spec/unit/parser/functions/require_spec.rb +5 -5
- data/spec/unit/parser/functions/shellquote_spec.rb +0 -4
- data/spec/unit/parser/functions_spec.rb +6 -10
- data/spec/unit/parser/lexer_spec.rb +13 -0
- data/spec/unit/parser/scope_spec.rb +16 -1
- data/spec/unit/provider/exec/posix_spec.rb +7 -6
- data/spec/unit/provider/group/groupadd_spec.rb +36 -30
- data/spec/unit/provider/package/pkg_spec.rb +16 -2
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/sshkey/parsed_spec.rb +4 -0
- data/spec/unit/provider/user/user_role_add_spec.rb +125 -126
- data/spec/unit/provider/user/useradd_spec.rb +147 -118
- data/spec/unit/provider/user/windows_adsi_spec.rb +22 -0
- data/spec/unit/provider/zone/solaris_spec.rb +126 -7
- data/spec/unit/provider/zpool/zpool_spec.rb +4 -3
- data/spec/unit/puppet_spec.rb +7 -0
- data/spec/unit/settings/duration_setting_spec.rb +45 -0
- data/spec/unit/settings/terminus_setting_spec.rb +28 -0
- data/spec/unit/settings_spec.rb +21 -23
- data/spec/unit/ssl/base_spec.rb +68 -19
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +19 -30
- data/spec/unit/ssl/certificate_authority_spec.rb +3 -2
- data/spec/unit/ssl/certificate_factory_spec.rb +15 -6
- data/spec/unit/ssl/certificate_request_spec.rb +80 -113
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +1 -1
- data/spec/unit/ssl/certificate_spec.rb +26 -2
- data/spec/unit/ssl/digest_spec.rb +35 -0
- data/spec/unit/ssl/host_spec.rb +73 -27
- data/spec/unit/ssl/key_spec.rb +0 -4
- data/spec/unit/type/exec_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +2 -1
- data/spec/unit/type/scheduled_task_spec.rb +2 -2
- data/spec/unit/type/zone_spec.rb +52 -10
- data/spec/unit/util/adsi_spec.rb +19 -0
- data/spec/unit/util/checksums_spec.rb +2 -3
- data/spec/unit/util/execution_spec.rb +1 -1
- data/spec/unit/util/log/destinations_spec.rb +1 -0
- data/spec/unit/util/log/rate_limited_logger_spec.rb +51 -0
- data/spec/unit/util/logging_spec.rb +6 -6
- data/spec/unit/util/selinux_spec.rb +24 -32
- data/spec/unit/util/zaml_spec.rb +94 -6
- data/spec/unit/util_spec.rb +17 -0
- data/spec/watchr.rb +2 -6
- data/tasks/{rake/manpages.rake → manpages.rake} +0 -0
- data/tasks/{rake/parser.rake → parser.rake} +0 -0
- metadata +1003 -119
- data/CHANGELOG +0 -9233
- data/conf/osx/preflight +0 -24
- data/lib/puppet/network/http/mongrel.rb +0 -35
- data/lib/puppet/util/config_timeout.rb +0 -24
- data/spec/unit/network/http/mongrel/rest_spec.rb +0 -257
- data/spec/unit/network/http/mongrel_spec.rb +0 -91
- data/spec/unit/network/http_spec.rb +0 -31
- data/spec/unit/util/config_timeout_spec.rb +0 -57
- data/tasks/rake/apple.rake +0 -176
- data/tasks/rake/changelog.rake +0 -15
- data/tasks/rake/ci.rake +0 -22
- data/tasks/rake/dailybuild.rake +0 -9
- data/tasks/rake/gem.rake +0 -63
- data/tasks/rake/git_workflow.rake +0 -134
- data/tasks/rake/metrics.rake +0 -14
- data/tasks/rake/sign.rake +0 -14
- data/tasks/rake/testbranch.rake +0 -16
- data/tasks/rake/yard.rake +0 -11
@@ -0,0 +1,27 @@
|
|
1
|
+
# Defaults for puppetqd - sourced by /etc/init.d/puppetqd
|
2
|
+
|
3
|
+
# Should puppetqd (the storeconfigs queuing broker) be started?
|
4
|
+
# This can take some load off of the puppetmaster by queuing the
|
5
|
+
# storeconfig updates to the database with puppetqd. You need
|
6
|
+
# to have the 'stompserver' package installed and running, and
|
7
|
+
# the following configured in your puppet.conf:
|
8
|
+
#
|
9
|
+
# [main]
|
10
|
+
# queue_type = stomp
|
11
|
+
# queue_source = stomp://localhost:61613
|
12
|
+
# dbadapter = (sqlite3|mysql|postgresql)
|
13
|
+
# dbserver=localhost
|
14
|
+
# dbname=puppet
|
15
|
+
# dbuser=puppet
|
16
|
+
# dbpassword=xxxx
|
17
|
+
# dblocation = /var/lib/puppet/storeconfigs.sqlite <-- only if using sqlite
|
18
|
+
#
|
19
|
+
# [master]
|
20
|
+
# async_storeconfigs = true
|
21
|
+
#
|
22
|
+
# See: http://puppetlabs.com/trac/puppet/wiki/UsingStoredConfiguration
|
23
|
+
#
|
24
|
+
# Once you have the proper puppet.conf, and stompserver, you can enable
|
25
|
+
# the following:
|
26
|
+
PUPPETQD=no
|
27
|
+
PUPPETQD_OPTS=""
|
@@ -0,0 +1,84 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
### BEGIN INIT INFO
|
3
|
+
# Provides: puppetqd
|
4
|
+
# Required-Start: $network $named $remote_fs $syslog
|
5
|
+
# Required-Stop: $network $named $remote_fs $syslog
|
6
|
+
# Default-Start: 2 3 4 5
|
7
|
+
# Default-Stop: 0 1 6
|
8
|
+
### END INIT INFO
|
9
|
+
|
10
|
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
11
|
+
DAEMON=/usr/bin/puppet
|
12
|
+
DAEMON_OPTS="queue"
|
13
|
+
NAME=queue
|
14
|
+
DESC="puppet queue"
|
15
|
+
PIDFILE="/var/run/puppet/${NAME}.pid"
|
16
|
+
|
17
|
+
test -x $DAEMON || exit 0
|
18
|
+
|
19
|
+
[ -r /etc/default/puppetqd ] && . /etc/default/puppetqd
|
20
|
+
|
21
|
+
. /lib/lsb/init-functions
|
22
|
+
|
23
|
+
if [ ! -d /var/run/puppet ]; then
|
24
|
+
mkdir -p /var/run/puppet
|
25
|
+
fi
|
26
|
+
|
27
|
+
chown puppet:puppet /var/run/puppet
|
28
|
+
|
29
|
+
is_true() {
|
30
|
+
if [ "x$1" = "xtrue" -o "x$1" = "xyes" -o "x$1" = "x0" ] ; then
|
31
|
+
return 0
|
32
|
+
else
|
33
|
+
return 1
|
34
|
+
fi
|
35
|
+
}
|
36
|
+
|
37
|
+
start_puppet_queue() {
|
38
|
+
if is_true "$PUPPETQD" ; then
|
39
|
+
start-stop-daemon --start --quiet --pidfile=${PIDFILE} \
|
40
|
+
--startas $DAEMON -- $NAME $DAEMON_OPTS $PUPPETQD_OPTS
|
41
|
+
fi
|
42
|
+
}
|
43
|
+
|
44
|
+
stop_puppet_queue() {
|
45
|
+
start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}
|
46
|
+
rm -f ${PIDFILE}
|
47
|
+
}
|
48
|
+
|
49
|
+
status_puppet_queue() {
|
50
|
+
if is_true "$PUPPETQD" ; then
|
51
|
+
status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}"
|
52
|
+
else
|
53
|
+
echo ""
|
54
|
+
echo "puppetqd not configured to start"
|
55
|
+
fi
|
56
|
+
}
|
57
|
+
|
58
|
+
|
59
|
+
case "$1" in
|
60
|
+
start)
|
61
|
+
log_begin_msg "Starting $DESC"
|
62
|
+
start_puppet_queue
|
63
|
+
log_end_msg $?
|
64
|
+
;;
|
65
|
+
stop)
|
66
|
+
log_begin_msg "Stopping $DESC"
|
67
|
+
stop_puppet_queue
|
68
|
+
log_end_msg $?
|
69
|
+
;;
|
70
|
+
status)
|
71
|
+
status_puppet_queue
|
72
|
+
;;
|
73
|
+
reload|restart|force-reload)
|
74
|
+
log_begin_msg "Restarting $DESC"
|
75
|
+
stop_puppet_queue
|
76
|
+
sleep 1
|
77
|
+
start_puppet_queue
|
78
|
+
log_end_msg $?
|
79
|
+
;;
|
80
|
+
*)
|
81
|
+
echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2
|
82
|
+
exit 1
|
83
|
+
;;
|
84
|
+
esac
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
if [ "$1" = "configure" ]; then
|
6
|
+
|
7
|
+
# Change the owner of the rack config.ru to be the puppet user
|
8
|
+
# because passenger will suid to that user, see #577366
|
9
|
+
if ! dpkg-statoverride --list /usr/share/puppet/rack/puppetmasterd/config.ru >/dev/null 2>&1
|
10
|
+
then
|
11
|
+
dpkg-statoverride --update --add puppet puppet 0644 /usr/share/puppet/rack/puppetmasterd/config.ru
|
12
|
+
fi
|
13
|
+
# Setup passenger configuration
|
14
|
+
if [ "$2" = "" ]; then
|
15
|
+
# Initialize puppetmaster CA and generate the master certificate
|
16
|
+
# only if the host doesn't already have any puppet ssl certificate.
|
17
|
+
# The ssl key and cert need to be available (eg generated) before
|
18
|
+
# apache2 is configured and started since apache2 ssl configuration
|
19
|
+
# uses the puppetmaster ssl files.
|
20
|
+
if [ ! -e "$(puppet master --configprint hostcert)" ]; then
|
21
|
+
puppet cert generate $(puppet master --configprint certname)
|
22
|
+
fi
|
23
|
+
# Setup apache2 configuration files
|
24
|
+
APACHE2_SITE_FILE="/etc/apache2/sites-available/puppetmaster"
|
25
|
+
if [ ! -e "${APACHE2_SITE_FILE}" ]; then
|
26
|
+
cp /usr/share/puppetmaster-passenger/apache2.site.conf.tmpl "${APACHE2_SITE_FILE}"
|
27
|
+
# Fix path to SSL files
|
28
|
+
sed -r -i "s|(SSLCertificateFile\s+).+$|\1$(puppet master --configprint hostcert)|" "${APACHE2_SITE_FILE}"
|
29
|
+
sed -r -i "s|(SSLCertificateKeyFile\s+).+$|\1$(puppet master --configprint hostprivkey)|" "${APACHE2_SITE_FILE}"
|
30
|
+
sed -r -i "s|(SSLCACertificateFile\s+).+$|\1$(puppet master --configprint localcacert)|" "${APACHE2_SITE_FILE}"
|
31
|
+
sed -r -i "s|(SSLCertificateChainFile\s+).+$|\1$(puppet master --configprint localcacert)|" "${APACHE2_SITE_FILE}"
|
32
|
+
sed -r -i "s|(SSLCARevocationFile\s+).+$|\1$(puppet master --configprint cacrl)|" "${APACHE2_SITE_FILE}"
|
33
|
+
|
34
|
+
# Fix path to rack docroot and directory
|
35
|
+
sed -r -i "s|DocumentRoot /etc/puppet/rack/public|DocumentRoot /usr/share/puppet/rack/puppetmasterd/public|g" "${APACHE2_SITE_FILE}"
|
36
|
+
sed -r -i "s|<Directory /etc/puppet/rack/>|<Directory /usr/share/puppet/rack/puppetmasterd/>|g" "${APACHE2_SITE_FILE}"
|
37
|
+
fi
|
38
|
+
a2enmod ssl
|
39
|
+
a2enmod headers
|
40
|
+
a2ensite puppetmaster
|
41
|
+
if [ -x "/etc/init.d/apache2" ]; then
|
42
|
+
# Seems that a restart is needed. reload breaks ssl apparently.
|
43
|
+
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
|
44
|
+
invoke-rc.d apache2 restart || exit $?
|
45
|
+
else
|
46
|
+
/etc/init.d/apache2 restart || exit $?
|
47
|
+
fi
|
48
|
+
fi
|
49
|
+
fi
|
50
|
+
# Fix CRL file on upgrade to use the CA crl file instead of the host crl.
|
51
|
+
if dpkg --compare-versions "$2" lt-nl "2.6.1-1"; then
|
52
|
+
if [ -e /etc/apache2/sites-available/puppetmaster ]; then
|
53
|
+
sed -r -i 's|SSLCARevocationFile[[:space:]]+/var/lib/puppet/ssl/crl.pem$|SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem|' /etc/apache2/sites-available/puppetmaster
|
54
|
+
if [ -x "/etc/init.d/apache2" ]; then
|
55
|
+
# Seems that a restart is needed. reload breaks ssl apparently.
|
56
|
+
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
|
57
|
+
invoke-rc.d apache2 restart || exit $?
|
58
|
+
else
|
59
|
+
/etc/init.d/apache2 restart || exit $?
|
60
|
+
fi
|
61
|
+
fi
|
62
|
+
fi
|
63
|
+
fi
|
64
|
+
fi
|
65
|
+
|
66
|
+
#DEBHELPER#
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/bin/sh -e
|
2
|
+
|
3
|
+
case "$1" in
|
4
|
+
purge)
|
5
|
+
if dpkg-statoverride --list /usr/share/puppet/rack/puppetmasterd/config.ru >/dev/null 2>&1
|
6
|
+
then
|
7
|
+
dpkg-statoverride --remove /usr/share/puppet/rack/puppetmasterd/config.ru
|
8
|
+
fi
|
9
|
+
# Remove the puppetmaster site configuration on purge
|
10
|
+
rm -f /etc/apache2/sites-available/puppetmaster
|
11
|
+
;;
|
12
|
+
remove)
|
13
|
+
# Disable the puppetmaster apache2 site configuration on package removal
|
14
|
+
a2dissite puppetmaster
|
15
|
+
if [ -x "/etc/init.d/apache2" ]; then
|
16
|
+
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
|
17
|
+
invoke-rc.d apache2 force-reload || exit $?
|
18
|
+
else
|
19
|
+
/etc/init.d/apache2 force-reload || exit $?
|
20
|
+
fi
|
21
|
+
fi
|
22
|
+
;;
|
23
|
+
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
24
|
+
;;
|
25
|
+
*)
|
26
|
+
echo "postrm called with unknown argument \`$1'" >&2
|
27
|
+
exit 1
|
28
|
+
|
29
|
+
esac
|
30
|
+
|
31
|
+
#DEBHELPER#
|
32
|
+
|
33
|
+
exit 0
|
@@ -0,0 +1,16 @@
|
|
1
|
+
By default, the puppetmaster package is configured in
|
2
|
+
/etc/default/puppetmaster to utilize the webrick server included in
|
3
|
+
the application. This server is single-threaded, very slow and tends
|
4
|
+
to fall over when you get close to 30 nodes. You will start to see
|
5
|
+
connection-reset or End-of-file errors when this happens.
|
6
|
+
|
7
|
+
You will want to a server that can scale better than webrick, such as
|
8
|
+
Passenger (aka. mod_rails), or mongrel, both with a front-end
|
9
|
+
web-proxy such as apache.
|
10
|
+
|
11
|
+
If you would like to run Passenger (aka. mod_rails) with apache install the
|
12
|
+
puppetmaster-passenger package. It will automatically setup an apache2 virtual
|
13
|
+
host that will run puppetmaster under Passenger.
|
14
|
+
|
15
|
+
For more information:
|
16
|
+
http://projects.puppetlabs.com/projects/puppet/wiki/Using_Passenger
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Defaults for puppetmaster - sourced by /etc/init.d/puppetmaster
|
2
|
+
|
3
|
+
# Start puppetmaster on boot? If you are using passenger, you should
|
4
|
+
# have this set to "no"
|
5
|
+
START=yes
|
6
|
+
|
7
|
+
# Startup options
|
8
|
+
DAEMON_OPTS=""
|
9
|
+
|
10
|
+
# What server type to run
|
11
|
+
# Options:
|
12
|
+
# webrick: default, cannot handle more than ~30 nodes
|
13
|
+
# mongrel: scales better than webrick because you can run
|
14
|
+
# multiple processes if you are getting
|
15
|
+
# connection-reset or End-of-file errors, switch to
|
16
|
+
# mongrel. Requires front-end web-proxy such as
|
17
|
+
# apache, nginx, or pound, more information:
|
18
|
+
# http://puppetlabs.com/trac/puppet/wiki/UsingMongrel
|
19
|
+
# passenger: no need to set this, be sure to set START=no above
|
20
|
+
SERVERTYPE=webrick
|
21
|
+
|
22
|
+
# How many puppetmaster instances to start? Its pointless to set this
|
23
|
+
# higher than 1 if you are not using mongrel.
|
24
|
+
PUPPETMASTERS=1
|
25
|
+
|
26
|
+
# What port should the puppetmaster listen on (default: 8140). If
|
27
|
+
# PUPPETMASTERS is set to a number greater than 1, then the port for
|
28
|
+
# the first puppetmaster will be set to the port listed below, and
|
29
|
+
# further instances will be incremented by one
|
30
|
+
#
|
31
|
+
# NOTE: if you are using mongrel, then you will need to have a
|
32
|
+
# front-end web-proxy (such as apache, nginx, pound) that takes
|
33
|
+
# incoming requests on the port your clients are connecting to
|
34
|
+
# (default is: 8140), and then passes them off to the mongrel
|
35
|
+
# processes. In this case it is recommended to run your web-proxy on
|
36
|
+
# port 8140 and change the below number to something else, such as
|
37
|
+
# 18140.
|
38
|
+
PORT=8140
|
@@ -0,0 +1,158 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
### BEGIN INIT INFO
|
3
|
+
# Provides: puppetmaster
|
4
|
+
# Required-Start: $network $named $remote_fs $syslog
|
5
|
+
# Required-Stop: $network $named $remote_fs $syslog
|
6
|
+
# Default-Start: 2 3 4 5
|
7
|
+
# Default-Stop: 0 1 6
|
8
|
+
### END INIT INFO
|
9
|
+
|
10
|
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
11
|
+
DAEMON=/usr/bin/puppet
|
12
|
+
DAEMON_OPTS=""
|
13
|
+
NAME=master
|
14
|
+
DESC="puppet master"
|
15
|
+
|
16
|
+
test -x $DAEMON || exit 0
|
17
|
+
|
18
|
+
[ -r /etc/default/puppetmaster ] && . /etc/default/puppetmaster
|
19
|
+
|
20
|
+
. /lib/lsb/init-functions
|
21
|
+
|
22
|
+
if [ ! -d /var/run/puppet ]; then
|
23
|
+
mkdir -p /var/run/puppet
|
24
|
+
fi
|
25
|
+
|
26
|
+
chown puppet:puppet /var/run/puppet
|
27
|
+
|
28
|
+
is_true() {
|
29
|
+
if [ "x$1" = "xtrue" -o "x$1" = "xyes" -o "x$1" = "x0" ] ; then
|
30
|
+
return 0
|
31
|
+
else
|
32
|
+
return 1
|
33
|
+
fi
|
34
|
+
}
|
35
|
+
|
36
|
+
start_puppet_master() {
|
37
|
+
if is_true "$START" ; then
|
38
|
+
if [ "$SERVERTYPE" = "mongrel" ]
|
39
|
+
then
|
40
|
+
DAEMON_OPTS="$DAEMON_OPTS --servertype=mongrel"
|
41
|
+
NUMSTART=0
|
42
|
+
STARTPORT=$PORT
|
43
|
+
while [ $NUMSTART -lt $PUPPETMASTERS ]; do
|
44
|
+
start-stop-daemon --start --quiet --pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid \
|
45
|
+
--startas $DAEMON -- $NAME $DAEMON_OPTS --masterport=$STARTPORT --pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid
|
46
|
+
STARTPORT=$(($STARTPORT + 1))
|
47
|
+
NUMSTART=$(($NUMSTART + 1))
|
48
|
+
done
|
49
|
+
else
|
50
|
+
start-stop-daemon --start --quiet --pidfile /var/run/puppet/${NAME}.pid \
|
51
|
+
--startas $DAEMON -- $NAME $DAEMON_OPTS --masterport=$PORT
|
52
|
+
fi
|
53
|
+
else
|
54
|
+
echo ""
|
55
|
+
echo "puppetmaster not configured to start, please edit /etc/default/puppetmaster to enable"
|
56
|
+
fi
|
57
|
+
}
|
58
|
+
|
59
|
+
stop_puppet_master() {
|
60
|
+
if [ "$SERVERTYPE" = "mongrel" ]
|
61
|
+
then
|
62
|
+
NUMSTART=0
|
63
|
+
STOPPORT=$PORT
|
64
|
+
while [ $NUMSTART -lt $PUPPETMASTERS ]; do
|
65
|
+
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/puppet/${NAME}-${STOPPORT}.pid
|
66
|
+
rm -f /var/run/puppet/${NAME}-${STOPPORT}.pid
|
67
|
+
STOPPORT=$(($STOPPORT + 1))
|
68
|
+
NUMSTART=$(($NUMSTART + 1))
|
69
|
+
done
|
70
|
+
else
|
71
|
+
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/puppet/${NAME}.pid
|
72
|
+
fi
|
73
|
+
}
|
74
|
+
|
75
|
+
status_puppet_master() {
|
76
|
+
if ( ! type status_of_proc > /dev/null 2>&1 ) ; then
|
77
|
+
status_of_proc() {
|
78
|
+
local pidfile daemon name status
|
79
|
+
pidfile=
|
80
|
+
OPTIND=1
|
81
|
+
while getopts p: opt ; do
|
82
|
+
case "$opt" in
|
83
|
+
p) pidfile="$OPTARG";;
|
84
|
+
esac
|
85
|
+
done
|
86
|
+
shift $(($OPTIND - 1))
|
87
|
+
|
88
|
+
if [ -n "$pidfile" ]; then
|
89
|
+
pidfile="-p $pidfile"
|
90
|
+
fi
|
91
|
+
daemon="$1"
|
92
|
+
name="$2"
|
93
|
+
|
94
|
+
status="0"
|
95
|
+
pidofproc $pidfile $daemon >/dev/null || status="$?"
|
96
|
+
if [ "$status" = 0 ]; then
|
97
|
+
log_success_msg "$name is running"
|
98
|
+
return 0
|
99
|
+
elif [ "$status" = 4 ]; then
|
100
|
+
log_failure_msg "could not access PID file for $name"
|
101
|
+
return $status
|
102
|
+
else
|
103
|
+
log_failure_msg "$name is not running"
|
104
|
+
return $status
|
105
|
+
fi
|
106
|
+
}
|
107
|
+
fi
|
108
|
+
|
109
|
+
if is_true "$START" ; then
|
110
|
+
if [ "$SERVERTYPE" = "mongrel" ]
|
111
|
+
then
|
112
|
+
NUMSTART=0
|
113
|
+
STARTPORT=$PORT
|
114
|
+
while [ $NUMSTART -lt $PUPPETMASTERS ]; do
|
115
|
+
status_of_proc -p "/var/run/puppet/${NAME}-${STARTPORT}.pid" \
|
116
|
+
"${DAEMON}" "${NAME}-${STARTPORT}"
|
117
|
+
STARTPORT=$(($STARTPORT + 1))
|
118
|
+
NUMSTART=$(($NUMSTART + 1))
|
119
|
+
done
|
120
|
+
else
|
121
|
+
status_of_proc -p "/var/run/puppet/${NAME}.pid" "${DAEMON}" "${NAME}"
|
122
|
+
fi
|
123
|
+
else
|
124
|
+
echo ""
|
125
|
+
echo "puppetmaster not configured to start"
|
126
|
+
fi
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
case "$1" in
|
131
|
+
start)
|
132
|
+
log_begin_msg "Starting $DESC"
|
133
|
+
start_puppet_master
|
134
|
+
log_end_msg $?
|
135
|
+
;;
|
136
|
+
stop)
|
137
|
+
log_begin_msg "Stopping $DESC"
|
138
|
+
stop_puppet_master
|
139
|
+
log_end_msg $?
|
140
|
+
;;
|
141
|
+
reload)
|
142
|
+
# Do nothing, as Puppetmaster rechecks its config automatically
|
143
|
+
;;
|
144
|
+
status)
|
145
|
+
status_puppet_master
|
146
|
+
;;
|
147
|
+
restart|force-reload)
|
148
|
+
log_begin_msg "Restarting $DESC"
|
149
|
+
stop_puppet_master
|
150
|
+
sleep 1
|
151
|
+
start_puppet_master
|
152
|
+
log_end_msg $?
|
153
|
+
;;
|
154
|
+
*)
|
155
|
+
echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2
|
156
|
+
exit 1
|
157
|
+
;;
|
158
|
+
esac
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
# Remove renamed configuration files which are now handled by other
|
6
|
+
# packages
|
7
|
+
if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
|
8
|
+
|
9
|
+
dpkg-maintscript-helper rm_conffile \
|
10
|
+
/etc/logrotate.d/puppetmaster 2.7.16-1puppetlabs1 puppetmaster -- "$@"
|
11
|
+
|
12
|
+
# For systems with dpkg < 1.15.7-2
|
13
|
+
else
|
14
|
+
|
15
|
+
if [ -f /etc/logrotate.d/puppetmaster ]; then
|
16
|
+
rm /etc/logrotate.d/puppetmaster || true
|
17
|
+
fi
|
18
|
+
fi
|
19
|
+
|
20
|
+
#DEBHELPER#
|