Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Nov 28, 2023
1 parent 2bfb26f commit 9c0174d
Show file tree
Hide file tree
Showing 29 changed files with 3,324 additions and 323 deletions.
36 changes: 36 additions & 0 deletions bin/ops/configurator-migrate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

set -e

function echo_usage() {
echo "Usage:"
echo " $0 <namespace> <migration-name>"
}

if [ -z "$1" ]; then
echo "Missing Kubernetes namespace."
echo_usage
exit 1
fi

if [ -z "$2" ]; then
echo "Missing migration name."
echo_usage
exit 1
fi

NS="${1}"
MIGRATION_NAME="${2}"
RELEASE_NAME=phrasea
RELEASE_VERSION=1.0.0-rc1

echo "Migrating..."

helm -n ${NS} get values ${RELEASE_NAME} -o yaml > /tmp/.current-values.yaml

helm pull https://github.com/alchemy-fr/alchemy-helm-charts-repo/releases/download/phrasea-${RELEASE_VERSION}/phrasea-${RELEASE_VERSION}.tgz

echo "Executing migrations..."
helm -n ${NS} upgrade ${RELEASE_NAME} ./phrasea-1.0.0-rc1.tgz \
-f /tmp/.current-values.yaml \
--set "configurator.executeMigration=${MIGRATION_NAME}"
1 change: 1 addition & 0 deletions bin/ops/db/db.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

DATABASES="
auth
databox
expose
uploader
Expand Down
Loading

0 comments on commit 9c0174d

Please sign in to comment.