Upgrading Likpi CMDB

To ensure a smooth transition between versions, enterprise upgrades should be performed during a scheduled maintenance window. The standard upgrade process consists of three main steps: updating the database schema, replacing the Java backend service, and updating the compiled frontend application.

Step 1: Preparation and Backup

Before initiating any upgrade, you must safely stop the application and back up your critical data.

  1. Stop the backend service to prevent partial database writes:

    $ sudo systemctl stop cmdb-backend
    
  2. Perform a full backup of your PostgreSQL database using pg_dump (refer to the Database Backup section in the Operations Runbook).

Step 2: Database Schema & Data Updates (Optional)

Depending on the release notes of the new version, you may need to apply database schema changes or update out-of-the-box system data (e.g., new default CI classes or triggers).

  1. Locate the provided SQL migration scripts (e.g., 03-update-schema.sql) in your new release package.

  2. Execute the scripts against your PostgreSQL database:

    $ sudo -u postgres psql -d cmdb -f /path/to/new-release/03-update-schema.sql
    

Note

If the release notes do not mention any required database migrations for the target version, you can skip this step.

Step 3: Update the Backend Service

Replace the existing Java Vert.x application fat JAR with the latest release.

  1. Backup your existing config.json to a safe location.

  2. Remove the old fat JAR and replace it with the new version:

    $ sudo rm /opt/likpi/cmdb-backend/cmdb-app-*.jar
    $ sudo cp /path/to/new-release/cmdb-app-latest-fat.jar /opt/likpi/cmdb-backend/
    $ sudo chown likpiadm:likpi /opt/likpi/cmdb-backend/cmdb-app-latest-fat.jar
    
  3. Ensure your config.json is restored and properly configured for the new version.

Step 4: Update the Frontend Application

Replace the compiled React Single Page Application (SPA) served by your Nginx web server.

  1. Clear the old frontend directory:

    $ sudo rm -rf /opt/likpi/cmdb-frontend/html/*
    
  2. Extract the new frontend build into the web directory:

    $ sudo unzip /path/to/new-release/cmdb-frontend-build.zip -d /opt/likpi/cmdb-frontend/html/
    $ sudo chown -R likpiadm:likpi /opt/likpi/cmdb-frontend/html/
    

Step 5: Restart and Verify

Bring the application back online and verify the system health.

  1. Start the backend service:

    $ sudo systemctl start cmdb-backend
    
  2. Check the service logs to ensure it started successfully without database connection errors or Hazelcast mesh issues:

    $ sudo journalctl -u cmdb-backend -f
    
  3. Clear your browser cache and log into the Likpi CMDB web portal to verify the new version deployment.