Categories

Versions

Upgrade from 9.9.2 to 9.10.0

For RapidMiner AI Hub 9.10, ourDocker Imageshave been improved to meet the latest security guidelines, including those ofOpenShiftandRootless Docker.

To upgrade an existing system based on the older images, the permissions on the mounted filesystems must be changed so that the files are accessible to non-root users. Hence, we provide amigration script.

When upgrading RapidMiner AI Hub from a previous version to 9.10, please be aware of the following points.

  • You must upgrade fromRapidMiner AI Hub 9.9.2. If you are using an earlier version of RapidMiner AI Hub, you first need to upgrade to version 9.9.2.

  • Before you upgrade RapidMiner AI Hub, be sure to shut down your current environment and then make a backup. A complete backup consists of three parts:

    1. the complete contents of the folder containing the files.envanddocker-compose.yml. Note that Docker createsbind-mountsto thegoandsslsubfolders.

    2. the complete set ofnamed volumesreferenced by the filedocker-compose.yml. See the documentationBackup, restore, or migrate data volumeson the Docker website.

    3. any additional volumes spawned byJupyterHub, one per user, with names such asjupyterhub-user--.

  • 备份只会有一个一致的状态如果you first take RapidMiner AI Hub offline, by executingdocker-compose downon the host machine.
  • The backup tools must conserve Linux file system metadata (user and group information, permissions, etc.).

Upgrade

Rootless Docker was introduced in Docker Engine version 19.03 as anexperimental feature, and graduated from that status in version 20.10.

Hence, it is recommended that you use version >= 20.10 of the Docker Engine.

For details related to the operating system, see thedistribution-specific hints. Note that CentOS 6/7 are not supported, becauseunprivileged user namespaces are not supported in Linux kernel versions < 3.19.

Once you have created a backup for your existing RapidMiner AI Hub 9.9.2, as described above, you are ready to upgrade. The following steps take place in your current production environment, the folder containing.envanddocker-compose.yml.

  1. Download the upgrade scriptsand unzip.

  2. Copy the following files into your current production environment, the folder containing.envanddocker-compose.yml:

    docker-compose-gen2.yml env-gen2 upgrade-gen2.sh migration-compose.yaml ReadMe.md

    The filesdocker-compose-gen2.ymlandenv-gen2describe the new configuration, butenv-gen2does not yet include the values that are specific to your setup, e.g. for the variables markedCLIENT_SECRET, and contained in the old file.env. The fileReadMe.mdexplains how to manually merge.envandenv-gen2, but in most cases it will be simpler to run the shell script described in the next step, provided that you have not heavily modified the files provided by this website.

  3. Before you run theshell scriptto to migrate your values of the environment variables from the old.envfile to the new one,env-gen2, make sure that your.envanddocker-compose.ymlfiles have not been heavily modified. Ideally, your configuration is based on the templates provided by this website, usingprofilesto guide the choice of services. If you have added services todocker-compose.yml(e.g.StandPyorTabGo), you will need to add them also todocker-compose-gen2.yml.

    With these precautions in mind, run theshell script:

    sh upgrade-gen2.sh

    The script writes the modified values to the screen, and creates two patch files, so you have a record of the changes that will take place:

    upgrade-env.patch upgrade-yml.patch

    At this point, nothing has actually been changed, except thatenv-gen2has been updated with your values. As a check, you can compare the proposed changes with the instructions inReadMe.md. The next step initiates the upgrade.

  4. When you are satisfied that changes are correct, overwrite the original files, either by copying to them:

    cp env-gen2 .env cp docker-compose-gen2.yml docker-compose.yml

    or by patching them:

    patch .env upgrade-env.patch patch docker-compose.yml upgrade-yml.patch
  5. To satisfy the requirements ofnginxwithin the context of rootless Docker, you need to change the file ownership of thesslsubfolder:

    sudo chown -R 2011:0 ssl # as root user
  6. Run the upgrade /migration scriptto modify the file permissions on named volumes:

    docker-compose -f migration-compose.yaml up

    这个脚本应该没有运行warnings or errors. If you see any, make sure thatmigration-compose.yamlhas access to the same.envfile asdocker-compose.yml.

  7. Download the new images

    docker-compose pull
  8. Run RapidMiner AI Hub 9.10. The upgrade is complete!

    docker-compose up -d

