Giter Site home page Giter Site logo

puppet's Introduction

Puppet Control Repo

Build Status

Development status

This project is still in a prototype development stage.

Overview

Vlad's Puppet Control Repo.

Description

bin/

Contains various executable scripts.

data/

Contains the hiera data files. It's intended to serve as a base only, for public data, with sane defaults. It should be overwritten or amended with data from private sources.

dist/

Contains organization-specific roles and profiles. This directory is specified as a modulepath in environment.conf Designing Puppet โ€“ Roles and Profiles.

manifests/

Contains Puppet's manifests:

  • site.pp: the main manifest

spec/

Contains test definitions.

.env

Contains private environment variables.

environment.conf

This file can override several settings whenever the Puppet master is serving nodes assigned to that environment. Config Files: environment.conf

envrc

This file contains global variables. All variables declared here are public

hiera.yaml

This file configures Hiera per environment

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.

Testing

Prerequisites

cd dist/profile
bundle install

Unit testing

cd dist/profile
bundle exec rake test

Acceptance testing

Run default set for the first time (default is just the base profile):

PUPPET_INSTALL_TYPE=agent ORDERING=manifest BEAKER_destroy=no bundle exec rake integration

Subsequent runs:

PUPPET_INSTALL_TYPE=agent ORDERING=manifest BEAKER_destroy=no BEAKER_provision=no bundle exec rake integration

Last run (will destroy the machines):

PUPPET_INSTALL_TYPE=agent ORDERING=manifest BEAKER_provision=no bundle exec rake integration

Complete example:

PUPPET_INSTALL_TYPE=agent ORDERING=manifest BEAKER_destroy=no BEAKER_provision=yes BEAKER_debug=yes BEAKER_set=default BEAKER_role=none bundle exec rake integration

Other commands:

  • List nodes: bundle exec rake beaker_nodes

The following environment variables can be used to influence how beaker works:

  • BEAKER_role: choose a role from spec/acceptance/support/roles/*.yml
  • BEAKER_set: choose a nodeset from spec/acceptance/nodesets/*.yml defaults to default
  • BEAKER_setfile: specify a nodeset using a full path
  • BEAKER_provision: set to no to re-use existing VMs
  • BEAKER_keyfile: specify alternate SSH key
  • BEAKER_debug: set to any value to enable beaker debug logging
  • BEAKER_color: set to no to disable color output
  • BEAKER_destroy: set to no to keep the VMs after the test run. Set to onpass to keep the VMs around only after a test failure.
  • ORDERING: How unrelated resources should be ordered when applying a catalog (https://docs.puppetlabs.com/puppet/latest/reference/configuration.html#ordering)
  • PUPPET_INSTALL_TYPE: specify puppet type (one of: pe, foss, agent)
  • PUPPET_INSTALL_VERSION: specify the version to install

Clean-up

cd dist/profile
bundle exec rake test_clean

Contribute

See CONTRIBUTING.md file.

License

Licensed under the Apache License, Version 2.0. See LICENSE file.

puppet's People

Contributors

vladgh avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

azalio

puppet's Issues

Remove ec2tagfacts module

For now this doesn't work. It requires aws cli which might not be installed in the Docker container (errors if not present).

Use `$facts[]` instead of global variables

Benefits: More readable and maintainable code, by making facts visibly distinct from other variables. Eliminates possible confusion if you use a local variable whose name happens to match that of a common fact.

Drawbacks: Only works with Puppet 3.5 or later. Disabled by default in open source releases prior to Puppet 4.0.

Fix acceptance tests

WARNING: Shared example group 'profile::aws::cloudformation' has been previously defined at:
  /Users/vlad/Dropbox/Projects/puppet/dist/profile/spec/acceptance/support/aws/cloudformation_spec.rb:1
...and you are now defining it at:
  /Users/vlad/Dropbox/Projects/puppet/dist/profile/spec/acceptance/support/aws/cloudformation_spec.rb:1
The new definition will overwrite the original one.

Clean-up hooks

Put all checks in functions and fix checks for exit code

RuboCop

RuboCop should only be used locally, in the development group. It's probably not a good idea to run on the CI.

Fix gem dependecies

Your bundle requires gems that depend on each other, creating an infinite loop. Please remove gem 'stomp' and try again.

Upgrade git

There are always 2 packages that need upgrading because git is installed during the image build and puppet adds the latest git repo, but the git package defaults to ensure=latest.

The git class should have package_ensure => 'latest'

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.