example42 / psick

Puppet Systems Infrastructure Construction Kit: The control-repo
http://www.example42.com
Apache License 2.0
657 stars 185 forks source link
control-repo control-systems docker fabric-tasks hiera-eyaml infrastructure profile puppet puppet-control puppet-tasks vagrant-environments

Gitpod ready-to-code

PSICK

Puppet Systems Infrastructure Construction Kit

Build Status Codacy Badge

Your infrastructure control repository.

From this repository you can build your IT infrastructure and manage it via Puppet.

PSICK is a Puppet control-repo with support for different tools to manage systems provisioning:

This control repo, among the other third party modules, uses the companion psick module which provides:

Sample Hiera data for the PSICK control-repo is available via the psick-hieradata module.

Setup of a new control-repo

Download this repository:

git clone https://github.com/example42/psick
cd psick
./psick create

The psick command currently it just allows you to create a new control-repo and populate it either with a bare minimal skeleton, or with the full PSICK contents. In the future it will provide the possibility to pick single components (integrations, profiles...), see how they diff compared to your own control-repo and eventually update them on your local control-repo.

Once you have created your own control-repo, you can start to work with it. If you have chosen to copy the full PSICK contents in your control repo, you can run the following commands from your own control-repo directory, otherwise run them from the PSICK directory.

This applies to all the scripts and paths referenced in the docs, just be aware that some of the scripts in bin/ and other integrations might not work correctly in a not full PSICK setup.

Setup of a Puppet environment

This control-repo requires Puppet 4 or later, if it's not already installed, you can install it with this cross OS Puppet 4 install script (it uses the official Puppet repos):

sudo bin/puppet_install.sh # Only if you don't have Puppet 4 installed

Before starting to use it, you have to populate the modules/ directory of the control-repo.

You need to do this both on your development workstation, and on your Puppet server (after having placed your control-repo into the /etc/puppetlabs/code/environments/ directory).

To install the prerequequisite gems (hiera-eyaml, deep_merge, r10k) and populate the external modules directory via r10k, you can run:

bin/puppet_setup.sh        # Only if you don't have the prerequisites gems

If you have already r10k and the prerequisite gems, just run:

r10k puppetfile install -v

If you also want to install the recommended (Vagrant, Docker) tools that can be used with the repo, run:

bin/setup.sh               # Only if you want to install Vagrant and Docker

The script, installs and runs r10k and then uses Puppet to install the other software.

Notes:

Directory structure

PSICK has the common set of files and directories of a Puppet control-repo:

Some extra directories are added in PSICK for integrations and tools:

Compatibility

PSICK compatible with every modern enough Puppet setup:

Documentation

PSICK is full of more or less hidden stuff, which ease a lot Puppet code development, testing and deployment. Here is where you can find more info:

General Puppet documentation:

About this control-repo:

Managing changes: