Forge Home

cagefs

A module for managing cagefs virtual filesystem in CloudLinux

9,825 downloads

9,825 latest version

2.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.0.1 (latest)
released Aug 1st 2014
This version is compatible with:

Start using this module

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

Add this module to your Puppetfile:

mod 'perfectayush-cagefs', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add perfectayush-cagefs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install perfectayush-cagefs --version 0.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

perfectayush/cagefs — version 0.0.1 Aug 1st 2014

cagefs

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations

Overview

This module tries to manage the cagefs virtual filesystem for users in Cloudlinux.

Module description

Managing rpms and files in cagefs can be troublesome when managing large number of servers. This module helps in adding and removing these resources in cagefs. Its especially useful for managing rpms inside cagefs.

Setup

This module does not manage installation of cloudlinux, and cagefs. This is a prerequirement. It only manages the resources inside cagefs. It works with both Cloudlinux 5/6.

If you are using hiera, you can efficiently manage the resource in yaml file. Ofcourse, this requires hiera to be properly setup.

Usage

To use the module, just include the cagefs module in the relevant node definition.

node "cloudlinuxserver" {
  include cagefs
}

Now you can install and add packages in cagefs by adding the cagefs_packages key in the hiera yaml which specifies the required package.

cagefs_packages:
  php: {}
  perl:
    ensure: absent
    version: "5.10.1"
  ruby:
    ensure: present
    version: "1.9.3"

else you can directly can install a package and add it to cagefs using cagefs::package resource:

cagefs::package { "php":
  ensure  => present,
  version => latest
}

Reference

cagefs class

  • This file includes the cagefs::files class and creates resources for cagefs packages using a hiera hierarchy

cagefs::package defined type

This resource installs the required rpm package and add/remove it to/from cagefs using cagefs_rpm custom type and finally force updates cagefs.

It has two parameters:

  • ensure: specifies whether or not to include this rpm
  • version: specifies the version of the rpm to be installed

cagefs_rpm custom type

cagefs::package behind the scenes uses package resource and custom defined cagefs_rpm type. You can also use cagefs_rpmtype directly as follows:

cagefs_rpm {"php":
  ensure => present,
}

Whether an rpm is present or absent in cagefs,is a state and this is managed via cagefs_rpm type. It uses cagefsctl utility to accomplish this task.

cagefs::forceupdate class

This includes an exec which runs cagefsctl --forceupdate only when any file or package is updated in cagefs.

cagefs::files class and cagefs::package resource notify this exec if any state change happens.

cagefs::files class

This files contains all the important files whose update require cagefs to be updated. It includes the cagefs forceupdate exec which is triggered only if any of the package or file is updated. You can add more files in this class if they need to updated in cagefs.

For more refrence to how cagefs/cloudlinux work refer Cloudlinux Documentation

Limitations

  • This works only with Cloudlinux 5/6.
  • It doesn't manage any installation of cagefs. Only a few resources within cagefs.