Skip to content

Commit

Permalink
Add --migration-system option to migrate tool
Browse files Browse the repository at this point in the history
Allow to specify which runtime container should be used to
run the migration process
  • Loading branch information
schaefi committed Dec 4, 2024
1 parent 35e4c5d commit 19be019
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tools/migrate
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
#
set -e

# TODO: this location needs to be changed to an official place
# default migration system
MIGRATION_SYSTEM=registry.opensuse.org/home/marcus.schaefer/dms/containers_sle15/migration:latest

ARGUMENT_LIST=(
"debug"
"reboot"
"use-zypper-dup"
"product:"
"migration-system:"
)

# Functions
Expand All @@ -42,6 +43,10 @@ usage() {
echo " target repos to be setup before migration !"
echo " An eventually given --product option will be"
echo " ignored"
echo " --migration-system <URI>"
echo " Use the given migration container to run the"
echo " migration process. By default a SLE15 container"
echo " is used"
echo " --reboot"
echo " Reboot after successful upgrade"
echo " --debug"
Expand Down Expand Up @@ -126,6 +131,11 @@ while [[ $# -gt 0 ]]; do
shift 2
;;

--migration-system)
argMigrationSystem=$2
shift 2
;;

*)
break
;;
Expand All @@ -140,6 +150,10 @@ if [ "${argDebug}" ];then
echo "debug: true" >> /etc/sle-migration-service.yml
fi

if [ "${argMigrationSystem}" ];then
MIGRATION_SYSTEM="${argMigrationSystem}"
fi

if [ "${argProduct}" ];then
echo "migration_product: ${argProduct}" >> /etc/sle-migration-service.yml
fi
Expand Down

0 comments on commit 19be019

Please sign in to comment.