Skip to content

Bolt project to bootstrap open source Puppet and Foreman reference

Notifications You must be signed in to change notification settings

jameslikeslinux/osp_workshop

Repository files navigation

OSP Workshop

This module provides the plumbing and automation to set up a basic reference architecture for Open Source Puppet Server, PuppetDB, and Foreman.

Workshop Architecture

Table of Contents

  1. Description
  2. Setup - The basics of getting started with osp_workshop
  3. Usage - Step by step instructions
  4. Cleanup

Description

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.

Setup

What osp_workshop affects

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.

Setup Requirements

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.

Beginning with osp_workshop

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.

Usage

  1. Install Bolt modules:
    bolt module install
    
  2. Bootstrap the Puppet instance:
    bolt plan run osp_workshop::bootstrap
    
  3. 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
    
  4. 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
    
  5. Log in to https://foreman/ (default username and password: "admin"). Under Administer→Settings→Authentication, add osp to Trusted hosts.
  6. 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
    

Cleanup

Stop your Vagrant instances with:

vagrant halt

and remove them completely with:

vagrant destroy

About

Bolt project to bootstrap open source Puppet and Foreman reference

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published