feat: add full Zonemaster stack with Docker and Spanish UI

- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI)
- Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend
- Dockerfile.gui: Astro static build served via nginx
- docker-compose.yml: backend (internal) + frontend (port 5353)
- nginx.conf: root redirects to /es/, /api/ proxied to backend
- zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 08:19:24 +02:00
commit 8d4eaa1489
1567 changed files with 204155 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
# Upgrading
Upgrading Zonemaster is usually a straightforward process. The only component
that may require manual intervention is [Zonemaster-Backend] and
[Zonemaster-GUI].
* See [upgrading Zonemaster-Backend] for more information when upgrading
[Zonemaster-Backend].
* See [upgrading Zonemaster-GUI] for more information when upgrading
[Zonemaster-GUI].
For other components, simply re-run the installation steps to get the updated
version.
[Upgrading Zonemaster-Backend]: backend.md
[Upgrading Zonemaster-gui]: gui.md
[Zonemaster-Backend]: https://github.com/zonemaster/zonemaster-backend
[Zonemaster-GUI]: https://github.com/zonemaster/zonemaster-gui

View File

@@ -0,0 +1,78 @@
# Upgrade Backend
## 1. Overview
This document contains pointer to instructions on how to upgrade the
Zonemaster::Backend component. An upgrade usually consist of an upgrade script
to upgrade the database, and instructions to install new dependencies.
> When upgrading from a version < v6.2.0 to a version ≥ v8.0.0, it is
> recommended to install the desired version following the [Installation
> instructions] skipping the part about the database if you want to keep it. To
> upgrade the database, apply each upgrade instructions one after another (see
> table below).
## 2. Prerequisites
Upgrade Zonemaster::LDNS and Zonemaster::Engine first following instructions
within the [Zonemaster::Engine installation] document.
## 3. Upgrading Zonemaster::Backend
To upgrade Zonemaster::Backend perform the following tasks:
1. stop the `zm-rpcapi` and `zm-testagent` daemons (`zm_rpcapi` and
`zm_testagent` on FreeBSD)
2. remove old files with `cpanm --uninstall Zonemaster::Backend`
3. install any new dependencies (see corresponding upgrade document below)
4. install the latest version from CPAN with `cpanm Zonemaster::Backend`
5. apply any remaining instructions specific to this new release
6. start the `zm-rpcapi` and `zm-testagent` daemons (`zm_rpcapi` and
`zm_testagent` on FreeBSD)
### Specific upgrade instructions
> Always make a backup of the database before upgrading it.
When upgrading Zonemaster::Backend, it might be needed to upgrade the database
and/or install new dependencies. Such instructions are available in the upgrade
document coming with the release. See table below to refer to the right
document.
*When upgrading from an older version than the previous release, apply each
upgrade instructions one after another.*
Current Zonemaster::Backend version | Link to instructions | Comments
------------------------------------|----------------------|-----------------------
version < 1.0.3 | [Upgrade to 1.0.3] |
1.0.3 ≤ version < 1.1.0 | [Upgrade to 1.1.0] |
1.1.0 ≤ version < 5.0.0 | [Upgrade to 5.0.0] |
5.0.0 ≤ version < 5.0.2 | [Upgrade to 5.0.2] | For MySQL/MariaDB only
5.0.2 ≤ version < 8.0.0 | [Upgrade to 8.0.0] |
8.0.0 ≤ version < 9.0.0 | [Upgrade to 9.0.0] |
9.0.0 ≤ version < 11.1.0 | [Upgrade to 11.1.0] |
11.1.0 ≤ version < 11.2.0 | [Upgrade to 11.2.0] |
11.2.0 ≤ version | - | No special steps needed for upgrade
## 4. Find current version
The following command will report the version of Zonemaster-Backend currently
installed. If an error is report Zonemaster-Backend is not installed or not
available for the user. If so, consider tunning the command as root or with
`sudo`.
```sh
perl -E 'use Zonemaster::Backend; say $Zonemaster::Backend::VERSION;'
```
[Installation instructions]: ../installation/zonemaster-backend.md
[Upgrade to 1.0.3]: backend/upgrade_zonemaster_backend_ver_1.0.3.md
[Upgrade to 1.1.0]: backend/upgrade_zonemaster_backend_ver_1.1.0.md
[Upgrade to 5.0.0]: backend/upgrade_zonemaster_backend_ver_5.0.0.md
[Upgrade to 5.0.2]: backend/upgrade_zonemaster_backend_ver_5.0.2.md
[Upgrade to 8.0.0]: backend/upgrade_zonemaster_backend_ver_8.0.0.md
[Upgrade to 9.0.0]: backend/upgrade_zonemaster_backend_ver_9.0.0.md
[Upgrade to 11.1.0]: backend/upgrade_zonemaster_backend_ver_11.1.0.md
[Upgrade to 11.2.0]: backend/upgrade_zonemaster_backend_ver_11.2.0.md
[Zonemaster::Engine installation]: ../installation/zonemaster-engine.md

