1.2 KiB
1.2 KiB
Purpose:
At this point, we need to configure Gitea as the storage repository for the Puppet "Environments" (e.g. Production
and Development
). We can do this by leveraging a tool called "r10k" which pulls a Git repository and configures it as the environment in Puppet.
Install r10k
# Install r10k Pre-Requisites
sudo dnf install -y ruby ruby-devel gcc make
# Install r10k Gem (The Software)
# Note: If you encounter any issues with permissions, you can install the gem with "sudo gem install r10k --no-document".
sudo gem install r10k
# Verify the Installation (Run this as a non-root user)
r10k version
Configure r10k
# Create the r10k Configuration Directory
sudo mkdir -p /etc/puppetlabs/r10k
# Create the r10k Configuration File
sudo nano /etc/puppetlabs/r10k/r10k.yaml
---
# Cache directory for r10k
cachedir: '/var/cache/r10k'
# Sources define which repositories contain environments
sources:
puppet:
remote: 'https://git.bunny-lab.io/GitOps/Puppet.git'
basedir: '/etc/puppetlabs/code/environments'
# Create r10k Cache Directory
sudo mkdir -p /var/cache/r10k
sudo chown -R puppet:puppet /var/cache/r10k