Giter VIP home page Giter VIP logo

puppet-r10k's Introduction

sharpie-r10k

Build Status

A Puppet module to install and configure r10k, the killer robot powered Puppet deployment tool.

There are two other r10k modules available on the module forge that pre-date this one:

Both have interesting features such as cron setup or MCollective integration. Compared to zack/r10k, this module aims for a minimal installation footprint with respect to adding system packages. Compared to ploperations/r10k, this module emphasizes configuration through Hiera data bindings rather than statically served files.

Caveats

This package has no stable releases yet. Specifically, there are no tests and all interfaces are subject to change. Use in production at your own risk.

This package is hard-wired to manage the system-wide r10k config file /etc/r10k.yaml which is owned by root. This restriction may be lifted in future versions.

Dependencies

This module should only be used to install and manage r10k versions 1.0.0 or newer.

This module was designed with Puppet 3.x in mind and makes extensive use of Hiera data bindings. The module may function on Puppet 2.7.x, but there are currently no tests or guarantees surrounding such functionality.

For r10k to be fully functional after installation and configuration, a git package should also be included on the managed node.

Examples

Currently this module provides two classes: r10k and r10k::config

The r10k class is pretty simple to use and only takes one parameter, ensure:

class {'r10k': ensure => '1.0.0'}

Installation is performed by a Package type using the gem provider. Thus, the ensure parameter can accept any value that is valid for the Package type.

The r10k::config class manages the contents of /etc/r10k.yaml and accepts three parameters:

  • cachedir: Path to a directory to be used by r10k for caching data. Default: /var/cache/r10k

  • sources: Hash containing data sources to be used by r10k to create dynamic Puppet environments. Default: {}

  • purgedirs: An Array of directory paths to purge of any subdirectories that do not correspond to a dynamic environment managed by r10k. Default: []

Detailed information on these parameters can be found in the r10k documentation.

The r10k::config class is designed to be used in conjunction with Hiera data:

---
# In a Hiera datasource
r10k::ensure: '1.0.0'
r10k::config::sources:
  somename:
    remote: 'ssh://[email protected]/someuser/somerepo.git'
    basedir: '%{::settings::confdir}/environments'
  someothername:
    remote: 'ssh://[email protected]/someuser/someotherrepo.git'
    basedir: '/some/other/basedir'

r10k::config::purgedirs:
  - '%{::settings::confdir}/environments'
  - '/some/other/basedir/
# In a Puppet manifest
class { 'r10k': }         # Ensured to be version 1.0.0
class { 'r10k::config': } # Magic!

The r10k::config class can also be used without Hiera data:

class { 'r10k::config':
  sources => {
    'somename' => {
      'remote'  => 'ssh://[email protected]/someuser/somerepo.git',
      'basedir' => "${::settings::confdir}/environments"
    },
    'someothername' => {
      'remote'  => 'ssh://[email protected]/someuser/someotherrepo.git',
      'basedir' => '/some/other/basedir'
    },
  },
  purgedirs => [
    "${::settings::confdir}/environments",
    '/some/other/basedir',
  ],
}

Support

Please log tickets and issues at: https://github.com/Sharpie/puppet-r10k/issues

puppet-r10k's People

Contributors

sharpie avatar

Watchers

James Cloos avatar Benjamin Priestman 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.