Skip to content

Latest commit

 

History

1,149 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Tests Janet Tests

Gurp

Gurp is an illumos configuration management tool.

Features

  • Configuration is described in a simple but powerful Lisp-like DSL.
  • illumos features like Zones, SMF, ZFS, Crossbow etc are first-class citizens.
  • Client/server mode, or standalone.
  • Single-binary deployment for client and server.
  • Fast -- client runs usually take under a second.
  • Efficient -- client and server typically use ~20Mb RSS.
  • Client and server OTEL metrics and logs.
  • No YAML.

Example

(import ../globals) # for common config

(def smf-method-path (pathcat globals/site-smf-method "minidlna.sh"))
(def smf-service "sysdef/multimedia/minidlna")

# Define application config as a structure, and trust Gurp to turn it into a
# file of the appropriate kind.
(def minidlna-conf
  [:media_dir "A,/storage/flac"
   :friendly_name (fact :hostname)
   :album_art_names "front.jpg"
   :strict_dlna "no"
   :notify_interval 900])

# Hosts can be made up of bare resources, or resources can be bundled into
# roles for composition.
(host "minidlna-server"
      (pkg/ensure "ooce/multimedia/minidlna")

      # Copy in files stored alongside configuration.
      (file/ensure smf-method-path
                   :mode "0755"
                   :from "minidlna/minidlna-method.sh")

      # Or generate files from data.
      (file/ensure "/etc/opt/ooce/minidlna/minidlna.conf"
                   :from-struct minidlna-conf
                   :to-format "k=v")

      (svc/ensure smf-service :state "online")

      # Even SMF manifests can be defined programmatically.
      (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:

Get Gurp

About

illumos config management via Rust and Janet

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages