Top.Mail.Ru
Updating Operavix on Windows
CTRL+K

Updating Operavix on Windows

In this article
  • Updating Operavix on Windows
  • Creating a Backup of the ClickHouse Data
  • Operavix Service Mode
  • Performing a Rollback of the System

Follow these steps to update the system:

  1. On the server where the Operavix software is installed, stop the Operavix service to terminate the application.
  2. Create a backup of the %ProgramData%\Operavix\ directory.
  3. Create a backup of the %ProgramFiles%\Operavix\ directory.
  4. Create a backup of the ClickHouse system database server data. If there are other instances of the ClickHouse DBMS connected to Operavix, it is recommended to perform a backup for them as well.
  5. Configure the service mode of the Operavix system to prevent data reception from the monitoring agents and regular users logging in on the next system startup.
  6. Install the provided update file on the Windows server. Wait until the update is successfully installed.
  7. If an update involves installing multiple files, stop the Operavix service and install the next update in the sequence. Repeat this step if necessary.
  8. After installing all required update files, ensure that the system web interface is accessible and functional.
  9. Check the functionality of important dashboards.
  10. If everything operates properly, you can disable the service mode and make the system available to users and for receiving activity data from the monitoring agents.

If there are any issues with the update, perform the system rollback.

Creating a Backup of the ClickHouse Data

Follow these steps on the Linux server where the ClickHouse DBMS service is running:

  1. Stop the DBMS service. To do this, remove the Docker service:
    # docker service rm operavix-clickhouse`
    
  2. Initiate the creation of a backup of the DBMS data using the following command:
    # docker run -it --rm \
    --mount source=operavix-clickhouse,target=/clickhouse \
    -v /tmp:/target \
    operavix/operavix-clickhouse:22.8.3.13 \
    /bin/bash -c "tar -cvf /target/clickhouse-$(date -u +%d.%m.%Y).tar /clickhouse"
    
    Note
    • operavix/operavix-clickhouse:22.8.3.13 is the name of the Docker image with ClickHouse. It may vary depending on the version.
    • The backup is stored in the /tmp directory of the host operating system.
  3. Start the ClickHouse DBMS service. The startup command may vary depending on certain conditions. To find the last used command for starting the service in the bash command history, use the following command:
    # history | grep "docker service create --name operavix-clickhouse"
    

If you are unable to find the last used command, refer to the Operavix installation documentation to create the necessary startup command. An example of a command to start the ClickHouse service:

# docker service create --name operavix-clickhouse \
--secret operavix_app_user \
--secret operavix_app_user_password_hash \
--secret operavix_external_user \
--secret operavix_external_user_password_hash \
--secret operavix_clickhouse_dhparam.pem \
--secret operavix_clickhouse.crt \
--secret operavix_clickhouse.key \
--publish published=8123,target=8123,mode=host \
--mount type=volume,src=operavix-clickhouse,target=/var/lib/clickhouse/ \
--mount type=volume,src=operavix-clickhouse-log,target=/var/log/clickhouse-server \
--restart-max-attempts 5 \
--restart-condition "on-failure" \
--no-resolve-image \
operavix/operavix-clickhouse:22.8.3.13
Note

The image name with version is provided as an example. Replace it with the version you are installing.

Operavix Service Mode

To enable the service mode, take the following steps:

  1. Ensure that the Operavix service is disabled.
  2. Make a backup of the file %ProgramData%\Operavix\config\com.operavix.subsystem.frontend.json.
  3. Make changes to this file. Set the following values:
    • "service_mode":true
    • "service_mode_message": "Your message about maintenance in progress"

These changes will take effect when you start the Operavix service.

To disable the service mode, revert the changes in the file and restart the service.

Performing a Rollback of the System

In case of issues with the update, perform the following rollback steps:

  1. Stop the Operavix service on the server where Operavix is installed.
  2. Remove or rename the %ProgramData%\Operavix\ directory. Replace it with the previously made backup.
  3. Remove or rename the %ProgramFiles%\Operavix\ directory. Replace it with the previously made backup.
  4. Stop the ClickHouse DBMS service on the server where it is running:
    # docker service rm operavix-clickhouse
    
  5. Remove and re-create the volume containing the ClickHouse data:
    # docker volume rm operavix-clickhouse
    
    # docker volume create operavix-clickhouse
    
  6. Execute the command to restore data in the volume (assuming that the archive with the backup data is located in /tmp of the host OS):
    # docker run -it --rm \
    --mount source=operavix-clickhouse,target=/clickhouse \
    -v /tmp:/source operavix/operavix-clickhouse:22.8.3.13 \
    /bin/bash -с "tar -xvf /source/clickhouse-$(date -u +%d.%m.%Y).tar -C /"
    
  7. Start the ClickHouse service with the previously used command.
  8. Start the Operavix service on the Windows server.

Was the article helpful?

Yes
No
Previous
Updating Operavix
We use cookies to improve our website for you.