Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stackit: deploy wire-server #745

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
temp: disable tf destroy to debug cassandra
amitsagtani97 committed Nov 19, 2024
commit 7a60f81b40720ab726e41ec105b6c9f28cfb2202
10 changes: 5 additions & 5 deletions .github/workflows/offline.yml
Original file line number Diff line number Diff line change
@@ -63,10 +63,10 @@ jobs:
env:
HCLOUD_TOKEN: '${{ secrets.HCLOUD_TOKEN }}'

- name: Clean up hetzner environment; just in case
if: always()
run: (cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform init && terraform destroy -auto-approve)
env:
HCLOUD_TOKEN: '${{ secrets.HCLOUD_TOKEN }}'
# - name: Clean up hetzner environment; just in case
# if: always()
# run: (cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform init && terraform destroy -auto-approve)
# env:
# HCLOUD_TOKEN: '${{ secrets.HCLOUD_TOKEN }}'


12 changes: 7 additions & 5 deletions offline/cd.sh
Original file line number Diff line number Diff line change
@@ -2,16 +2,18 @@

set -euo pipefail

function cleanup {
(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform destroy -auto-approve)
echo done
}
trap cleanup EXIT
# function cleanup {
# (cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform destroy -auto-approve)
# echo done
# }
# trap cleanup EXIT
(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform init ; terraform apply -auto-approve )
adminhost=$(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform output adminhost)
adminhost="${adminhost//\"/}" # remove extra quotes around the returned string
ssh_private_key=$(cd terraform/examples/wire-server-deploy-offline-hetzner ; terraform output ssh_private_key)

echo "adminhost: $adminhost"
echo "$ssh_private_key"
eval `ssh-agent`
ssh-add - <<< "$ssh_private_key"