Forge Home

racktables

Installs RackTables with all dependencies

18,116 downloads

6,112 latest version

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

Version information

  • 0.4.1 (latest)
  • 0.3.4
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Mar 4th 2015
This version is compatible with:
  • Puppet Enterprise 3.x
  • Puppet 3.x
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'sgnl05-racktables', '0.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sgnl05-racktables
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sgnl05-racktables --version 0.2.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
Tags: racktables

Documentation

sgnl05/racktables — version 0.2.1 Mar 4th 2015

racktables

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with racktables
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This Puppet module installs RackTables, along with Apache, PHP, MySQL.

Module Description

RackTables is nifty and robust solution for datacenter and server room asset management. It helps document hardware assets, network addresses, space in racks, networks configuration and much much more.

Use this module to install a new instance of RackTables. The module will also install Apache, PHP, MySQL and some other dependencies for RackTables (php packages mostly).

WARNING: Use this module on NEW servers! Existing databases, webserver configs and RackTables installations will be replaced or purged.

Setup

What racktables affects

  • Apache - Any existing config will be replaced or purged.
  • MySQL - Existing databases and settings might be replaced.
  • RackTables - Existing RackTable files might be replaced

Beginning with RackTables module

To install RackTables version 0.20.10 with the default parameters:

   class { '::racktables':
     vhost   => 'racktables.example.com',
     release => 'RackTables-0.20.10',
   }

As soon as Puppet is done installing, go to vhost address and append ?module=installer to the vhost URL (Example URL: https://racktables.example.com/?module=installer). From there follow the RackTables installation steps (7 in total).

Default database settings are:

  • database: racktables_db
  • username: racktables_user
  • password: racktables_pass

These values can be changed by adding parameters 'mysqldb', 'mysqluser' and 'mysqluserpw' to the ::racktables class (See more examples).

Handling the permissions of secret.php at installation step 3 and 4 of can be assisted by Puppet. Use an attribute named 'secretfile' on the ::racktables class and set it to "writable" on step 3 and "readonly" on step 4. Remember to run "puppet agent -t" on the target server after each of these steps.

Examples

Set a root password for your mysql installation (default password is "strongpassword" if undefined):

   class { '::racktables':
     vhost       => 'racktables.example.com',
     release     => 'RackTables-0.20.10', 
     mysqlrootpw => 'newstrongpassword',
   }

Proper installation with recommended parameters:

   class { '::racktables':
     vhost       => 'racktables.example.com',
     release     => 'RackTables-0.20.10',
     mysqlrootpw => 'make_a_strong_password',
     mysqldb     => 'racktables',
     mysqluser   => 'racktables',
     mysqluserpw => 'make_another_strong_password',
     mysqlhost   => 'localhost',
   }

When installation is complete, dont forget to set the attribute 'secretfile' to "readonly". You can also remove the 'mysqlrootpw' attribute, as it is now stored in /root/.my.cnf on the target server.

In other words, after installation is done your class should look like this:

   class { '::racktables':
     vhost       => 'racktables.example.com',
     release     => 'RackTables-0.20.10',
     mysqldb     => 'racktables',
     mysqluser   => 'racktables',
     mysqluserpw => 'make_another_strong_password',
     mysqlhost   => 'localhost',
     secretfile  => 'readonly',
   }

Usage

###Classes and Defined Types

####Class: racktables

#####secretfile

Sets permissions to the inc/secret.php file for apache during setup. Set this attribute to "writable" while installing racktables and "readonly" after installation step 4. Setting this attibute to "absent" removes the file. Defaults to "undef", which results in permissions not being modified.

#####vhost

The virtual host address to use for your racktables installation. Requires a valid DNS entry. Defaults to 'racktables.example.com'.

#####release

Selects what RackTables version to download. The version is pulled from https://github.com/RackTables/racktables/tree/REVISION (Revision = Git revision TAG). The RackTables project on GitHub has (so far) tagged every release with "RackTables-[version]". You can automatically upgrade the racktables version by modifying this attribute to a higher version number. Defaults to 'undef', which results in the default repo being downloaded. After first download, 'undef' setting will not modify local files even if the remote repo is updated.

#####mysqlrootpw

Sets the root password on MySQL. Defaults to 'strongpassword'.

#####mysqluser

Sets the mysql user for the racktables database. Defaults to 'racktables_user'.

#####mysqluserpw

Sets the password for the "mysqluser". Defaults to 'racktables_pass'.

#####mysqldb

Sets the name of the database for racktables. Defaults to 'racktables_db'.

#####mysqlhost

Sets the name of the database to connect to. Defaults to 'localhost'.

#####datadir

Specifies the installation path of RackTables. Defaults to '/usr/local/share/RackTables'.

#####apacheuser

Specifies the apache user. Used for setting permissions to inc/secret.php. Defaults to 'apache' for RedHat/CentOS and 'www-data' for Debian/Ubuntu.

#####vcsprovider

Defines what vcs system to use for downloading RackTables. Defaults to 'git'.

#####source

Path to RackTables source. Defaults to 'https://github.com/RackTables/racktables.git'.

Reference

###Classes

####Public Classes

  • racktables: Starts the module and calls racktables::apache, racktables::mysql and racktables::install
  • racktables::apache: Installs Apache and a spesified vhost
  • racktables::mysql: Installs MySQL and sets up an empty database
  • racktables::install: Pulls and installs RackTables from GitHub (or other specified source)

####Private Classes

  • racktables::params: Default parameters

Limitations

#####RHEL/CentOS 7

Should work, but has not been tested.

Development

###Contributing

Please use the issue tracker (https://github.com/sgnl05/sgnl05-racktables/issues) for any type of contribution.