- Description
- Setup - The basics of getting started with test_device
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
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.
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.
The puppetlabs-ruby_task_helper module should be installed
- Create a catalog with an appropriate number of
spinnerresources in it. - Set the
cpu_timeandwait_timeas appropriate for the devices you want to emulate. - Run
puppet deviceto execute those catalogs. - ???
- Profit!
The device_spin task can be executed from bolt by supplying an basic inventory file:
nameName of the device (no used by test_device)aliasAlias to use for the deviceconfigof which:transportAlwaysremote
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
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.
PRs on github always appreciated!