small pixel drawing of a pufferfish zoa

README

                ?????????????????
                ?  what is dis  ?
                ?????????????????

  zoa is the best config management tool ever. it's the
  best because it's just written in posix shell & provides
  a few nice little VERY USEFUL helpers, but doesn't go out
  of its way to make you hate yourself.
  
  it's also very opinionated about layout - there's generally
  1 correct way to do most common things.
  
  zoa is intended for human-scale deployment, and generally
  works best if you're not trying to manage a crazy complicated
  fleet of systems between multiple teams. zoa is for small,
  tight-knit teams who want to keep it all in their heads.

               !!!!!!!!!!!!!!!!!!
               !   QUICKSTART   !
               !!!!!!!!!!!!!!!!!!

  - ~ - understand: there are three components - ~ -

  1: the utility
  2: the language
  3: the layout

         --- 1: the utility ---

  simply run the daemon on all of your systems. it's a simple binary (XXX: or
  shell script?) that can be installed trivially. it wants to run as root, and
  it should run on a cron schedule at whatever interval you want.

  install:
    wget -O  https://j3s.sh/zoa
    mv zoa /usr/local/sbin
    chmod +x /usr/local/sbin/zoa

  in order to run zoa, you name a repo and a branch:
    zoa https://git.cyberia.club/cyberia/layerze.ro.git main

  zoa will clone the repo+branch specified in your config (or attempt to
  fetch it, if it's already cloned) to /var/lib/zoa/<repo>/<branch>

  when zoa runs, it sets a few env vars for your usage:
    DISTRO="$(cat /etc/os-release | grep ^ID | cut -d = -f 2-)"

  then it simply executes.

  that's it, you've configured your server! set up a cronjob/systemd timer to
  run zoa on a schedule, if that's your thing. or just login and run it
  periodically. you could even have the first run set up a cronjob that runs it
  👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀

         --- 2: the language ---

  basically, you can write plain shell, and there are some helpers for 90% of
  what configuration management is about.

  helpers:
    # install package
    pkg 'htop'
    # place file
    
    # set permissions

         --- 3: the layout ---

  ah finally, how do i lay out my git repo? here's the canonical doc:

  files/
  funcs/
  hosts/

  you need at least hosts/ - everything else is optional
  hosts/ contains shell scripts that run on the host(s) specified - for example,
  if i run zoa from domechild.cyberia.club, and this file is present:

  hosts/domechild.cyberia.club

  then that is my entrypoint.

  funcs/ contains defs that are automatically available across all of your hosts &
  files.

  files/ contains text files (no big files or binaries pls) that you might be
  interested in placing on hosts.