wesher: make optional
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 3 seconds

This commit is contained in:
Starbeamrainbowlabs 2022-08-06 20:10:07 +01:00
parent db885cbfbb
commit ae586d1b22
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 29 additions and 15 deletions

View file

@ -165,12 +165,20 @@ step_current="1";
stage_begin "Configuring software choices";
source ./steps-config/5-locale.sh;
source ./steps-config/10-hostname.sh;
if ask_yesno "Use apt-cacher-ng server?"; then
source ./steps-config/10-apt-cache.sh;
fi
source ./steps-config/15-nfs.sh;
source ./steps-config/20-docker.sh;
source ./steps-config/50-avahi-daemon.sh;
if ask_yesno "Install and configure wesher mesh wireguard VPN?"; then
source ./steps-config/50-wesher-wireguard.sh;
fi
if ask_yesno "Add Laminar CI SSH public key to root authorized_keys?"; then
source ./steps-config/80-laminar-ssh.sh;

View file

@ -1,26 +1,32 @@
#!/usr/bin/env bash
task_begin "Configuring wesher";
cp "./configs/wesher.logrotate" "/etc/logrotate.d/wesher";
chown root:root "/etc/logrotate.d/wesher";
task_end "$?";
if [[ -n "${wesher_secret}" ]]; then
task_begin "Configuring wesher";
cp "./configs/wesher.logrotate" "/etc/logrotate.d/wesher";
chown root:root "/etc/logrotate.d/wesher";
task_begin "wesher: joining cluster"
task_end "$?";
# HACK: Ref https://github.com/costela/wesher/issues/70
#shellcheck disable=SC2154
WESHER_CLUSTER_KEY="${wesher_secret}" wesher /usr/local/sbin/wesher --overlay-net 172.31.250.0/16 --log-level info --join "${wesher_join_ip}" &
task_begin "wesher: joining cluster"
sleep 5;
killall wesher;
sleep 5;
# HACK: Ref https://github.com/costela/wesher/issues/70
#shellcheck disable=SC2154
WESHER_CLUSTER_KEY="${wesher_secret}" wesher /usr/local/sbin/wesher --overlay-net 172.31.250.0/16 --log-level info --join "${wesher_join_ip}" &
task_end "$?";
sleep 5;
killall wesher;
sleep 5;
task_begin "Starting wesher";
task_end "$?";
sudo systemctl enable --now wesher;
task_begin "Starting wesher";
task_end "$?";
sudo systemctl enable --now wesher;
task_end "$?";
else
task_begin "Not configuring wesher: not requested by user";
task_end 0;
fi