Code Monkey home page Code Monkey logo

puppet-control's Introduction

Puppet Control Repo

Overview

This is an all-in-one repo that is a skeleton to use in a production environment, but also can be used to share and test Puppet infrastructure.

The idea is that this environment controls all of your environments (dev, qa, production) but also holds the ability to spin up Vagrant VMs to test your code before committing.

NOTE: Internet access is required for this environment

Files/Directories

Vagrantfile

Dictates basics of how Vagrant will spin up VM. Please do not edit this file unless you really know what you're doing.

Puppetfile

r10k needs this file to figure out what component modules you want from the Forge. The result is a modules directory containing all the modules specified in this file, for each environment/branch. The modules directory is listed in environment.conf's modulepath.

environment.conf

Controls puppet's directory environment settings.

Config Files: environment.conf

hieradata

Contains your hiera data files.

manifests

Contains site.pp

site

Contains your organization-specific roles and profiles (wrapper modules for Forge component modules)

This directory is specified as a modulepath in environment.conf

The origins of roles and profiles

hooks/

Git hooks for checking your Puppet code. There is a pre-commit you can copy to your .git/hooks repo directory. There is also a pre-receive for your git server (you also need to copy the commit_hooks subdirectory to your git server). You must install puppet and puppet-lint (locally for pre-commit, on the git server for pre-receive) to use these hooks.

To use the pre-receive hook on your Git server, copy the hook and the commit_hooks directory to the puppet-control.git directory in your repositories directory.

provision/

Contains the scripts and files that are used to spin up the Vagrant VM. This is different from the Vagrantfile in that these are more specific to what you want to happen with the specific instance. The pe/ directory contains answer files, and, after you spin up PE for the first time, will contain PE installation media, which are in .gitignore.

If you want to avoid having to wait for PE to download during the provisioning process and you have the Puppet Enterprise tarball lying around, just copy it over to provision/pe and that step will be skipped.

The provision/provision.sh script contains the PE version that will be installed. You'll need to change it to downgrade/upgrade as needed.

reference/

Reference materials for Puppet workflow.

config/

Contains configuration options to customize oscar.

How to use it

There are three vagrant nodes - PE master, PE agent, and a standalone masterless puppet agent.

The default credentials for the PE Master Console are:

Username: admin

Password: puppetlabs

Summary of procedure

vagrant up <node>

This will take some time to provision.

Ensure that the PE master is up and provisioned before attempting to start another system.

Stuff included:

  • Puppet Environments (control repository)
  • Roles and Profiles
  • Hiera
  • Git workflow

Once everything is provisioned as you need it, you can ssh into the instance:

vagrant ssh master

You will be logged in as user vagrant. Please sudo to root if you need to run puppet.

1. Install Virtualbox

Latest version works fine

2. Install Vagrant

Latest version is fine

3. Install oscar plugin

vagrant plugin install oscar

TO DO

  • Use /vagrant mounted directory on PE master as an environment directory for better full-stack testing
  • Integrate control-spec-helper for testing
  • Develop spec/smoke tests

puppet-control's People

Contributors

aharden avatar awaxa avatar jeffmccune avatar terrimonster avatar

Watchers

 avatar  avatar

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.