rset(1) : pln(5)

Configure systems using using any scripting language

github/overview | download 0.9 | contribute

Features

Lightweight Execution start in < 0.5 second, task completion in as little as 0.9 seconds.
Real-time Status Standard output and error messages are piped in from target hosts without buffering.
Simple The standard tool chain can be mastered in 1 hour. All of the key operational paradigms are covered in the man pages ( rset(1), pln(5), rinstall(1), rsub(1) ).
Extensible Add capabilities by dropping scripts, executable, or data files into a directory that is shipped to each host.
Portable No dependencies for target BSD, Mac, and Linux machines; even Busybox on Alpine is enough.
Language Independent Shell scripts are most common, but any interpreter that can read on STDIN can be used (Ruby, Python, Perl, ...)
Secure Content visible to each host is explicitly specified in the routes file. Remote hosts can only request public data (source tarballs, packages, etc.)
Sequential All actions are executed in the exact order they were written. A dry-run feature makes it clear which hosts and labels will be executed.
Predictable Configuration and data are always located relative to the top-level routes file.

Formulas

Server Configuration
  Networking
  Adding and Modifying Users
  Let's Encrypt

Web Services
  WordPress | MediaWiki

Cloud Automation
  Digital Ocean | Amazon Web Services

Overview

rset(1) matches a host pattern in a routes file and sequentially executes script fragments on remote hosts

# routes.pln

execute_with=sudo
interpreter=/bin/bash

www1: mail/
    nginx.pln
www2: mail/
    nginx.pln

pln(5) is a tab-indented format somewhat like Makefiles for embedding scripting languages to be executed in the order they were written

# nginx.pln
interpreter=/bin/ksh -x

packages:
    pkg_add -I ruby
    ln -sf /usr/local/bin/{ruby25,ruby}
    ln -sf /usr/local/bin/{irb25,irb}

services:
    ./rinstall mail/smtpd_relay.conf /etc/mail/smtpd.conf \
        && rcctl restart smtpd

# vim:ts=4:syntax=sh

The minimal directory layout for the example above is

├── _rutils
│   ├── rinstall
│   └── rsub
├── _sources
├── mail
│   └── smtpd_relay.conf
├── nginx.pln
└── routes.pln

Targets are matched using regular expressions, hence this will run on both machines.

$ rset www

Last updated on December 07, 2018