upgrade-gen2.sh

#!/bin/bash # The old files correspond to version 9.9.2 of RapidMiner AI Hub # The new files correspond to version 9.10.0 of RapidMiner AI Hub old_yml_file="docker-compose.yml" new_yml_file="docker-compose-gen2.yml" old_env_file=".env" new_env_file="env-gen2" # Find values of the environment variables in the old files that differ from the new files # and copy them to the new files, excluding variables that should have new values, # such as those labelled VERSION / BACKEND / REGISTRY diff -u $old_env_file $new_env_file | grep ^-[^#-] | grep -v VERSION | grep -v BACKEND | grep -v REGISTRY | cut -c 2- | cut -d= -f1 | \ while read key; do if grep -q $key= $new_env_file; then replacement=$(grep ^${key}= $old_env_file | cut -d= -f2) echo "$key=$replacement" perl -pi -e "s@^$key=.*@$key=$replacement@" $new_env_file fi done # Create patch files diff -u $old_env_file $new_env_file > upgrade-env.patch diff -u $old_yml_file $new_yml_file > upgrade-yml.patch

migration-compose.yaml

version: "3.9" services: rm-migration-svc: image: "rapidminer/aihub-migration:9.10.0-gen2" container_name: "migration" #entrypoint: sh -c 'while true;do sleep 120;done' volumes: #RM PROXY & LE - ./ssl:/etc/nginx/ssl #KC PG #- keycloak-postgresql-vol:/var/lib/postgresql/data #RM-INIT - ./.env:/rm-init/rapidminer/.env - keycloak-admin-cli-vol:/rm-init/rapidminer/.keycloak/ - deployed-services-vol:/rm-init/rapidminer/deployed-services/ - ./go:/rm-init/go/ #RM PG SVC #- rm-postgresql-vol:/var/lib/postgresql/data #RM SERVER SVC - rm-server-bootstrap-vol:/aihub/bootstrap.d - rm-server-home-vol:/aihub/persistent-rapidminer-home #RM JA - rm-server-bootstrap-ja-vol:/ja/bootstrap.d - rm-server-ja-extensions:/ja/rapidminer-jobagent/home/resources/extensions:rw - rm-server-ja-log-vol:/ja/rapidminer-jobagent/home/log - rm-server-ja-data-vol:/ja/rapidminer-jobagent/home/data #PA - platform-admin-uploaded-vol:/pa/var/www/html/uploaded/ - rts-licenses-vol:/pa/var/www/html/uploaded/licenses/ #RTS - rts-deployments-vol:/rtsa/rapidminer-scoring-agent/home/deployments/ - rts-licenses-vol:/rtsa/rapidminer-scoring-agent/home/resources/licenses #JHUB DB #- jupyterhub-postgresql-vol:/var/lib/postgresql/data #CES - rm-coding-shared-vol:/ces/opt/coding-shared/ #GF - grafana-home:/var/lib/grafana #LandingPage - rm-landing-page-vol:/landingpage/var/www/html/uploaded/ - deployed-services-vol:/landingpage/rapidminer/deployed-services/ #TokenTool - rm-token-tool-vol:/tokentool/var/www/html/uploaded/ volumes: rm-postgresql-vol: rm-server-bootstrap-vol: rm-server-home-vol: rm-server-bootstrap-ja-vol: rm-server-ja-log-vol: rm-server-ja-data-vol: rm-server-ja-extensions: platform-admin-uploaded-vol: rts-deployments-vol: rts-licenses-vol: jupyterhub-postgresql-vol: grafana-home: keycloak-postgresql-vol: keycloak-admin-cli-vol: rm-landing-page-vol: rm-token-tool-vol: deployed-services-vol: rm-coding-shared-vol: name: ${JHUB_ENV_VOLUME_NAME} rapidminer_automodel_dbdata: rapidminer_automodel_shared: