cfgfoo

git clone https://orangeshoelaces.net/git/cfgfoo.git

0fee2627b49ad60843a72d98d720ddca095a3576

Author: Vasilii Kolobkov on 01/02/2019

Committer: Vasilii Kolobkov on 01/02/2019

Add README

Stats

README | 55 ++++++++
cfgfoo |  2 +-
2 files changed, 56 insertions(+), 1 deletion(-)

Patch

diff --git a/README b/README
new file mode 100644
index 0000000..8f26331
--- /dev/null
+++ b/README
@@ -0,0 +1,55 @@
+cfgfoo
+Copyright 2018, 2019 Vasilii Kolobkov
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version. 
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+
+cfgfoo is a simple configuration management recipe - write shell scripts
+to bring the system into a desired state, transfer and execute via ssh
+if necessary. Proved feasible for running a single server and believed
+to scale reasonably well up to a handful more.
+
+A quick primer:
+
+$ git clone https://orangeshoelaces.net/git/cfgfoo.git
+$ mkdir config
+$ cat > config/foo <<END
+listen on egress
+END
+$ cat > setup <<END
+#!/bin/sh
+set -e
+. ./cfgfoo/aliases
+
+fs_install {./config,/etc}/foo
+eddit_appendfln /etc/bar 'include "/etc/foo"'
+rc_start bazd
+END
+$ chmod 0700 setup
+$ cat > upload <<END
+tar chzf cfg.tgz cfgfoo config setup
+scp cfg.tgz 'root@example.net:~'
+rm cfg.tgz
+END
+$ chmod 0700 upload 
+$ cat > rsetup <<END
+#!/bin/sh
+ssh root@example.net 'nohup ~/setup'
+END
+$ ./upload && ./rsetup
+
+Configuration script comprise steps. Latter being made of two shell
+functions 'step_taken' and 'take_step' driven by a cfgfoo script. As the
+names suggest, they are to be idempotent. Steps for some basic operations
+are included and you can add your own easily.
diff --git a/cfgfoo b/cfgfoo
index 22adced..879734d 100755
--- a/cfgfoo
+++ b/cfgfoo
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # cfgfoo
-# Copyright 2018 Vasilii Kolobkov
+# Copyright 2018, 2019 Vasilii Kolobkov
 # 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by