README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
????????????????? ? 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/ hosts/ libs/ 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. libs/ contains functions and vars that can be defined for particular hosts, or groups of hosts based on a special syntax files/ contains text files (no big files or binaries pls) that you might be interested in placing on hosts.