Coder Social home page Coder Social logo

willie-cadete / psick Goto Github PK

View Code? Open in Web Editor NEW

This project forked from example42/psick

0.0 2.0 0.0 1.78 MB

Puppet Systems Infrastructure Construction Kit

Home Page: http://www.example42.com

License: Apache License 2.0

Ruby 6.70% Shell 5.77% PowerShell 0.34% Python 0.88% HTML 65.07% JavaScript 0.27% CSS 2.36% Puppet 17.64% Pascal 0.96% Batchfile 0.02%

psick's Introduction

PSICK

Puppet Systems Infrastructure Construction Kit

A Puppet control-repo generator on steroids, featuring:

  • A modern, opinionated, general purpose, full featured, reusable control-repo
  • Multiple ways to test local Puppet code (on Docker, Vagrant or directly remote hosts)
  • Gitlab CI pipeline to control Puppet code deployment
  • Usable in any Puppet setup, based on Puppet OSS, PE, Foreman...
  • Ready to use profiles for system baselines and common applications
  • Toolset to create and maintain a new control-repo based on PSICK (WIP)

PSICK is a Puppet control-repo itself, you can use this repository directly in a Puppet environment, and basically have a full PSICK setup, or run the psick command to generate a new Puppet control-repo based on the components you need.

Components can be:

  • Profiles (and relevant tools and hiera data) for different applications
  • Integrations with Vagrant, Docket, GitLab, Fabric...
  • Scripts, tools or addtional control-repo files

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 contro-repo.

Once you have created your 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, 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 prequequisite 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 (Fabric, Vagrant, Docker) tools that can be used with the repo, run:

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

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

Notes:

  • You will be always asked to confirm or skip each step.

  • The script will use sudo for the operations that need root privileges.

  • Scripts are mostly tested on Mac and Linux environments. On Mac some packages installations don't work.

  • You can safely interrupt the scripts with CTRL+C at any time

  • For unattended setups (typically in CI pipelines) you can skip confirmation requests passing the argument auto:

    bin/puppet_setup.sh auto
    bin/setup.sh auto
    

Directory structure

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

  • environment.conf - The Puppet environment configuration file

  • manifests/ - Directory with the main manifests. Here we have just site.pp

  • Puppetfile - File that defines the external modules to add via r10k

  • modules/ - Directory where modules defined in Puppetfile are placed (it's .gitignored)

  • hiera.yaml - Hiera 5 environment configuration file. An equivalent Hiera 3 file is hiera3.yaml (was linked to /etc/puppetlabs/puppet/hiera.yaml)

  • hieradata/ - Directory where Hiera data is stored, in Yaml files.

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

  • bin/ - Directory containing tools and scripts for various Puppet related operations

  • docs/ - Directory with extra docs

  • site/ - An additional modules directory, with local profiles and tools.

  • docker/ - Files used for building Docker images for multiple OS

  • vagrant/ - Various Vagrant environments where is possible to test local Puppet code

  • fabfile/ - Fabric integration and scripts

  • skeleton/ - A skeleton of a Puppet 4 module, to use with puppet module generate

  • .gitlab-ci.yaml - (Sample) GitLab Continuous Integration pipeline for code testing and deployment

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:

  • Control-repo structure - A description of the control-repo structure and most important paths

  • Control-repo logic - An overview of the design choices and the logic of this control repo.

  • Prerequisites - A more detailed view of the prerequisites needed to fully use the control-repo

  • Noop Mode - An overview on how to enforce noop mode server side with this repo

  • Vagrant Integration - How to use Vagrant to test the control-repo during development

  • Docker Integration - How to use Docker to test Puppet code and to build images based on the existing Puppet code

  • Fabric - A review of Puppet tasks available with Fabric

Managing changes:

  • Git tasks - An overview on how to use Git

  • Change Process - A step by step guide on how to manage changes in Puppet code

For the complete documentation of the local classes and defines check the puppet strings generated docs, automatically generated in PSICK CI pipeline.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.