summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-06-29 10:10:54 +0300
committerPaul Buetow <paul@buetow.org>2023-06-29 10:10:54 +0300
commit8c15c2ba64aafddcd413270781af57f2f94bf5ac (patch)
tree0ea684c37b575b9fdecb767a0c314425475b55a5 /frontends
parentfb53d7a9e7650fff1233de7301704c29c60d4699 (diff)
initial gorum support
Diffstat (limited to 'frontends')
-rw-r--r--frontends/Rexfile36
1 files changed, 36 insertions, 0 deletions
diff --git a/frontends/Rexfile b/frontends/Rexfile
index fadac13..3d7da95 100644
--- a/frontends/Rexfile
+++ b/frontends/Rexfile
@@ -458,6 +458,42 @@ task 'gogios', group => 'frontends',
run 'rm /tmp/gogios.cron';
};
+desc 'Installing Gorum binary';
+task 'gorum_install', group => 'frontends',
+ sub {
+ file '/usr/local/bin/gorum',
+ source => 'usr/local/bin/gorum',
+ mode => '0755';
+ owner => 'root',
+ group => 'root';
+ };
+
+desc 'Setup Gorum quorum system';
+task 'gorum', group => 'frontends',
+ sub {
+ my $gorum_path = '/usr/local/bin/gorum';
+
+ file '/etc/gorum.json',
+ content => template('./etc/gorum.json.tpl',
+ acme_hosts => \@acme_hosts),
+ owner => 'root',
+ group => 'wheel',
+ mode => '744';
+
+ file '/var/run/gorum',
+ ensure => 'directory',
+ owner => '_gorum',
+ group => '_gorum',
+ mode => '755';
+
+ unless (is_file($gorum_path)) {
+ Rex::Logger::info("gorum not installed to $gorum_path! Run task 'gorum_install'", 'error');
+ }
+
+ run 'adduser -group _gorum -batch _gorum', unless => 'id _gorum';
+ run 'usermod -d /var/run/gorum _gorum';
+ };
+
desc 'Setup IRC bouncer';
task 'ircbouncer', group => 'ircbouncer',
sub {