This Puppet contro-repo has various interesting integrations with Tiny Puppet, even if they are totally optional, we strongly recommend to give tp a try: it can save you a lot of time.
Integration with Tiny Puppet (tp) and tinydata modules (they are both present in the Puppetfile) is at different levels:
-
Several sample profiles of this
control-repousetp definesto manage the relevant applications -
Some (currently experimental) external modules use
tpin module, with local data -
It's possible to easily install any (known) app locally, via a
tp shellwrapper -
It's possible to quickly create data for new apps to manage
-
Integration tests comes out of the box free, for multiple apps and os, with
tp::test
The psick module contains standard profiles for different applications based on Tiny Puppet. They can be found in modules/psick/manifests/$application/tp. You are free to use them or not and they can be good examples on how to design profiles based on tp and save headaches and time on studying and integrating a dedicated component module.
Some experimental modules (apache v4.x, docker, rails, ansible...) added by default in the Puppetfile use tp directly in the module, with local tp data, to manage the component application.
For more info on this usage of tp inside component modules and other modern design patterns for modules, read this blog post.
Imagine a simple command, it expects as input the name of an application or a software and installs it. It takes care automatically of:
-
installing the eventual repositories that provide the package
-
use the right package name for the underlying operating systems
-
if it depends on other software or packages, install them as prerequisites
A command like install <software> that works everywhere, with any software that can be installed via a package.
Well, it exists. Here. But it's called tp_install.sh.
To install locally (you might need root privileges ) any application on any operating system, managing all the necessary dependencies, just write from the main dir of this control-repo:
bin/tp_install.sh <app_name>
Prerequisites for the magic to happen:
-
Puppet 4or later must be installed locally. To do it from thecontrol-repo:bin/puppet_install.sh [redhatX|debian|ubuntu] # WIP on automatic OS detection -
This
control-repois provisioned locally (that is it has runr10kto fetchtpandtinydatamodules from upstream source). You can do it with:bin/puppet_setup.shor, simply, have
tpinstalled via:puppet module install example42/tp -
There's in
tinydataall the needed data to install your application on your OS.
Some possible uses:
# Setup epel (on RHEL systems)
bin/tp_install.sh epel
# Install sysdig (automatically manages dependencies from other tp apps)
# Requires tp version >= 1.2 and tinydata version >= v0.0.14 )
bin/tp_install.sh sysdig
# Install puppetserver from Puppet official repos
bin/tp_install.sh puppetserver
# Install docker from Docker official repos
bin/tp_install.sh docker-engine
# Install virtualbox from Oracle official repos
bin/tp_install.sh virtualbox
# Install OpenJDK
bin/tp_install.sh openjdk-jdk
# Install apache for the lazy or mindless ones
bin/tp_install.sh apache
If some of these or other commands don't work for the selected app on your local operating system, then it's probably a matter of missing or wrong tinydata, which can be easily solved.
Current support for most of the applications in tinydata is for Linux (mostly RedHat and Debian derivatives). MacOS and Windows support is technically present, but data is missing for most of the cases. Support is possible for any OS for which there's a Puppet package provider.
Since tp knows everything (well, enough) about the applications it installs, it knows how to check if they are working correctly.
This can be effortlessly and automatically enabled by using tp::test for the applications you want to test (or by setting to true the test_enable argument when using tp::install).
In this control-repo tp testing is enabled by default on all tp installed applications with the following entry on hieradata/common.yaml which is used in manifests/site.pp:
---
tp::test_enable: true
TYou can test if tp installed applications are correctly running just by executing the scripts under /etc/tp/test on your servers.