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


  1. Install Docker Desktop on Windows (https://docs.docker.com/desktop/install/windows-install/ )
  2. Create a folder say “C:\Docker\xdm”.        
  3. Download Semarchy xDM Tutorial Resources (https://github.com/semarchy/xdm-tutorials/archive/master.zip)
  4. Inside the tutorial resources, copy “quick-install/docker/docker-compose.yml” and “quick-install/docker/create-schemas.sql” to “C:\Docker\xdm”
    Graphical user interface, text, application

Description automatically generated
  5. 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 version

             semarchy-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

 

  1. Open command prompt, navigate to “C:\Docker\xdm”, run the command “docker compose up”

    Text

Description automatically generated

 

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.

  1. Open the Docker Desktop, go to “Containers”, you should see 2 server instances are running

    Graphical user interface, text, application, email

Description automatically generated
  2. Open browser, go to http://localhost:8088/semarchy/login.do , enter the token “mySecretValue”
    Graphical user interface, application, Word

Description automatically generated
  3. Accept the Term
    Graphical user interface, text, application

Description automatically generated
  4. Enter Administrator password
    Graphical user interface, text, application, email

Description automatically generated
  5. xDM 5.3 is installed

Graphical user interface, text, application

Description automatically generated

  1. After you sign in, it will be like this
    Graphical user interface, application, Word

Description automatically generated
  2. Create a database schema for your data location to be upgraded in DBeaver.
     
  3. Create Datasource in xDM
    Graphical user interface, text, application, email

Description automatically generated
  4. Import the 5.3 Model in Application Builder, Validate the Model, fix as much error as you can
    Graphical user interface, text, application, email

Description automatically generated
  5. Deploy the 5.3 Model to Data Location
    Graphical user interface, application, Word

Description automatically generated
  6. You should see your deployed application in xDM
    Timeline

Description automatically generated with medium confidence
  7. You should also see tables created in the Data Location in DBeaver
    Graphical user interface, application

Description automatically generated
  8. Use DBeaver to restore database content if needed
    Graphical user interface, text, application

Description automatically generated
  9. Stop the Containers
    Graphical user interface, text, application, email

Description automatically generated
  10. Delete the container “semarchy-appserver-1”

Graphical user interface, text, application, email

Description automatically generated

  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
  1. Open command prompt, navigator to “C:\Docker\xdm”, run the command “docker compose up”
    Text

Description automatically generated

    Then you should see Semarchy-appserver-1 becomes 2023.1Graphical user interface, text, application, email

Description automatically generated
  2. Open browser, go to http://localhost:8088/semarchy/login.do, after you login, you should see Semarchy xDM Upgrade page, click UPGRADE INSTANCE
    Graphical user interface, text, application

Description automatically generated
  3. 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!
    Graphical user interface

Description automatically generated with medium confidence

 

 

 

 

Reference : https://www.semarchy.com/tutorials-content/quick-install-docker/#0