Latest Puppet playground (for your tests and developement) that just works!
This is work based on voxpupuli's Crafty oss Example
Navigate to the chosen directory and clone the repository with:
git clone git@github.com:stexads/puppet-playground.gitThe rest of this document assumes will list a series of commands that should be typed from inside the cloned repository. For example:
mkdir ~/sandbox
cd ~/sandbox
git clone git@github.com:stexads/puppet-playground.git
cd puppet-playgroundpodman compose --profile play uppodman compose --profile play down -vOpen up: http://127.0.0.1:8088/
To login the puppetserver:
podman exec -it puppetserver bashWhen the play profile is up and healthy, start a generic agent (no systemd):
podman run --rm --hostname puppet-agent --network 0x3e.lan -it ghcr.io/exogroup/generic/el9:latest /bin/bashUsing the test profile (note: this option has not been tested):
podman compose --profile test run testing agent -tFirst spin up a systemd-based image like el9 with the following command:
podman run --privileged --rm --name agent --hostname agent.0x3e.lan --network 0x3e.lan -it ghcr.io/exogroup/generic/el9:latest /sbin/initThen, by using a seperate tty, login to the image:
podman exec -it agent bashThis will open up a shell in the agent.
Next we need to install puppet as the image does not come with puppet installed:
apt update && apt install -y puppetFinally we can connect the agent to the puppetserver:
puppet agent -tvpodman compose --profile hdm up -dthen open up: http://0.0.0.0:3000/
podman compose --profile play down
podman compose --profile hdm down
podman compose --profile test down
podman volume rm oss_openvoxserver
podman volume rm oss_openvoxserver-ssl
podman volume rm oss_openvoxserver-ca
podman volume rm oss_openvoxdb
podman volume rm oss_openvoxdb-postgres
podman volume rm oss_agent-ssl
podman network rm 0x3e.lanYou might get the following error at some stage:
Error: certificate verify failed [unable to get local issuer certificate for CN=puppet]Steps to resolve:
On puppetserver:
puppetserver ca list --all
puppetserver ca clean --certname <agent-node-certname>On puppet agent:
sudo rm -rf /etc/puppetlabs/puppet/ssl
puppet agent -tv