## Experiences with Drist

"How rewriting and pushing helped me save time."

Ivan J. <[email protected]>


## Drist

* Tool for configuration deployment
* Simple to understand and much smaller than alternatives


## Alternatives

* Ansible
* Puppet
* $hipstertool
* slack


## slack

* https://packages.debian.org/sid/slack
* Much simpler than other alternatives
* Similar to drist, but:
 * Uses a pull method which requires a lot more configuration


## Drist methodology

1. Write simple modules
2. Push to servers


## Layout

├── Makefile
├── named
├── nginx
├── qemus
├── scripts
└── ssl


## A simple drist module

qemus
├── config.mk
├── files-alderaan
│   └── etc
│       └── conf.d
│           ├── qemu.ftwhr
│           ├── qemu.jakku
│           └── qemu.nextcloud
├── files-dantooine
│   └── etc
│       └── conf.d
│           └── qemu.debian-print-server
├── Makefile -> ../Makefile
└── script


## A less simple drist module

├── certbot
│   ├── config
│   │   ├── accounts
│   │   ├── csr
│   │   ├── keys
│   │   ├── live
│   │   └── renewal-hooks
│   ├── credentials.ini
│   └── work
├── config.mk
├── files-alderaan
│   └── etc
│       └── ssl
├── files-jakku
│   └── etc
│       └── ssl
├── Makefile -> ../Makefile
├── newcert.sh
├── renew.sh
├── script-alderaan
└── script-jakku


## Configuration

Makefile:

   include config.mk

   all: $(SERVERS)

   $(SERVERS):
       drist -p $@

config.mk:

   SERVERS = root@dantooine \
             root@alderaan

The script takes care of any service restarting and/or
file permissions and ownership


## Usage

* Writing a new module is as simple as:

   $ mkdir -p module/files && cd module
   $ ln -s ../Makefile
   $ echo 'SERVERS = root@tatooine' > config.mk
   $ echo 'Drist rocks' > files/index.gph


## Usage

* Deploying is as simple as:

   $ time make -j4
   [cut output]
   make -j4  0.07s user 0.06s system 14% cpu 0.915 total


## Fin

Thank you Solene!