This is a template control repository that has the minimum amount of scaffolding to make it easy to get started with r10k or Puppet Enterprise's Code Manager.
The important files and items in this template are as follows:
Here's a visual representation of the structure of this repository:
control-repo/
├── data/ # Hiera data directory.
│ ├── nodes/ # Node-specific data goes here.
│ └── common.yaml # Common data goes here.
├── manifests/
│ └── site.pp # The "main" manifest that contains a default node definition.
├── scripts/
│ ├── code_manager_config_version.rb # A config_version script for Code Manager.
│ ├── config_version.rb # A config_version script for r10k.
│ └── config_version.sh # A wrapper that chooses the appropriate config_version script.
├── site-modules/ # This directory contains site-specific modules and is added to $modulepath.
│ ├── profile/ # The profile module.
│ └── role/ # The role module.
├── LICENSE
├── Puppetfile # A list of external Puppet modules to deploy with an environment.
├── README.md
├── environment.conf # Environment-specific settings. Configures the modulepath and config_version.
└── hiera.yaml # Hiera's configuration file. The Hiera hierarchy is defined here.
To get started with using the control-repo template in your own environment and git server, we've provided steps for the three most common servers we see: GitLab, BitBucket, and GitHub.
root
user. If you didn't specify a custom password during installation, a temporary password is located in /etc/gitlab/initial_root_password
.puppet
(this is case sensitive).
puppet
group as well.control-repo
, and set the Namespace to be the puppet
group.git clone <repository url>
cd control-repo
git remote remove origin
git remote add origin <url of your gitlab repository>
git push origin production
Project
called puppet
(with a short name of PUP
)control-repo
r10k
with a password of puppet
.
PUP
project.PUP
project.git clone <repository url>
cd control-repo
git remote remove origin
git remote add origin <url of your bitbucket repository>
git push origin production
Follow GitHub's documentation to create your control repository starting from this template.
control-repo
in your user account or organization. Ensure that "Initialize this repository with a README" is not selected.
git clone <repository url>
cd control-repo
git remote remove origin
git remote add origin <url of your github repository>
git push origin production
If you use Puppet Enterprise see the official documentation for enabling Code Manager.