Installs and configures the randrust service




2,318 latest version

3.9 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Sep 30th 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
  • Debian

Start using this module


jarv/randrust — version 0.1.1 Sep 30th 2019


Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with randrust
  3. Usage - Configuration options and additional functionality
  4. Reference
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module
  7. Contributor's/Reference's


Puppet module for installing and configuring randrust a rust web app that returns a random base64 encoded string of a given length.

After the app is setup it will respond to requests at the endpoint /key/(int) where int is the plaintext length.

Only ubuntu 16.04, 18.04 and debian 9 are tested and supported currently.


What randrust affects


This module will work with the default settings so all that is needed is to include the randrust class.

include randrust

If you just want to test this repo out you can use this module as is to configure a local node with vagrant. See Developing section for more info.




OS support

  • Ubuntu 18.04
  • Ubuntu 16.04
  • Debian 9

Future Supported Parameters

The following parameters or are not usefull in practice currently. This will change if/when the randrust package adds support for them.

  • service_provider
  • service_name


This module uses kitchen terraform for testing. To set this up the following things need to be installed.

OSx Install Example

# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew cask install virtualbox
brew cask install vagrant
brew cask install ruby
gem install bundler

# Setup ruby path each time you need it
export PATH="/usr/local/opt/ruby/bin:$PATH

# Or add it to your profile and open a new terminal window
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

git clone https://github.com/RyanJarv/puppet-randrust.git

cd puppet-randrust

bundle install --path vendor/bundle

Unit tests

Runs on your local machine, faster then Test Kitchen or acceptance tests.


Test Kitchen

This converges and runs serverspec tests against a local VirtualBox VM.

Initial setup is slower then unit tests but subsequent runs are about the same.

Before any kitchen commands run make sure to run the following at least once.

bundle exec librarian-puppet install

List all nodes

bundle exec kitchen list
Instance                Driver   Provisioner  Verifier  Transport  Last Action    Last Error
base-ubuntu18-randrust  Vagrant  PuppetApply  Busser    Sftp       <Not Created>  <None>
base-ubuntu16-randrust  Vagrant  PuppetApply  Busser    Sftp       <Not Created>  <None>
base-debian-randrust    Vagrant  PuppetApply  Busser    Sftp       <Not Created>  <None>

Converge and run serverspec's against a specific node

This can be rerun as you make changes untill it succeeds.

bundle exec librarian-puppet install
bundle exec kitchen verify base-ubuntu18-randrust
-----> Starting Kitchen (v2.3.3)
-----> Creating <base-ubuntu18-randrust>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...

Once your done use bundle exec kitchen destroy to shutdown the VM's.

Acceptance tests

Will run the destroy/create/test/destroy process for all machines. Run this at least once before you make a PR.

bundle exec librarian-puppet install
bundle exec kitchen test

Afterwards if all nodes show as not created in bundle exec kitchen list then the run succeeded.

Generating REFERENCE.md

This uses (puppet-strings)[https://puppet.com/docs/puppet/5.5/puppet_strings.html#reference-4095] to create the reference file.

Files:                    4
Modules:                  0 (    0 undocumented)
Classes:                  0 (    0 undocumented)
Constants:                0 (    0 undocumented)
Attributes:               0 (    0 undocumented)
Methods:                  0 (    0 undocumented)
Puppet Defined Types:     0 (    0 undocumented)
Puppet Functions:         0 (    0 undocumented)
Puppet Data Types:        0 (    0 undocumented)
Puppet Data Type Aliases:     0 (    0 undocumented)
Puppet Tasks:             0 (    0 undocumented)
Puppet Types:             0 (    0 undocumented)
Puppet Providers:         0 (    0 undocumented)
Puppet Plans:             0 (    0 undocumented)
Puppet Classes:           4 (    0 undocumented)
 100.00% documented


Code used as reference for this module is listed here along with the license of the project.

The rest is written by RyanJarv and licensed under BSD-2