Forge Home

r10k

Install and configure r10k

16,145 downloads

13,800 latest version

4.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.3.0 (latest)
  • 0.2.0
  • 0.1.0
  • 0.0.1
released Jan 4th 2015
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.4.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'sharpie-r10k', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sharpie-r10k
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sharpie-r10k --version 0.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

sharpie/r10k — version 0.3.0 Jan 4th 2015

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 minimal complexity and provides just enough Puppet policy to manage the r10k configuration file. In many respects, zack/r10k is "the r10k module" and this module is "r10k-lite". 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 is limited test coverage and all interfaces are subject to change. Use in production at your own risk.

For production systems, I heartily recommend using zack/r10k instead of this module.

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. For r10k to be fully functional after installation and configuration, a git package should also be included on the managed node.

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.

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.4.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

  • postrun An array of strings that specifies an arbitrary command to be run after environment deployment. Default: []

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

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

Additionally, the r10k::config class also accepts the path, user, group and mode parameters of the File Type. These parameters are used to determine the location, ownership and permissions of the r10k configuration file. By default, the file will be located at /etc/r10k.yaml, be owned by root, and will have permissions of 0644.

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

---
# In a Hiera datasource
r10k::ensure: '1.4.0'
r10k::config::postrun:
  - /usr/bin/some_executable
  - arg1
  - arg2
r10k::config::sources:
  somename:
    remote: 'ssh://git@github.com/someuser/somerepo.git'
    basedir: '%{::settings::confdir}/environments'
  someothername:
    remote: 'ssh://git@github.com/someuser/someotherrepo.git'
    basedir: '/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://git@github.com/someuser/somerepo.git',
      'basedir' => "${::settings::confdir}/environments"
    },
    'someothername' => {
      'remote'  => 'ssh://git@github.com/someuser/someotherrepo.git',
      'basedir' => '/some/other/basedir'
    },
  },
  postrun => [
    '/usr/bin/some_executable',
    'arg1',
    'arg2',
  ],
}

Support

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