{"id":20757640,"url":"https://github.com/dodevops/packer-puppetdev","last_synced_at":"2026-05-09T09:04:40.804Z","repository":{"id":90748322,"uuid":"66557235","full_name":"dodevops/packer-puppetdev","owner":"dodevops","description":"Packer template for local puppet development boxes","archived":false,"fork":false,"pushed_at":"2017-09-11T07:37:58.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-18T04:43:50.582Z","etag":null,"topics":["packer-template","puppet","vagrant","vagrant-boxes"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/dodevops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-08-25T12:48:07.000Z","updated_at":"2017-11-30T13:12:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef4a3165-609d-43f5-a814-64cb6889300c","html_url":"https://github.com/dodevops/packer-puppetdev","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpacker-puppetdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpacker-puppetdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpacker-puppetdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpacker-puppetdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodevops","download_url":"https://codeload.github.com/dodevops/packer-puppetdev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243067050,"owners_count":20230860,"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","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":["packer-template","puppet","vagrant","vagrant-boxes"],"created_at":"2024-11-17T09:43:29.063Z","updated_at":"2026-05-09T09:04:35.783Z","avatar_url":"https://github.com/dodevops.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Puppetdev\n\n*Local testing of puppet manifests using Vagrant*\n\nThis repository contains scripts together with basic Packer templates for\ngenerating Vagrant boxes, that can be used for local puppet testing.\n\nThese boxes are available on [Hashicorp's Vagrant cloud](https://app.vagrantup.com/boxes/search?utf8=%E2%9C%93\u0026sort=downloads\u0026provider=\u0026q=dodevops%2Fpuppetdev)\nfor use with Vagrant.\n\n## Usage\n\nThe generated boxes have the following features:\n\n* Install puppet modules using [r10k](https://github.com/puppetlabs/r10k)\n* Install puppet modules from a private git repository\n* Run puppet apply\n* Use hiera\n\n### Prerequisites\n\nThese boxes run under [vagrant](https://vagrantup.com) using the\n[VirtualBox](https://virtualbox.org) provider, so you'll need to have both\nthings installed.\n\nOnce ready, create an empty directory somewhere and run the following command:\n\n    vagrant init dodevops/puppetdev-CONFIGURATION\n\nWhere \"CONFIGURATION\" should be replaced with one of the following:\n\n| CONFIGURATION      | Distribution | Version | Puppet-Release |\n| ------------------ | ------------ | ------- | -------------- |\n| debian             | Debian       | 8.6     | 3              |\n| debianpuppet4      | Debian       | 8.6     | 4              |\n| ubuntu             | Ubuntu       | 14.04   | 3              |\n| ubuntupuppet4      | Ubuntu       | 14.04   | 4              |\n| ubuntu16.04        | Ubuntu       | 16.04   | 3              |\n| ubuntu16.04puppet4 | Ubuntu       | 16.04   | 4              |\n\nFor example, to install Ubuntu 16.04 with Puppet4, you would use:\n\n    vagrant init dodevops/puppetdev-ubuntu16.04puppet4\n\nAfterwards, `vagrant up` will start your virtual machine, but first, read on...\n\n### Puppet\n\nTo use puppet, create a \"puppet\" subdirectory where your \nVagrantfile lies.\n \nInside, create a \"site.pp\" file. This file will be run by puppet apply \nduring the provisioning process.\n\nYou can also use a different manifest file name, provide custom facts \nand specify puppet apply arguments. See Overriding configuration \nbelow for details.\n\n### r10k\n\nYou can create a Puppetfile in the puppet subdirectory and place \nmodules there, that r10k will install. (Using r10k puppetfile install)\n\nTo support private repositories when using r10k, you'll have to put\ntwo files in the directory where your Vagrantfile is: One file named\n\"r10k.provision\" holding a SSH private key, that is used when\nconnecting to your private repositories and a file named \"r10k.host\"\nwith the host name of your private repository host.\n\n### Hiera\n\nCreate a subdirectory \"hieradata\" and place hiera yaml files there. \n\nLook under vagrant.includes/hiera.yaml or hiera5.yaml (for puppet 4) for\nthe default hiera configuration.\n\n### Overriding configuration\n\nYou can override certain configuration by placing a config.yaml where\nyour Vagrantfile is. Look in vagrant.includes/config.dist.yaml for the\nkeys you can override there.\n\nAlso, you can place a hiera.yaml where your Vagrantfile is to alter\nthe used hiera configuration. Use vagrant.includes/hiera.yaml or hiera5.yaml\n(for puppet 4) as a template.\n\n# Building\n\n## Structure\n\nTo build our custom boxes, we're using the following things:\n\n* _vars/*.json_: Additional variable files provided to packer\n* _scripts/*.sh_: Additional scripts, that are run in the provisioning phase\n* _vagrantfiles/Vagrantfile*_: Vagrantfile templates (this is basically, \nwhere our magic happens later on)\n* _vagrant.includes/*_: Additional files packed together with the boxes\n\nBecause we're using the excellent Packer templates by \n[boxcutter](https://github.com/boxcutter) as a base for our templates\n(base.debian and base.ubuntu), we needed to make changes to their \ntemplates to allow this.\n\nFor this we're using a Grunt-based building process, that applies\njsonpatch-files (in the directory patches/)\n\n## Local additions\n\nYou can also extend our additions and provide additional files and\nvariables.\n\n### Including variable files\n\nTo override any variables, you have to create variable files in \nlocal/vars. Afterwards, create a file named \"vars.json\" in local/* \n\nHere you can specify, which machine type gets which variable files:\n\n    {\n      \"ubuntu\": [\"customvar1.json\"],\n      \"*\": [\"customvar2.json\"]\n    }\n\nThe wildcard \"*\" will add the custom var file to all machine types.\n\n### Enabling r10k custom host feature from within the box\n\nIf you'd like to use custom puppet modules in a private git-repository\nand don't want the user to supply the public key beside the Vagrantfile,\nyou have to do two things:\n\nCreate an SSH private key named \"r10k.provision\" and place it under \nlocal/files. Give this private key access to all module repositories\nyou require. After that, define two keys using the local variable\nfeature (see above):\n\n* _feature_r10k_custom_: Set this to true to enable this feature\n* _r10k_custom_host_: The hostname of the git repository. This will be\nused to configure an SSH-connection inside the virtual machine. The \nconnection will use the provided key and ignore the host key to avoid\nproblems running r10k automatically.\n\n## Prerequisites\n\n* [Packer](https://packer.io)\n* [Node.js](https://nodejs.org) \u003e= 4.5.0\n* [Vagrant](https://vagrantup.com)\n* [VirtualBox](https://virtualbox.org)\n* [Ruby](https://ruby-lang.org)\n\n## Initialize the submodules\n\nTo fetch the external repositories by boxcutter, run these two commands:\n\n    git submodule update --init \n\n## Building process\n\nTo build, you first need to install grunt-cli and the needed modules:\n\n    npm install -g grunt-cli\n    npm install\n\nTests are done using serverspec, which runs on ruby and needs some gems:\n\n    gem install bundler\n    bundle install\n\nThen, simply run grunt with the desired target machine:\n\n    grunt ubuntu\n\nThis will build the ubuntu version of the machine and run the testsuite\nagainst it.\n\n## Testing\n\nThe tests are done using [Serverspec](http://serverspec.org/).\n\nThe testing process injects the generated box into the vagrant box\ncache and fires up a vagrant machine in test/. This machine starts up\nand applies some changes using puppet.\n\nAfterwards, the spec files (test/*_spec.rb) are applied and everything\nis cleaned up again.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Fpacker-puppetdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodevops%2Fpacker-puppetdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Fpacker-puppetdev/lists"}