wesher: make optional
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 3 seconds
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 3 seconds
This commit is contained in:
parent
db885cbfbb
commit
ae586d1b22
2 changed files with 29 additions and 15 deletions
|
@ -165,12 +165,20 @@ step_current="1";
|
||||||
stage_begin "Configuring software choices";
|
stage_begin "Configuring software choices";
|
||||||
|
|
||||||
|
|
||||||
|
source ./steps-config/5-locale.sh;
|
||||||
source ./steps-config/10-hostname.sh;
|
source ./steps-config/10-hostname.sh;
|
||||||
|
|
||||||
if ask_yesno "Use apt-cacher-ng server?"; then
|
if ask_yesno "Use apt-cacher-ng server?"; then
|
||||||
source ./steps-config/10-apt-cache.sh;
|
source ./steps-config/10-apt-cache.sh;
|
||||||
fi
|
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
|
if ask_yesno "Add Laminar CI SSH public key to root authorized_keys?"; then
|
||||||
source ./steps-config/80-laminar-ssh.sh;
|
source ./steps-config/80-laminar-ssh.sh;
|
||||||
|
|
|
@ -1,26 +1,32 @@
|
||||||
#!/usr/bin/env bash
|
#!/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
|
task_begin "wesher: joining cluster"
|
||||||
#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}" &
|
|
||||||
|
|
||||||
sleep 5;
|
# HACK: Ref https://github.com/costela/wesher/issues/70
|
||||||
killall wesher;
|
#shellcheck disable=SC2154
|
||||||
sleep 5;
|
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
|
||||||
|
|
Loading…
Reference in a new issue