Skip to content

Commit

Permalink
add step to install required lib on host machine
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsagtani97 committed Oct 24, 2024
1 parent 6c37877 commit 0ea5c23
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/autodeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 0ea5c23

Please sign in to comment.