add wesher + wireguard
continuous-integration/laminar-eldarion Build failed with exit code 123 after 4 seconds Details

with a huuuuuge hack
This commit is contained in:
Starbeamrainbowlabs 2022-03-21 03:11:06 +00:00
parent 4a0111d54c
commit 736458538b
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
4 changed files with 46 additions and 0 deletions

View File

@ -171,6 +171,14 @@ stage_end "$?";
# Pre-install tasks
#######################################
# From here on, *all* tasks must be COMPLETELY NONINTERACTIVE.
# If you have something you need to ask the user, it should have been asked
# above. The reason for this is that we do *not* want the user to be sitting
# around waiting for the next dialog box. They should have to wait only once,
# as this saves time.
step_current="2";
stage_begin "Executing pre-install tasks";
while read -r preinstall_step; do
#shellcheck disable=SC1090
@ -190,6 +198,8 @@ stage_end "$?" "1 or more pre-install tasks failed";
# Install packages
#######################################
step_current="3";
stage_begin "Installing apt packages";
apt-get install --no-install-recommends --yes "$(cat "${temp_dir}/apt-packages.txt")";
stage_end "$?" "Failed to install apt packages";
@ -206,6 +216,8 @@ stage_end "$?" "Failed to install apt packages";
# Post-install tasks
#######################################
step_current="4";
stage_begin "Running post-install tasks";
while read -r postinstall_step; do
#shellcheck disable=SC1090
@ -219,8 +231,14 @@ stage_begin "$?" "Failed to run 1 or more post-install tasks";
# Final steps
###
step_current="5";
source "steps-last/15-ufw.sh";
###############################################################################
step_current="done";
echo "
██████ ██████ ██████ ██ ██ ██ ███████ ██ ██████ ███ ██ ██ ███ ██ ██████

0
src/steps-config/100-apt-sbrl.sh Normal file → Executable file
View File

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
wesher_secret="$(ask_password "wesher configuration" "Enter the wesher shared secret:")";
wesher_join_ip="$(ask_text "wesher configuration" "Enter an IP of a host in the cluster to join:")";
queue_apt_install "raspberrypi-kernel-headers" "wireguard" "wesher" "wesher-systemd";
queue_postinstall_step "10-wesher.sh";

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
task_begin "Configuring wesher";
# HACK: Ref https://github.com/costela/wesher/issues/70
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;
killall wesher;
sleep 5;
task_end "$?";
task_begin "Starting wesher";
sudo systemctl enable --now wesher;
task_end "$?";