This module provides the plumbing and automation to set up a basic reference architecture for Open Source Puppet Server, PuppetDB, and Foreman.
- Description
- Setup - The basics of getting started with osp_workshop
- Usage - Step by step instructions
- Cleanup
Using Vagrant and Bolt, bootstrap a monolithic Puppet instance with two nodes:
osp
and foreman
. This module will install and configure Puppet Server and
PuppetDB on the osp
node using
theforeman-puppet
module, configure /etc/hosts
to ease communication between the nodes, and set
up agents. Then, it configures r10k to
deploy a special control
repo containing
roles and profiles to complete the Foreman installation and integration.
This module is primarily a Bolt project that targets the Vagrant instances that this module also provides. Exercise caution before attempting to apply this module to other resources.
This module requires a working Vagrant
installation. The Vagrantfile
provided in this repo expects the libvirt
backend. You may need to modify it to work with other backends, such as
VirtualBox.
Start by bringing up the two Vagrant instances.
vagrant up
Assuming they launch successfully, you should be able to log in to each instance with:
vagrant ssh osp
vagrant ssh foreman
and switch to root with sudo -s
.
For convenience later on, grab the IP address of the foreman
node with ip addr
and add an entry to your host's /etc/hosts
file (or equivalent) like:
192.168.121.89 foreman
Remember, your IP address will be different!
Finally, prepare to allow Bolt to connect to these nodes by running:
vagrant ssh-config > vagrant-ssh.conf
You may need to fixup the resulting config file depending on how you invoke
Bolt. Bolt's inventory.yaml
is configured to use vagrant-ssh.conf
to tell
it how to connect.
- Install Bolt modules:
bolt module install
- Bootstrap the Puppet instance:
bolt plan run osp_workshop::bootstrap
- Run Puppet on the
foreman
node. This will complete the agent SSL bootstrap and install Foreman based on the contents of the control repo./opt/puppetlabs/bin/puppet agent --test --server osp
- Run Puppet on the
foreman
node again. This run will notice Foreman is installed and set up the Puppet plugin./opt/puppetlabs/bin/puppet agent --test
- Log in to https://foreman/ (default username and password: "admin"). Under
Administer→Settings→Authentication, add
osp
to Trusted hosts. - Run Puppet on the
osp
node. This will reconfigure Puppet Server to use Foreman as an ENC and report to it in addition to PuppetDB./opt/puppetlabs/bin/puppet agent --test
Stop your Vagrant instances with:
vagrant halt
and remove them completely with:
vagrant destroy