Forge Home

randrust

Installs and configures the randrust service

3,453 downloads

3,007 latest version

3.9 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.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
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'jarv-randrust', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jarv-randrust
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jarv-randrust --version 0.1.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

Documentation

jarv/randrust — version 0.1.1 Sep 30th 2019

randrust

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

Description

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.

Setup

What randrust affects

Usage

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.

Reference

See REFERENCE

Limitations

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

Development

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.

./scripts/unit_tests.sh 

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.

 ./scripts/generate_references.sh 
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

Contributor's/Reference's

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