Forge Home

test_device

A test device to cheaply test remote targets with bolt and puppet

218,847 downloads

218,847 latest version

5.0 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

  • 1.0.0 (latest)
released May 8th 2019
This version is compatible with:
  • Puppet Enterprise 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, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • , , , , , ,
Tasks:
  • device_spin

Start using this module

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

Add this module to your Puppetfile:

mod 'puppetlabs-test_device', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-test_device --version 1.0.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

puppetlabs/test_device — version 1.0.0 May 8th 2019

test_device

Table of Contents

  1. Description
  2. Setup - The basics of getting started with test_device
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

This module contains a test device that only burns CPU and wall clock time to be used during performance testing. The two different knobs are intended to simulate connection and data processing overhead, as well as delays when waiting on a devices response.

Setup

Configure an arbitrary amount of devices using the spinner type in your device.conf. Inthe credentials you can configure extra wait times for fetching facts and retrieving resources as facts_cpu_time, facts_wait_time, get_cpu_time and get_wait_time. All times can be specified in fractional seconds.

Requirement for executing task

The puppetlabs-ruby_task_helper module should be installed

Usage

  • Create a catalog with an appropriate number of spinner resources in it.
  • Set the cpu_time and wait_time as appropriate for the devices you want to emulate.
  • Run puppet device to execute those catalogs.
  • ???
  • Profit!

Executing task

The device_spin task can be executed from bolt by supplying an basic inventory file:

  • name Name of the device (no used by test_device)
  • alias Alias to use for the device
  • config of which:
    • transport Always remote

For example:

nodes:
  - name: spinny.example.net
    alias: spinny
    config:
      transport: remote

Bolt executes the task with the following command:

bolt task run test_device::device_spin --nodes spinny --modulepath /etc/puppetlabs/code/environments/production/modules/ --inventoryfile ./inventory.yaml --param '{"cpu_time": 2, "wait_time": 3}'

Changing the param values of cpu_time and wait_time will affect the test_device as defined in device_spin.json

Limitations

Understanding the required cpu and wait times to emulate a realistic work load is left as an exercise to the reader, as this is dependent on the mix of devices you are running.

There are currently no known bugs.

Development

PRs on github always appreciated!