Quick Puppet Development Environment
Want to run Puppet in your own environment without a master?
- Fork this repo into your own namespace.
- Change the following files to point to your forked Github repo.
- Download the
run-puppetscript to the machine you would like to manage with Puppet and ensure it is executable.
- Run the
run-puppetscript on a machine you would like to manage with your new Puppet control repo. Set the control repo with either the
CONTROL_REPOenvironment variable or the
./run-puppet -c https://github.com/<YOUR_USERNAME_HERE>/puppet-masterless-skeleton
Classifying your environment
- Add Puppet files (with a '.pp' suffix) to the
includestatements to the
site.ppfile to include the above Puppet files.
- Add any support files to the
files/<module>/<filename>directory and reference them as
- Location in repo:
- Reference in Puppet code:
- Location in repo:
- Classify your infrastructure by adding nodes to
- Commit and push Puppet code to your fork to manage the target machine with Puppet.
- Add defined roles under
manifests/rolesusing the Roles and Profiles pattern.
- Add additional modules to
- By default puppet is configured to automatically run every 30 minutes from
the top of each hour. If you would like to manually kickoff a puppet run just
run-puppetscript on the machine you wish to run puppet on.
- Use the
puppet/r10kfrom being re-initialized.
Running With Vagrant
- Set up VirtualBox and Vagrant
- Add a
Vagrantfileto your fork. Pushing isn't required but doesn't hurt. The minimum would be something like this:
Vagrant.configure(2) do |config| config.vm.box = "centos/7" end
In 1 window
- Make changes to the manifest/*.pp files
- Control use in the Puppetfile and the toplevel site.pp
- Commit and push changes
In another window, from the clone
To deploy the Puppet code inside the vagrant VM:
sudo su -
./run-puppet -c <control-repo>
Make any changes in the first window. Repeating
run-puppetwill update the vagrant VM with changed code.
Clean the vagrant VM if needed with
Open issues here on Github.
OR if you are awesome and want to write some code
Fork, Create topic branch, Submit a PR!