Forge Home

floaty

Puppet tasks and functions for using vmfloaty

6,037 downloads

5,815 latest version

4.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.1.2 (latest)
  • 0.1.1
  • 0.1.0
released Mar 28th 2018
This version is compatible with:
    Tasks:
    • get

    Start using this module

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

    Add this module to your Puppetfile:

    mod 'nlew-floaty', '0.1.2'
    Learn more about managing modules with a Puppetfile

    Add this module to your Bolt project:

    bolt module add nlew-floaty
    Learn more about using this module with an existing project

    Manually install this module globally with Puppet module tool:

    puppet module install nlew-floaty --version 0.1.2

    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

    nlew/floaty — version 0.1.2 Mar 28th 2018

    floaty

    Table of Contents

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

    Description

    This module provides Puppet tasks and functions that use vmfloaty to interact with Puppet's vmpooler application.

    Setup

    Currently, this module requires that the vmfloaty gem is installed on the target node and that any necessary configuration is present in ~/.vmfloaty.yml:

    url: https://vmpooler.example.com
    token: '<vmpooler_api_token>'
    

    Usage

    The simplest way to test out the module is to run it against localhost with Bolt:

    $ bolt task run floaty::get platform=centos-7-x86_64 count=2 --nodes localhost
    Started on localhost...
    Finished on localhost:
      {
        "nodes": [
          "t8vhnjwomf59htp.example.com",
          "ft0jdxrgv899r0r.example.com"
        ]
      }
    Successful on 1 node: localhost
    Ran on 1 node in 0.52 seconds
    

    Reference

    Tasks

    floaty::get

    This task retrieve a set of nodes from vmpooler.

    Parameters

    platform : Which VM pool to retrieve nodes from (ie. centos-7-x86_64)
    count : How many nodes to retrieve (defaults to 1 if not specified)

    Output

    On success, the result will contain a nodes key, which is an array of the retrieved nodes. On failure, the result will contain an _error key describing the problem.

    Functions

    floaty::get(platform, count)

    This function retrieves a node or list of nodes from vmpooler by running floaty locally.

    Parameters

    platform : Which VM pool to retrieve nodes from (ie. centos-7-x86_64)
    count : How many nodes to retrieve (defaults to 1 if not specified)

    Value

    If one node was requested, the value is the name of node retrieved. If multiple nodes were requested, the value is an array of retrieved node names.

    Limitations

    This module is currently only intended to solve a very specific use case, so it's probably quite fragile in cases where floaty itself isn't set up properly.

    Currently, the floaty::get task only supports retrieving nodes from one pool at a time.

    Use with caution.

    Development

    Pull requests welcome!