From 0ea5c231be33b9360996a6749c363ef1bdcd6bd6 Mon Sep 17 00:00:00 2001 From: Amit Sagtani Date: Thu, 24 Oct 2024 14:54:14 +0200 Subject: [PATCH] add step to install required lib on host machine --- bin/autodeploy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/autodeploy.sh b/bin/autodeploy.sh index a1a155d41..4eb47c266 100755 --- a/bin/autodeploy.sh +++ b/bin/autodeploy.sh @@ -92,6 +92,7 @@ msg "" msg "INFO: starting Wire-in-a-box deployment for $TARGET_SYSTEM using artifact ID $ARTIFACT_HASH" msg "" + for SUBDOMAIN in $SUBDOMAINS; do if host "$SUBDOMAIN"."$TARGET_SYSTEM" >/dev/null 2>&1 ; then msg "INFO: DNS A record exists: $SUBDOMAIN.$TARGET_SYSTEM" @@ -107,6 +108,7 @@ else die "ERROR: Can't log into $TARGET_SYSTEM via SSH, please check SSH connectivity." fi + if curl --head --silent --fail https://s3-eu-west-1.amazonaws.com/public.wire.com/artifacts/wire-server-deploy-static-"$ARTIFACT_HASH".tgz >/dev/null 2>&1 ; then msg "INFO: Artifact exists https://s3-eu-west-1.amazonaws.com/public.wire.com/artifacts/wire-server-deploy-static-$ARTIFACT_HASH.tgz" else @@ -134,6 +136,11 @@ system_cleanup() { rm -f /home/$DEMO_USER/wire-server-deploy-static-*.tgz } +# Make sure the host machine is up to date and has all required packages installed +ssh -p "$SSH_PORT" "$SSH_USER"@webapp."$TARGET_SYSTEM" " + sudo apt update && sudo apt upgrade -y && sudo apt install -y aptitude apt-transport-https bind9-host curl debian-goodies dnsutils git dnsmasq less lsof net-tools rsyslog screen sudo vim wget whois docker.io telnet python3-lxml qemu qemu-kvm qemu-utils libvirt-clients libvirt-daemon-system virtinst bridge-utils +" + preprovision_hetzner() { msg "" msg "INFO: running local ansible playbook for inital server deployment." @@ -392,6 +399,7 @@ if [[ "$EXISTING_CONTAINERS" ]]; then DO_SYSTEM_CLEANUP=true fi + if [ "$DO_SYSTEM_CLEANUP" = false ]; then msg "" msg "INFO: Target system clean, no previous wire-server-deploy installation found."