Author: Derek Leung
Product version: 2023.1
Need
Semarchy xDM does not support the direct import of an xDM Model from an older major version, e.g. it’s not possible to import an 2023.1.x xDM model into xDM 2024.1.x. This document provides a streamlined workaround to efficiently upgrade an xDM Model from an older version to a newer version by utilizing Docker deployment, thereby significantly reducing installation time. The example outlined here demonstrates an upgrade from version 5.3 to 2023.1, but the approach is applicable to any version upgrade scenario.
Detailed Solution
- Install Docker Desktop on Windows (https://docs.docker.com/desktop/install/windows-install/ )
- Create a folder say “C:\Docker\xdm”.
- Download Semarchy xDM Tutorial Resources (https://github.com/semarchy/xdm-tutorials/archive/master.zip)
- Inside the tutorial resources, copy “quick-install/docker/docker-compose.yml” and “quick-install/docker/create-schemas.sql” to “C:\Docker\xdm”
- Edit the file “C:\Docker\xdm\docker-compose.yml”
In the “semarchy-appserver” section, comment out the original image line, add another line to state that you want 5.3.19 as the xdm versionsemarchy-appserver: # image: semarchy/xdm:2023.1 image: semarchy/xdm:5.3.19
In the “semarchy-database” section, I did a similar thing by commenting out the original image line, add another line to state that I want postgres 12 as the database version
semarchy-database: # image: postgres:14 image: postgres:12
- Open command prompt, navigate to “C:\Docker\xdm”, run the command “docker compose up”
It reads the “docker-compose.yml” in the current directory, download the xdm and postgres images, and start 2 containers for the app-server and database server.
- Open the Docker Desktop, go to “Containers”, you should see 2 server instances are running
- Open browser, go to http://localhost:8088/semarchy/login.do , enter the token “mySecretValue”
- Accept the Term
- Enter Administrator password
- xDM 5.3 is installed
- After you sign in, it will be like this
- Create a database schema for your data location to be upgraded in DBeaver.
- Create Datasource in xDM
- Import the 5.3 Model in Application Builder, Validate the Model, fix as much error as you can
- Deploy the 5.3 Model to Data Location
- You should see your deployed application in xDM
- You should also see tables created in the Data Location in DBeaver
- Use DBeaver to restore database content if needed
- Stop the Containers
- Delete the container “semarchy-appserver-1”
- Edit the file “C:\Docker\xdm\docker-compose.yml”
In the “semarchy-appserver” section, swap the image lines, state that you want 2023.1 as the xdm version
semarchy-appserver: image: semarchy/xdm:2023.1 # image: semarchy/xdm:5.3.19
- Open command prompt, navigator to “C:\Docker\xdm”, run the command “docker compose up”
Then you should see Semarchy-appserver-1 becomes 2023.1 - Open browser, go to http://localhost:8088/semarchy/login.do, after you login, you should see Semarchy xDM Upgrade page, click UPGRADE INSTANCE
- Next it will ask you to perform Data Location Upgrade. Make sure your Model passes all the validation you should be able to upgrade the data location!
Reference : https://www.semarchy.com/tutorials-content/quick-install-docker/#0