The common elements of a control-repo
are:
- The
manifests
directory where are placed the first files that thePuppet Server
parses when compiling catalogs for clients. Here we typically have thesite.pp
file (but other manifests with different names can be seamlessly added) where we can set Top scope variables, Resource Defaults, and eventually have Node statements to define what classes should be included in our nodes (nodes classification can be done in several different ways, using thenode
statement is just one of them, which, incidentally, is not used here). - The
hieradata
ordata
directory which contains Hiera data files. The name of the directory is completely arbitrary and must match what's defined inhiera.yaml
. On somecontrol-repos
we may not have such a directory (in the rare caseHiera
is not used, or uses external backends or its data is stored in a separated repository). In our caseHiera
is used with the popular Eyaml backend, which allows storage of data inYAML
files and the possibility to encrypt some key. TheHiera
data files inYAML
format are placed in thedata
directory. - The
modules
directory containsPuppet modules
. Typically we don't place themselves directly in ourcontrol-repo
but define them in thePuppetfile
and then deploy them with tools like r10k or Librarian Puppet. - Besides the ones in public modules, we need to create custom classes where we customize resources to fit our needs. In this
control-repo
they are placed in thesite
directory, here we have aprofile
module with all our profiles (thePuppet classes
that actually manage different kind of services and software), and atools
module, mostly containingPuppet
defines used in our profiles. - The
environment.conf
file, which configures our environment: where the modules are placed, the caching timeout and eventually a script that returns a custom configuration version.
Besides these common locations, in our control-repo
we have also:
- The
vagrant
directory contains differentVagrant
environments with the relevant toolset that can be used to test the samecontrol-repo
. They are fully customizable by editing theconfig.yaml
file in eachVagrant
environment. - Files for building
Docker images
locally are under thedocker
directory. - Documentation is stored under
docs
- The
bin
directory contains several scripts for various purposes.