Forge Home

rook

pdk
supported
tasks
A module for installing and configuring rook https://rook.io

30,081 downloads

2,543 latest version

4.6 quality score

Version information

  • 1.0.1 (latest)
  • 1.0.0
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jun 7th 2021
This version is compatible with:
  • Puppet Enterprise 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
  • Puppet >= 6.0.0 < 8.0.0
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu
    ,
    windows
Tasks:
  • install
  • namespace

Start using this module

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

Add this module to your Puppetfile:

mod 'puppetlabs-rook', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-rook
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-rook --version 1.0.1

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

puppetlabs/rook — version 1.0.1 Jun 7th 2021

Table of Contents

Description

Rook is an open source orchestrator providing file, block, and object storage services for distributed storage systems running in cloud-native environments.

This module installs and configures Rook on a Kubernetes cluster.

Setup

To install the rook module, add the rook class to the manifest file:

include 'rook'

When the rook class is declared, Puppet does the following:

  • Downloads and installs the Ceph packages.
  • Configures Rook on Kubernetes.

Usage

To customize options, such as the release channel, add the following code to the manifest file:

class { 'rook':
  version => 'v0.7.0',
}

Tasks

Included in the rook module is an example task that creates the rook namespace, and executes the kubectl tasks to configure rook on kubernetes.

bolt task run rook::rook_namespace kubeconfig=<path-to-config-file> namespace=<namespace-title> ---nodes <k8s-node-name> --user <user> --password <password> --modulepath <module-path>
bolt task run rook::rook_create kubeconfig=<path-to-config-file> config_file=<path-to-config-file> ---nodes <k8s-node-name> --user <user> --password <password> --modulepath <module-path>

For additional information on how to execute a task, see the PE documentation or the Bolt documentation.

Validating and unit testing the module

This module is compliant with the Puppet Development Kit (PDK), which provides tools to help run unit tests on the module and validate the modules' metadata, syntax, and style.

Note: To run static validations and unit tests against this module using the pdk validate and pdk test unit commands, you must be using Puppet 5 or higher. In the following examples, we have specified Puppet 5.5.3.

To validate the metadata.json file, run the following command:

pdk validate metadata --puppet-version='5.5.3'

To validate the Puppet code and syntax, run the following command:

pdk validate puppet --puppet-version='5.5.3'

To unit test the module, run the following command:

pdk test unit --puppet-version='5.5.3'

Reference

REFERENCE.md.

Limitations

This module is compatible only with the Linux kernel and supports:

  • Puppet 4 or higher.
  • Kubernetes 1.10.x or higher.
  • Ruby 2.3.0 or higher.

Development

If you have an issue with this module or would like to request a feature, file a ticket.

If you have problems with this module, contact Support.

Contributing

If you would like to add to this module, please follow the rules in the CONTRIBUTING.md.

To run the acceptance tests you can use Puppet Litmus with the Vagrant provider by using the following commands:

bundle exec rake 'litmus:provision_list[all_supported]'
bundle exec rake 'litmus:install_agent[puppet5]'
bundle exec rake 'litmus:install_module'
bundle exec rake 'litmus:acceptance:parallel'

As currently Litmus does not allow memory size and cpu size parameters for the Vagrant provisioner task we recommend to manually update the Vagrantfile used by the provisioner and add at least the following specifications for the puppetlabs-kubernetes module acceptance tests:

Update Vagrantfile in the file: spec/fixtures/modules/provision/tasks/vagrant.rb vf = <<-VF Vagrant.configure(\"2\") do |config| config.vm.box = '#{platform}' config.vm.boot_timeout = 600 config.ssh.insert_key = false config.vm.hostname = "testkube" config.vm.provider "virtualbox" do |vb| vb.memory = "2048" vb.cpus = "2" end #{network} #{synced_folder} end VF