Gurp is an illumos configuration management tool.
Hosts are described in a thin Janet DSL.
(use ../globals)
(def smf-method-path (pathcat site-smf-method "minidlna.sh"))
(def smf-service "sysdef/multimedia/minidlna")
(def minidlna-conf
[:media_dir "A,/storage/flac"
:friendly_name (hostname)
:album_art_names "front.jpg"
:strict_dlna "no"
:notify_interval 900])
(host "minidlna-server"
(pkg/ensure "ooce/multimedia/minidlna")
(file/ensure smf-method-path
:mode "0755"
:from "minidlna/minidlna-method.sh")
(file/ensure "/etc/opt/ooce/minidlna/minidlna.conf"
:from-struct minidlna-conf
:to-format "k=v")
(svc/ensure smf-service :state "online")
(smf/ensure smf-service
:fmri smf-service
:description "MiniDLNA - DLNA/UPnP-AV media server"
(smf-method "start"
:exec smf-method-path
:user "minidlna"
:group "minidlna")
(smf-method "refresh"
:exec smf-method-path
:user "minidlna"
:group "minidlna")))If you want to know more:
- An introductory walkthrough of Gurp and Janet.
- Documentation for all the "doers" - the things that do the things.
- An overview of the built-in Janet helpers that make life easier.
- Examples of real configurations taken from my own systems and used in acceptance tests.
- A series of informal blog articles which talk about the design, development, use, successes, shortcomings, and future of Gurp.
-
Build it yourself:
$ git clone [email protected]:snltd/gurp.git && cd gurp $ CFLAGS=-std=c99 cargo install --path cli