Categories

Versions

Upgrade from 9.10.11 to 10.0.0

Preliminaries

获得更满意的结果,阅读这些useful pre-migration hints. In particular,

  1. if you have any data in a repository in AI Hub 9, you should first move it into a project, and
  2. any web service functionality should be deployed to a scoring agent.
  • Migration is not supported for Windows systems, only Linux.
  • The license is migrated from the.envfile and NOT from license files. If you set your license by uploading it to the tool or copying a file, please also paste it to the.envfile (SERVER_LICENSE).
  • Download migration-bundle.tar.gz-- it contains all the files needed to run the migration.

An important point to observe is you canrun the old stackeven after migration, because the data iscopied, not overwritten.

Instructions

By default, the migration process uses the compose standalonedocker-compose(notice the hyphen!). Newer docker installations containcomposeas a submodule and would normally replacedocker-composewith calls todocker compose(without a hyphen!). However, because the migration scriptmigration-orchestrator.shalsousesdocker-composeand you would otherwise have to rewrite the script, it is recommended that youinstall the standalonedocker-compose, as follows:

sudo curl -SL https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
  1. Create a backup of all of your data and stop your 9.10.11 AI HUB compose stack
  2. Extract the contents ofmigration-bundle.tar.gzinto the folder of your current stack, so the migration files are in the same folder as yourdocker-compose.ymland.envfiles
  3. In the original.envfile, please add a valid server license string to theSERVER_LICENSEvariable.
  4. Make sure to pull the images related to the migration:

    docker-compose -f docker-compose-migration.yaml --env-file .env-migration pull
  5. Runmigration-orchestrator.sh:

    bash migration-orchestrator.sh

    It executes the following main steps:

    • Creates a backup fromdocker-compose.ymland.env(docker-compose.yml.bakand.env-bak)
    • Compares yourdocker-compose.ymland.envfiles to the stock 9.10.11-gen2 versions
    • Migrates the values from the original.env和变量renamings
    • Migrates the Keycloak database
    • Migrates and updates Keycloak roles and clients (manual review still needed)
    • Runs AI HUB backend with migration enabled
    • Runs Job Agent with migration enabled (separate/additional Job Agent deployments should be handled manually)
    • Runs Scoring Agent with migration enabled
    • Migrates Grafana content (eg. dashboards, plugins)
    • Handles volume restructuring related to the new stack
    • Stops all services used during the migration process
  6. Pull the images for the new stack

    docker-compose pull
  7. Start the new stack with:

    docker-compose up -d deployment-init

    wait for this container to exit, then run:

    docker-compose up -d

    The new stack should be up and running and you should be able to log in with your original credentials.

Post migration instructions

It is always recommended to manually review the settings of the new stack as your old installation may contain customizations that the migration automation might skip. Some of these aspects can be found below (without being exhaustive).

老Keycloak客户

The old stack contained several Keycloak clients namedurn:rapidminer:(eg.urn:rapidminer:grafana). The new stack uses new client names without theurn:rapidminer:prefix (eg.grafana), however these clients are newly created next to the old ones, avoiding to disrupt customized client settings.

By default, the new AI HUB 10.0.0 does not use the old clients, therefore they can be manually deleted if not needed.

New Keycloak roles

The AI HUB 10.0.0 introduces some new realm roles in Keycloak (eg.aihub:admin) for access control. It is recommended to review the assignement of these roles to users and clients extensively after the migration.

The migration automation sets the following role assignements to users based on their existing effective roles:

  • administrator
    • Users with existing effectiveadministratorrole are givenaihub:admin,aihub:queues:create,aihub:projects:createandaihub:scheduleroles
  • analyst
    • Users with existing effectiveanalystrole are givenaihub:projects:createandaihub:scheduleroles

Using unsigned Grafana plugins

Starting from AI HUB 10.0.0 the stack uses the official Grafana image. The migration automation handles copying your existing dashboards and plugins from the old stack.

In case there are any plugins that are unsigned by Grafana in your setup, you shall set theGF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINSenvironment variable with the comma separated list of the unsigned plugins.

If you update/create this variable, make sure to includerapidminer-aihub-datasource

Running the old stack after a successful migration

The migration process does not alter any data in the old AI HUB stack, so it remains fully functional.

After a successful migration process, the old stack can be started with the following commands:

You should stop the new stack before trying to start the old stack after a successful migration.

docker-compose -f docker-compose-customer.yml --env-file .env-customer up -d rm-init-svc

You can follow the usual initialization process with

docker-compose -f docker-compose-customer.yml --env-file .env-customer logs -f rm-init-svc

After the following text is printed repeatedly to the screen, typically after 1-2 minutes:

[License initialization] Waiting for RapidMiner Server startup in order to install the license...

Start the whole old stack with

docker-compose -f docker-compose-customer.yml --env-file .env-customer up -d

Reset

In case of something goes wrong, here are some useful commands to reset the state.

Stop all migration related services

docker-compose -f docker-compose-migration.yaml --env-file .env-migration down

Restore files from backup

cp .env-bak .env && mv docker-compose.yml.bak docker-compose.yml

Delete migration related files

rm .env-customer docker-compose-customer.yml \ docker-compose-9.10.11-gen2.yml \ docker-compose-aix.yml \ docker-compose-migration.yaml \ .env-9.10.11-gen2 \ .env-aix \ .env-bak \ .env-migration \ migration-orchestrator.sh \ docker-compose-ja-migration.yaml \ .env-ja-migration

If the migration stack is started from an inconsistent state (some errors occured earlier and the folder was not cleaned properly), a.env-aixfoldermay be present. It should be deleted.

Delete new, AI HUB 10 related volumes

docker volume rm $(basename $PWD)_aihub-db-vol \ $(basename $PWD)_aihub-home-vol \ $(basename $PWD)_job-agent-vol \ $(basename $PWD)_keycloak-db-vol \ $(basename $PWD)_scoring-agent-vol \ $(basename $PWD)_grafana-home-vol \ $(basename $PWD)_keycloak-kcadm-vol