{"id":15103535,"url":"https://github.com/alphagov/govuk-puppet","last_synced_at":"2025-09-27T02:31:34.828Z","repository":{"id":37458216,"uuid":"47834743","full_name":"alphagov/govuk-puppet","owner":"alphagov","description":"Decommissioned: Puppet manifests that used to provision the legacy GOV.UK stack.","archived":true,"fork":false,"pushed_at":"2024-01-30T15:27:00.000Z","size":49689,"stargazers_count":127,"open_issues_count":0,"forks_count":41,"subscribers_count":71,"default_branch":"main","last_synced_at":"2025-01-17T14:35:06.290Z","etag":null,"topics":["govuk","infrastructure","puppet"],"latest_commit_sha":null,"homepage":"","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alphagov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-11T15:36:24.000Z","updated_at":"2024-04-23T02:46:09.000Z","dependencies_parsed_at":"2022-07-12T14:30:20.924Z","dependency_job_id":"6272d6f1-5655-46e4-bc65-ec2e803ba544","html_url":"https://github.com/alphagov/govuk-puppet","commit_stats":{"total_commits":20731,"total_committers":545,"mean_commits":"38.038532110091744","dds":0.9391249819111476,"last_synced_commit":"0140ed1585ac1181ef6b838759cf1f139e3b4e4b"},"previous_names":[],"tags_count":13792,"template":false,"template_full_name":null,"purl":"pkg:github/alphagov/govuk-puppet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fgovuk-puppet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fgovuk-puppet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fgovuk-puppet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fgovuk-puppet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphagov","download_url":"https://codeload.github.com/alphagov/govuk-puppet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fgovuk-puppet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277171501,"owners_count":25773231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["govuk","infrastructure","puppet"],"created_at":"2024-09-25T19:40:20.322Z","updated_at":"2025-09-27T02:31:32.032Z","avatar_url":"https://github.com/alphagov.png","language":"Puppet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚠️ Decommissioned\n\nGOV.UK no longer uses Puppet, as of 2024-01-30.\n\nConfiguration for services hosted on Kubernetes (EKS) is in\n[govuk-helm-charts](https://github.com/alphagov/govuk-helm-charts).\n\n# GOV.UK Puppet\n\nThis repository contains the puppet modules and manifests for GOV.UK.\n\n## Getting started\n\nIn order to run/test the Puppet manifests you will need Ruby 1.9.x and\nBundler.\n\nDependencies are managed with [Bundler](http://bundler.io/) and\n[librarian-puppet](http://librarian-puppet.com/), but hopefully this should be\ntransparent unless you need to update the dependencies yourself.\n\n## Standards\n\nPlease familiarise yourself with our Puppet standards before contributing to\nthis repository:\n\n* [Things that should not be in Puppet](/docs/things-that-should-not-be-in-puppet.md)\n* [Dependency management](/docs/dependency-management.md)\n* [Process supervision](/docs/process-supervision.md)\n* [Nagios checks](/docs/nagios-checks.md)\n\nRun `rake spec` and `rake lint` to run the tests and lint before checking in.\n\n## Dependencies\n\nAll modules from librarian-puppet are cached in this repo under\n`vendor/puppet/` in order to ensure that third-party code doesn't change\nunderneath us, protect us from downtime, and improve build times.\n\n### Installing\n\nIf you're using this repo for the first time or the contents of\n`Gemfile[.lock]` or `Puppetfile[.lock]` have recently changed then you'll\nneed to run:\n\n    $ bundle install\n    $ bundle exec rake librarian:install\n\nPlease avoid using `librarian-puppet` directly because it's not very good at\nrespecting or maintaining its own config file.\n\nRunning these commands will often be the solution to Puppet errors about\nunknown classes or functions such as:\n\n- `Unknown function validate_bool at …`\n- `Could not find class apt for …`\n- `Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type apt::source …`\n\nIt may affect errors relating to classes you have not modified when running spec tests after a rebase.\n\nThis should also fix errors while trying to run `govuk_puppet`, of the form:\n\n- `chown: changing ownership of '/home/vagrant/.puppet/[…]': Operation not permitted`\n\n### Updating\n\nIf you need to add a new module to the `Puppetfile` then you will need to\nrun the following to install it and update the cache:\n\n    $ bundle exec rake librarian:package\n\nIf you need to update an existing module to a newer version, you'll need to\nrun the following:\n\n    $ bundle exec rake 'librarian:update[alphagov/tune_ext]'\n\nAfterwards you should commit the `Puppetfile`, `Puppetfile.lock` and any new\nfiles in `vendor/puppet/`. If updating a module then you will need to\nmanually delete the old tarball from the cache directory.\n\nNB: There should *never* be any changes to `.librarian/puppet/config`.\n\n## Testing\n\nAssuming that your dependencies are installed, run all the tests:\n\n    $ bundle exec rake\n\nThe module tests are located in `modules/\u003cmodule\u003e/spec`. See the [RSpec\nPuppet](https://github.com/rodjek/rspec-puppet) documentation for more\ndetails. The specs are run in parallel by default.\n\n[Puppet-lint][pl] is a tool that checks various syntax and style rules common\nto well written Puppet code. It can be run with:\n\n    $ bundle exec rake lint\n\nThis outputs a set of errors or warnings that should be fixed. See the [Puppet\nStyle Guide](http://docs.puppetlabs.com/guides/style_guide.html) for more\ninformation.\n\n[pl]: https://github.com/rodjek/puppet-lint\n\n### Scoped testing\n\nYou can run the tests for a specific module or modules by setting an\nenvironment variable, `mods` for the rake task, e.g.\n\n    $ bundle exec rake mods=nginx,varnish\n\nThe `manifests/` directory is considered one module called `manifests` for\nthis purpose.\n\n    $ bundle exec rake mods=manifests,govuk\n\n### Precommit Testing\n\nThis repo uses [pre-commit](http://pre-commit.com/) for managing its pre-\ncommit hooks. This is available via brew:\n\n```brew install pre-commit```\n\nThe pre-commit hooks are configured in the .pre-commit-config.yaml file in the\nroot of this repo. To make the pre-commit hooks work you first need to install\nthe pre-commit shim in your local .git/hooks directory:\n\n```pre-commit install```\n\nThis will run hooks configured in `.pre-commit-config.yaml` when you run a\n`git commit` and will pass each hook the list of files staged as part of the\ncommit. You can test the hooks by doing:\n\n```pre-commit run```\n\nYou can also run the hooks on all files to test the status of the entire repo.\nThis might be useful, for example, as part of a PR builder job:\n\n```pre-commit run --all-files```\n\n### Node testing\n\nSome issues that span multiple classes or modules may not be picked up unit\ntesting. Duplicate resources and mislabelled dependencies are such examples.\nTo catch these, all available `govuk::node` classes can be exercised with:\n\n    $ bundle exec rake spec:nodes\n\nCompiling node complete node catalogs takes quite a long time, so you may\nwish to restrict it to certain classes of node by setting the environment\nvariable `classes` for the rake task, e.g.\n\n    $ bundle exec rake spec:nodes classes=frontend,backend\n\n#### Test Hieradata\n\nDuring spec tests `spec/fixtures/hiera/hiera.yaml` is used to configure hieradata which *only* uses `spec/fixtures/hieradata/common.yaml` for its values (i.e. nothing from `hieradata/`).\n\nDuring node tests the hieradata uses the `vagrant` environment.\n\n### Test Coverage\n\nEach test suite's results are followed by a summary of how many resources that suite covers, how many the tests touch and the coverage as a percentage. e.g.\n\n```bash\nTotal resources:   175\nTouched resources: 36\nResource coverage: 20.57%\n```\n\nA list of untouched resources can be gained by setting the `FULL_COVERAGE_REPORT` environment variable before running the tests:\n\n```\nFULL_COVERAGE_REPORT=true bundle exec rake spec\n```\n\n***Warning*** Given the number of modules that have limited tests this will produce a very large amount of output unless the tests are scoped.\n\n### Rspec Basic Mode\n\nIt is sometimes useful to have access to the normal RSpec Rake task. This exposes the `SPEC` and `SPEC_OPTS` environment variables that mean you can set the test specification and RSpec options respectively. This gives finer grain control when it is needed. e.g.\n\n    $ bundle exec rake rspec_basic_mode SPEC=\"./modules/collectd/spec/classes/collectd__package_spec.rb:7\" SPEC_OPTS=\"-c\"\n\nruns the single test at line 7 of `collectd__package_spec.rb` with colour mode enabled.\n\n***Warning*** using this option disables parallel running of tests and the `mod` arguments will not work.\n\n### Vagrant testing\n\n#### Prerequisites\n\nYou will need an up-to-date checkout of the private `govuk-provisioning`\nrepository for node definitions.\n\n#### Setup\n\nIt is recommended that you use Vagrant \u003e 1.4 from a binary/system install.\n`alphagov/gds-boxen` can set this up for you.\n\n#### Usage\n\nYou need only bring up the subset of nodes that you're working on. For\nexample, to bring up a frontend and backend:\n```sh\nvagrant up frontend-1.frontend backend-1.backend\n```\n\nVagrant will run the Puppet provisioner against the node when it boots up.\nNodes should look almost identical to that of our real\nproduction/staging/preview environments, including network addresses. To\naccess a node's services like HTTP/HTTPS you can point your `hosts` file to\nthe host-only IP address (eth1).\n\nPhysical attributes like `memory` and `num_cores` will be ignored because\nthey don't scale appropriately to local VMs, but can still be customised as\ndescribed below.\n\n#### Customisation\n\nNode definitions can be overridden with a `nodes.local.yaml` file in this\ndirectory. This is merged on top of all other node\ndefinitions. The following keys are currently available for customisation:\n\n- `box_dist` Ubuntu distribution. Currently \"trusty\".\n- `box_version` Internal version number of the GDS basebox.\n- `memory` Amount of RAM. Default is \"384\".\n- `ip` IP address for hostonly networking. Currently all subnets are /16.\n- `class` Name of the Puppet class/role.\n\nFor example to increase the amount of RAM on a PuppetMaster:\n```yaml\n---\npuppetmaster-1.management:\n  memory: 768\n```\n\n#### Errors\n\nSome errors that you might encounter..\n\n##### NFS failed mounts\n```\n[frontend-1.frontend] Mounting NFS shared folders...\nMounting NFS shared folders failed. This is most often caused by the NFS\nclient software not being installed on the guest machine. Please verify\nthat the NFS client software is properly installed, and consult any resources\nspecific to the linux distro you're using for more information on how to do this.\n```\nThis seems to be caused by a combination of OSX, VirtualBox, and Cisco\nAnyConnect. Try temporarily disconnecting from the VPN when bringing up a\nnew node. You can also set `VAGRANT_GOVUK_NFS=no` as an environment variable to\ndisable the use of NFS. This is less performant but fine for checking puppet\nruns.\n\n## Licence\n\n[MIT License](LICENCE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphagov%2Fgovuk-puppet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphagov%2Fgovuk-puppet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphagov%2Fgovuk-puppet/lists"}