This repository is a template control-repo that can be used with r10k as part of my sample Foreman / Puppet / PuppetDB setup.
The major points are:
- An environment.conf that correctly implements:
- A site directory for roles, profiles, and any custom modules for your organization.
- A config_version script.
- Provided config_version scripts to output the commit of code that your agent just applied.
- Basic example of roles/profiles code.
- hieradata directory with common.yaml and nodes directory.
- Install GitLab.
-
After GitLab is installed you may sign if with the
root
user and password5iveL!fe
. -
Make a user for yourself.
-
Make an SSH key to link with your user. You’ll want to do this on the machine you intend to edit code from (most likely not your Puppet master, but your local workstation or laptop).
- Create a group called
puppet
(this is case sensitive).
-
Add your user to the
puppet
group as well. -
Create a project called
control-repo
, and set the Namespace to be thepuppet
group. -
Clone this control repository to your laptop/workstation:
git clone <repository url>
cd control-repo
- Remove this repository as the origin remote:
git remote remove origin
- Add your internal repository as the origin remote:
git remote add origin <url of your gitlab repository>
- Push the production branch of the repository from your machine up to your git server
git push origin production