Update to v25.06
Warning
Make a backup before performing the following steps.
Preparing for the Update
-
Ensure that Docker Compose version 2 is installed:
Upgrade if required. MITIGATOR no longer supports Docker Compose version 1.
-
Remove elements unsupported by Docker Compose v2 from
.envfile: -
If using NVIDIA (Mellanox) network adapters update OFED to the latest version.
-
Download metric migration script on all instances running ClickHouse:
-
Add
MITIGATOR_PUBLIC_ADDRESSvariable to.envfile on all instances. To keep existing behavior, set it to the same value asMITIGATOR_HOST_ADDRESS.If
MITIGATOR_HOST_ADDRESSis set to a domain name, replace it with IP address if possible, otherwise containers may lose connectivity in case of a DNS failure.MITIGATOR_PUBLIC_ADDRESSmay be set to either a domain name or an IP address. -
Stop MITIGATOR:
-
Change instance data ownership on all instances:
-
Remove obsolete web UI files on all instances:
Upgrading Mounted Custom Settings
If custom settings files for Postgres (postgresql.conf) or Nginx (nginx.conf)
are mounted into containers, these files must be upgraded for use with new images.
Upgrading Postgres Custom Settings
Check that postgresql.conf is mounted:
The following output lines indicate that postgresql.conf is mounted:
If there are no such lines in the output, postgresql.conf upgrade is not needed.
If the path on the host differs from /srv/mitigator/postgresql.conf,
adjust the path in the upgrade command below accordingly.
Upgrade postgresql.conf:
Upgrading Nginx Custom Settings
Check that nginx.conf is mounted:
The following output lines indicate that nginx.conf is mounted:
If there are no such lines in the output, nginx.conf upgrade is not needed.
If the path on the host differs from /srv/mitigator/nginx.conf,
adjust the path in the upgrade command below accordingly.
Upgrade nginx.conf:
Upgrading Custom HTTP(S) Settings
Check that mitigator.conf is mounted:
The following output lines indicate that mitigator.conf is mounted:
If there are no such lines in the output, mitigator.conf upgrade is not needed.
If the path on the host differs from /srv/mitigator/mitigator.conf,
adjust the path in the upgrade command below accordingly.
Upgrade mitigator.conf:
Correcting Access for HTTPS Key and Certificate
The following instruction is relevant
when a custom HTTPS certificate is used for MITIGATOR access.
Default settings specify the following files within the container:
key from /etc/nginx/cert.key and certificate from /etc/nginx/cert.crt.
If custom HTTP(S) settings specify different files,
adjust the paths everywhere in this section.
Check that /etc/nginx/cert.key is mounted;
The following output lines indicate that cert.key is mounted:
If there are no such lines in the output, access correction is not needed.
If the key path on the host differs from /srv/mitigator/cert.key,
adjust the path in the following commands.
Likewise, adjust the certificate path /srv/mitigator/cert.crt if needed.
Change the key and certificate group ownership and permit reading to the group members:
System Update
Info
After the system is updated and started, the database migration process begins. While the migration is in progress, the web interface will be unavailable. For large databases, this process can take a long time. You can track the completion of the migration by running the command:
There should be 2 entries in the grep results.
Update all MITIGATOR instances using standard update procedure.
Migrating Data after Update
Perform metric migration after starting MITIGATOR:
Migration may take a while. DDoS-protection functions of MITIGATOR are fully operational while migrating data. Some graphs may not render during migration.
This command prints nothing if successful. Please report to the developers about any error printed.