Skip to content

Commit

Permalink
Fix the deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Jun 21, 2024
1 parent c889e97 commit 8e27e2c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions deploy/cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ packages:
- ansible
- jq
- python3-openstackclient
- python3-pip
- python3.10-venv
- retry

write_files:
Expand Down
20 changes: 16 additions & 4 deletions deploy/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
#!/bin/sh
# Configure current host with ansible
# Expects as arguments the OAUTH_TOKEN, the COMMIT_SHA and the SLACK_WEBHOOK_URL

# Expects as arguments:
# - a GitHub OAUTH_TOKEN to update the PR
# - the COMMIT_SHA
# - a locker for fedcloud secret to obtain the secrets
# - the SHORT_SHA used for pulling the docker image to use
# - a SLACK_WEBHOOK_URL to report on the status
set -e

OAUTH_TOKEN="$1"
COMMIT_SHA="$2"
SHORT_SHA="$3"
SLACK_WEBHOOK_URL="$4"
FEDCLOUD_SECRET_LOCKER="$3"
SHORT_SHA="$4"
SLACK_WEBHOOK_URL="$5"

# create a virtual env for fedcloudclient
python3 -m venv $PWD/.venv
$PWD/.venv/bin/pip install fedcloudclient

$PWD/.venv/bin/fedcloud secret get --locker-token $FEDCLOUD_SECRET_LOCKER \
deploy data > secrets.yaml

echo "cloud_info_image: \"ghcr.io/egi-federation/fedcloud-cloud-info:sha-$SHORT_SHA\"" >>extra-vars.yaml

Expand Down

0 comments on commit 8e27e2c

Please sign in to comment.