Page History
Div | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
If you have a running Scheer PAS API Management installation and want to update, please do the following steps:. If you experience problems during the update, refer to Troubleshooting the API Management Installation.
Step 1: Backup Your Current Installation
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
Step 2: Download and Extract the Software
- Download the new API Management software.
- Download the new API Management software.
Shut down your API Management.
To do this, run the following command:Code Block docker-compose down
Tip The docker-compose.yml can be found in the following folder:
API Managment 7.3.0 api-mgmt\single-host-setup\
API Managment before 7.3.0 api-mgmt\
Backup your API Management data as described on API Management Administration > Export/Import Data.
Also backup the MySQL database and Elasticsearch. To do this, use the following commands:Code Block docker-compose run --no-deps --rm -v $(pwd):/backup --entrypoint 'tar cvf /backup/mysql_data.tar /var/lib/mysql' mysql
Code Block docker-compose run -uroot --no-deps --rm -v $(pwd):/backup --entrypoint 'tar cvf /backup/es_data.tar /usr/share/elasticsearch/data' elasticsearch
Move the backup files to a safe location.
- Rename folder api-mgmt your API Management installation resides in to e.g. api-mgmt_backup. This backups your current installation that will otherwise be overwritten by the update.
Unzip the downloaded software from api-mgmt-<version>.zip. This creates a new folder api-mgmt containing the new version of API Management.
Step 3: Configure the Installation Settings
Rework the configuration files.
If there are new configuration variables coming with the new software release (see API MANAGEMENT Release Notes), you need to merge the .env file of your installation (the one you have backup-ed in step 4) with the new one coming with the update.
Info As you have already an administrator account for your API Management installation, you can comment out the following lines in your .env file:
# KEYCLOAK_ADMIN_USERNAME=username
# KEYCLOAK_ADMIN_PASSWORD=password
- If you did not stick to the standard installation and have made changes to the docker-compose.yml, you need to merge those changes into the new docker-compose.yml.
- Copy all certificates and keystores from the backup folder of your old installation (api-mgmt_backup/configs) to your updated installation (api-mgmt/configs). Overwrite the existing files from the target folder - they are example files only.
Step 4: Update the Software
Load the new software with
Multiexcerpt include MultiExcerptName load_docker_images PageWithExcerpt INTERNAL:_api_excerpts Upgrade the MySQL database using the following commands:
Code Block docker-compose up -d mysql
Code Block docker exec -it mysql bash
Code Block mysql_upgrade --password
Info If you are asked for a password, use the password you specified in the .env file for
MYSQL_ROOT_PASSWORD
.Code Block exit
Code Block docker-compose stop
Step 5: Start all Services and Finalize the Update
Multiexcerpt include MultiExcerptName start_all_containers PageWithExcerpt INTERNAL:_api_excerpts - Upload new configurations.
If the new API Management software comes with new configurations (e.g. new policies, see API MANAGEMENT Release Notes), you need to import them to your installation. Import the file(s) as described on API Management Administration > Export/Import Data. After a successful update you may want to remove the old images to free up some disk space. In this case, just run
Code Block docker image rm api-mgmt/NAME-VERSION
For more clean up instructions refer to the docker documentation.
Tip Also consider removing the backup files from step 3 as they consume a considerable amount of disk space.