Skip to content
TP Honey edited this page Sep 17, 2019 · 14 revisions

Welcome to the provision wiki!

This puppet module allows users to provision vm's/images using a variety of tasks. They are detailed in the https://github.com/puppetlabs/provision/blob/master/README.md.

Doing more with provision

There are a number of helper tasks and helper plans in this module, that gives extended functionality.

Additional tasks

install_pe

Installs a PE instance, turns on autosigning. hard-coded to install 2019.2

run_tests

Runs rspec tests against a SUT. this task runs against localhost.

➜ puppetlabs-motd git:(FM-8456) ✗ bundle exec bolt --modulepath /home/tp/workspace/:/home/tp/.puppetlabs/bolt/modules task run provision::run_tests --nodes localhost sut=olj2xnycawb1obx.delivery.puppetlabs.net Started on localhost...
Finished on localhost:
{
"status": "ok",
"result": "......\n\nFinished in 1 minute 35.23 seconds (files took 5.45 seconds to load)\n6 examples, 0 failures\n\n"
}
Successful on 1 node: localhost
Ran on 1 node in 101.33 seconds

update_node_pp

Creates a manifest file for a target node on pe server.

update_site_pp

rewrites the site.pp /etc/puppetlabs/code/environments/production/manifests with whatever manifest you pass.

Additional plans - general purpose

agents

It will read the inventory file, and look for a node that has the role of pe. It will take all nodes with the role of agent, install puppet 6 and register that node with the pe server (running 'puppet agent -t')

teardown

It will read the inventory file, and tear down any nodes listed.

tests_against_agents

It will read the inventory file, and run rspec tests against any non-pe target

Additional plans - hard coded examples

provisioner

A hard coded example plan that will spin up 3 machines on vmpooler, and set the appropriate roles to agents and pe.

server_setup

A hard coded example plan that will call the install_pe task and install it on the node that has the role of pe. Then the motd module is installed and set the UI password for pe to litmus.

tester

A hardcoded example plan that sets the motd on all of the nodes that have the role of agent.

run_spec_tests

A hard coded example plan that runs serverspec tests only against nodes that have the role of agent.