Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


A puppet project skeleton uses Librarian-Puppet and Vagrant.


  • Install VirtualBox.
  • Use Vagrant for development, please install Vagrant according to the official instruction.
  • Install RVM.
  • Switch to project directory and the correct ruby version should be installed according to .ruby-version.
  • Install bundler by running $ gem install bundler
  • Run $ bundle install to install required rubygems.
  • Run $ librarian-puppet install to install required puppet modules. Community modules and private modules will be installed in modules folder. See Librarian-Puppet for further info.


  • Define your node in vagrant.pp:
  • Add community modules using librarian-puppet, edit Puppetfile and run $ librarian-puppet install
  • Add private modules under private folder, don't forget to edit Puppetfile as well. Run $ rake module:sync or $ librarian-puppet install to install them.
  • Roles and Profiles located at top level of the project, for further information see Roles and Profiles Pattern in Puppet.
  • Use rake tasks to speed up your puppet development.

You can now run $ vagrant up to bootstrap all of them at the same time in VirtualBox.

Other commands:

$ rake -T                                  # List all tasks.
$ rake -D                                  # List all tasks with descriptions.
$ rake module:lint                         # Puppet lint.
$ rake module:reinstall                    # Clean and reinstall modules.
$ rake module:sync                         # Sync private modules.
$ rake syntax                              # Syntax check Puppet manifests and templates
$ rake syntax:hiera                        # Syntax check Hiera config files
$ rake syntax:manifests                    # Syntax check Puppet manifests
$ rake syntax:templates                    # Syntax check Puppet templates
$ rake vagrant:provision[name,provisioner] # Provision vagrant VM.
$ rake vagrant:rebuild[name]               # Rebuild vagrant VM.


├── Gemfile             # Required rubygems, use bundler to install.
├── Puppetfile          # Required puppet modules, use librarian-puppet to install.
├── Rakefile            # Some predefined tasks, to speed up development.
├── Vagrantfile         # Vagrant configuration.
├── hiera.yaml          # Puppet hiera config, only define hierarchy and datadir in this file.
├── docs                # Some documents
├── manifests
│   ├── hieradata         # The actual heirdata stored in this folder.
│   ├── site.pp           # Node definition for production.
│   └── vagrant.pp        # Node definition for local development.
├── private             # Private modules, will be sync into `modules` folder by `librarian-puppet`.
│   ├── common
│   └── users
├── profile             # Profile, abstraction of "Technology stack"
│   ├── files
│   └── manifests
├── role                # Role, abstraction of "What does this server do?"
│   └── manifests
├── spec                # Put test files
└── scripts
    └── # Script of upgrading puppet to version 3 on Ubuntu

Bootstrap on Amazon Web Services

You can bootstrap AWS instance in these 2 ways to test:


  • Create an Ubuntu instance, copy this repo into instance and run scripts/ to install the latest puppet.
  • Setup the correct hostname.
  • Apply masterless puppet by running $ puppet apply --parser future --modulepath './modules' --hiera_config=./hiera.yaml --manifestdir ./manifests


  • Install Vagrant-AWS plugin: $ vagrant plugin install vagrant-aws.
  • Add a dummy box for AWS: $ vagrant box add dummy
  • Uncomment AWS related section in Vagrantfile.
  • Fill AWS credentials and other info.
  • Run $ vagrant up aws-web --provider=aws to bootstrape machine aws-web.
  • Or create other machine according to the aws-web example.


  • Move AWS credentials into config file.
  • Add acceptence tests using Beaker


A puppet project skeleton including librarian-puppet, vagrant and roles / profiles pattern.



No releases published


No packages published