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:
@@ -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
|
||||
```
|
||||
@@ -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;
|
||||
```
|
||||
|
||||
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user