.. title:: Multi Server Upgrade Multi Server Upgrade ================================ * Stop all Kasm Services on all Servers .. code-block:: Bash sudo /opt/kasm/bin/stop Upgrade Database Server Role ------------------------------- Create a Database Backup * Stop existing Kasm Services .. code-block:: Bash sudo /opt/kasm/bin/stop * Download and extract the new installation media .. code-block:: Bash cd /tmp/ curl -O tar -xf kasm_release_*.tar.gz * Execute the included database backup utility .. parsed-literal:: sudo bash /tmp/kasm_release/bin/utils/db_backup -f /tmp/kasm_db_backup.tar -p /opt/kasm/|previous_release|/ * Get the existing database password for use in the subsequent commands. .. parsed-literal:: sudo grep " password" /opt/kasm/|previous_release|/conf/app/api.app.config.yaml **Perform a clean install** Perform a clean install of the Database Role Services * Install kasm from the release media downloaded in the prior steps. .. code-block:: Bash sudo bash kasm_release/install.sh -S db -D -Q Restore and upgrade the database --------------------------------- Restore and update the database from the prior version * Ensure all Kasm services are stopped .. code-block:: Bash sudo /opt/kasm/bin/stop * Execute the database restore command .. parsed-literal:: sudo /opt/kasm/|release|/bin/utils/db_restore -f /tmp/kasm_db_backup.tar -p /opt/kasm/|release|/ * Perform an upgrade of the database schema .. parsed-literal:: sudo /opt/kasm/|release|/bin/utils/db_upgrade -p /opt/kasm/|release| * **Advanced**: Review the contents of the existing configs to ensure any custom docker settings are migrated to the new configuration. .. parsed-literal:: diff /opt/kasm/|previous_release|/docker/docker-compose.yaml /opt/kasm/|release|/docker/docker-compose.yaml * Install Kasm |release| Default Images .. parsed-literal:: sudo /opt/kasm/|release|/bin/utils/db_init -s /opt/kasm/|release|/conf/database/seed_data/default_images.yaml * Start the Kasm services .. code-block:: Bash sudo /opt/kasm/bin/start Upgrade Web App Server Role ------------------------------- * Stop existing Kasm Services .. code-block:: Bash sudo /opt/kasm/bin/stop * Download and extract the new installation media .. code-block:: Bash cd /tmp/ curl -O tar -xf kasm_release_*.tar.gz * Install kasm from the release media downloaded in the prior steps. .. code-block:: Bash sudo bash kasm_release/install.sh -S app -D -q -Q -R [REDIS_PASSWORD] * Copy **manager_id** and **server_hostname** from the old configuration into the new .. parsed-literal:: grep manager_id /opt/kasm/|previous_release|/conf/app/api.app.config.yaml grep server_hostname /opt/kasm/|previous_release|/conf/app/api.app.config.yaml sudo vi /opt/kasm/|release|/conf/app/api.app.config.yaml * **Advanced**: Review the contents of the existing configs to ensure any custom docker settings are migrated to the new configuration. .. parsed-literal:: diff /opt/kasm/|previous_release|/docker/docker-compose.yaml /opt/kasm/|release|/docker/docker-compose.yaml * Start the Kasm services .. code-block:: Bash sudo /opt/kasm/bin/start Upgrade Agent Server Role -------------------------- * Ensure all Kasm services are stopped .. code-block:: Bash sudo /opt/kasm/bin/stop * Download and extract the new installation media .. code-block:: Bash cd /tmp/ curl -O tar -xf kasm_release_*.tar.gz * Get the existing manager token for use in the subsequent commands. .. parsed-literal:: sudo grep "token" /opt/kasm/|previous_release|/conf/app/agent.app.config.yaml * Install kasm from the release media downloaded in the prior steps. .. code-block:: Bash sudo bash kasm_release/install.sh -S agent -D -p -m -M * Copy the server_id and the public_hostname properties from the old agent to the new .. parsed-literal:: grep server_id /opt/kasm/|previous_release|/conf/app/agent.app.config.yaml grep public_hostname /opt/kasm/|previous_release|/conf/app/agent.app.config.yaml sudo vi /opt/kasm/|release|/conf/app/agent.app.config.yaml * Copy the auto-generated nginx configs for any Kasms that may exists on the Agent .. parsed-literal:: sudo cp /opt/kasm/|previous_release|/conf/nginx/containers.d/* /opt/kasm/|release|/conf/nginx/containers.d/ * **Advanced**: Review the contents of the existing configs to ensure any custom docker settings are migrated to the new configuration. .. parsed-literal:: diff /opt/kasm/|previous_release|/docker/docker-compose.yaml /opt/kasm/|release|/docker/docker-compose.yaml diff /opt/kasm/|previous_release|/conf/app/agent.app.config.yaml /opt/kasm/|release|/conf/app/agent.app.config.yaml * Start the Kasm services .. code-block:: Bash sudo /opt/kasm/bin/start * Verify the Agent Service is properly checking in the the Management Service .. code-block:: Bash sudo tail -f /opt/kasm/current/log/agent.log | grep "Successfully processed heartbeat\|Sending manager request" .. include:: upgrade_images.rst :start-line: 2