View File

@@ -0,0 +1,31 @@
# Upgrade to 1.0.3
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller than
v1.0.3, and not upgraded, use the following instructions.
### FreeBSD
If the installation is on FreeBSD, then the environment maybe has to be set before
running any of the commands below. Check where `backend_config.ini` is located.
```sh
export ZONEMASTER_BACKEND_CONFIG_FILE="/usr/local/etc/zonemaster/backend_config.ini"
```
### MySQL
Run
```sh
cd $(perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")')
perl patch/patch_mysql_db_zonemaster_backend_ver_1.0.3.pl
```
### PostgreSQL
Run
```sh
cd $(perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")')
perl patch/patch_postgresql_db_zonemaster_backend_ver_1.0.3.pl
```

View File

@@ -0,0 +1,19 @@
# Upgrade to 1.1.0
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller than
v1.1.0, and not upgraded, use the following instructions.
### MySQL
```sql
ALTER TABLE test_results ADD queue INTEGER DEFAULT 0;
```
### PostgreSQL
```sql
ALTER TABLE test_results ADD queue INTEGER DEFAULT 0;
```

View File

@@ -0,0 +1,19 @@
# Upgrade to 11.1.0
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller
than v11.1.0, and not upgraded, use the following instruction.
> You may need to run these command with root privileges.
**Warning:** this database update will result in an increase of the used size.
Make sure you have enough free disk space before upgrading. Depending on the
database engine, you may need up to **5 times the database size of free space**.
### Upgrade database schema
```sh
cd `perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")'`
perl patch/patch_db_zonemaster_backend_ver_11.1.0.pl
```

View File

@@ -0,0 +1,17 @@
# Upgrade to 11.2.0
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller
than v11.2.0, and not upgraded, use the following instructions.
> You may need to run these command with root privileges.
### Migration script
The following script fixes existing untranslated entries that were missed between
Zonemaster-Backend v11.1.0 (release v2023.2) and this version (release v2024.1).
```sh
cd `perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")'`
perl patch/patch_db_zonemaster_backend_ver_11.2.0.pl
```

View File

@@ -0,0 +1,36 @@
# Upgrade to 5.0.0
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller than
v5.0.0, and not upgraded, use the following instructions.
### FreeBSD
If the installation is on FreeBSD, then set the environment before running any
of the commands below:
```sh
export ZONEMASTER_BACKEND_CONFIG_FILE="/usr/local/etc/zonemaster/backend_config.ini"
```
### MySQL (or MariaDB)
Run
```sh
cd $(perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")')
perl patch/patch_mysql_db_zonemaster_backend_ver_5.0.0.pl
```
### PostgreSQL
Run
```sh
cd $(perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")')
perl patch/patch_postgresql_db_zonemaster_backend_ver_5.0.0.pl
```

View File

@@ -0,0 +1,29 @@
# Upgrade to 5.0.2
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller than
v5.0.2, and not upgraded, use the following instructions.
### FreeBSD
If the installation is on FreeBSD, then set the environment before running any
of the commands below:
```sh
export ZONEMASTER_BACKEND_CONFIG_FILE="/usr/local/etc/zonemaster/backend_config.ini"
```
### MySQL (or MariaDB)
Run
```sh
cd $(perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")')
perl patch/patch_mysql_db_zonemaster_backend_ver_5.0.2.pl
```
### PostgreSQL
No patching (upgrading) is needed on zonemaster database on PostgreSQL for this
version of Zonemaster-Backend.

View File

@@ -0,0 +1,129 @@
# Upgrade to 8.0.0
On FreeBSD run the following command first to become root:
```sh
su -l
```
## New dependencies
Zonemaster::Backend requires new dependencies. Depending on the used OS, run
the corresponding command.
### Rocky Linux
```sh
sudo dnf install perl-libintl perl-Mojolicious
```
```sh
sudo cpanm Plack::Middleware::ReverseProxy
```
### Debian / Ubuntu
```sh
sudo apt-get install libplack-middleware-reverseproxy-perl libintl-perl libmojolicious-perl
```
#### Specific to Ubuntu
```sh
sudo cpanm JSON::Validator
```
### FreeBSD
```sh
pkg install p5-Plack-Middleware-ReverseProxy p5-Locale-libintl p5-Mojolicious
```
## Changes in the ini file
New sections and properties have been added to the `backend_config.ini` file.
By default the `add_api_user` method is disabled. To enable it, add the
following to your `backend_config.ini` file:
```
[RPCAPI]
enable_add_api_user = yes
```
> See the [Configuration document] for more information.
## Upgrading init scripts
The `zm-rpcapi` (`zm_rpcapi` on FreeBSD) init script has been updated. It needs
to be reinstalled.
### Rocky Linux
```
cd `perl -MFile::ShareDir=dist_dir -E 'say dist_dir("Zonemaster-Backend")'`
sudo install -v -m 755 ./zm-rpcapi.lsb /etc/init.d/zm-rpcapi
```
### Debian / Ubuntu
```
cd `perl -MFile::ShareDir=dist_dir -E 'say dist_dir("Zonemaster-Backend")'`
sudo install -v -m 755 ./zm-rpcapi.lsb /etc/init.d/zm-rpcapi
```
### FreeBSD
```
cd `perl -MFile::ShareDir=dist_dir -E 'say dist_dir("Zonemaster-Backend")'`
install -v -m 755 ./zm_rpcapi-bsd /usr/local/etc/rc.d/zm_rpcapi
```
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller
than v8.0.0, and not upgraded, use the following instructions.
> Depending on the database size this upgrade can take some time (around
> 30 minutes for a database with 1 million entries)
> You may need to run the command with `sudo`.
### SQLite
Run
```sh
cd `perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")'`
perl patch/patch_sqlite_db_zonemaster_backend_ver_8.0.0.pl
```
### MySQL (or MariaDB)
First update the privileges of the `zonemaster` user:
* Linux
```sh
sudo mysql -e "GRANT ALL ON zonemaster.* TO 'zonemaster'@'localhost';"
```
* FreeBSD
```sh
mysql -u root -p -e "GRANT ALL ON zonemaster.* TO 'zonemaster'@'localhost';"
```
then run
```sh
cd `perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")'`
perl patch/patch_mysql_db_zonemaster_backend_ver_8.0.0.pl
```
### PostgreSQL
Run
```sh
cd `perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")'`
perl patch/patch_postgresql_db_zonemaster_backend_ver_8.0.0.pl
```
[Configuration document]: ../../configuration/backend.md

View File

@@ -0,0 +1,31 @@
# Upgrade to 9.0.0
## Upgrading the database
If your Zonemaster database was created by a Zonemaster-Backend version smaller
than v9.0.0, and not upgraded, use the following instruction.
> You may need to run these command with root privileges.
### Preparation when using MariaDB
If you're using MariaDB you need to make a backup of your database before
upgrading its schema.
```sh
mysqldump zonemaster > backup-file.sql
```
In case the schema upgrade fails you may need to restore the backup before
trying again.
```sh
mysql zonemaster < backup-file.sql
```
### Upgrade database schema
```sh
cd `perl -MFile::ShareDir -le 'print File::ShareDir::dist_dir("Zonemaster-Backend")'`
perl patch/patch_db_zonemaster_backend_ver_9.0.0.pl
```

View File

@@ -0,0 +1,26 @@
# Upgrade GUI
## Overview
This document documents manual steps needed to keep customizations, if any, from
one version of Zonemaster-GUI to a later version. If no such customizations exist
nothing special has to be done.
Migrations:
* [pre-v5.0.0 to v5.0.0](#migrating-pre-v5-to-v5)
## Find version of GUI
Go to the start web page of Zonemaster. In the lower left corner you can find the
the Zonemaster-GUI version.
## Migrating pre-v5 to v5
If `assets/app.config.json` is found in installed Zonemaster-GUI go to the
following documents to migrates its content:
* [Configuring Zonemaster GUI using "config.json"]
* [Configuring Zonemaster GUI using "config.ts"]
[Configuring Zonemaster GUI using "config.json"]: ../configuration/gui/configuring-using-config-json.md
[Configuring Zonemaster GUI using "config.ts"]: ../configuration/gui/configuring-using-config-ts.md