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,75 @@
|
||||
# Debian Build Environment
|
||||
|
||||
## Table of contents
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Preparation](#preparation)
|
||||
* [Installation for package building](#installation-for-package-building)
|
||||
* [Translation work](#translation-work)
|
||||
* [Installation for mdBook](#installation-for-mdbook)
|
||||
|
||||
## Introduction
|
||||
|
||||
These are instructions for creating a build environment for Zonemaster
|
||||
components based on Perl. This is not meant as instructions for installing
|
||||
Zonemaster itself.
|
||||
|
||||
This instruction is for creating it on Debian. See other files for other OSs.
|
||||
|
||||
## Preparation
|
||||
|
||||
1. Make a clean installation of latest version of Debian.
|
||||
|
||||
2. Update the package database.
|
||||
|
||||
```sh
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
## Installation for package building
|
||||
|
||||
1. Install dependencies and tools:
|
||||
|
||||
```sh
|
||||
sudo apt-get install git cpanminus gettext autoconf automake build-essential libdevel-checklib-perl libextutils-pkgconfig-perl libmime-base32-perl libmodule-install-xsutil-perl libtest-differences-perl libtest-exception-perl libssl-dev libidn2-dev libtool
|
||||
```
|
||||
|
||||
2. Clone 'develop' branch from all Zonemaster repositories except GUI:
|
||||
|
||||
```sh
|
||||
git clone -b develop https://github.com/zonemaster/zonemaster.git
|
||||
for d in ldns engine cli backend; do git clone -b develop https://github.com/zonemaster/zonemaster-$d.git; done
|
||||
```
|
||||
|
||||
## Translation work
|
||||
|
||||
Install for translation (handling PO files), only needed if PO files are to be
|
||||
handled.
|
||||
|
||||
* Follow "Software preparation" in [Instructions for translators] for
|
||||
Debian (usually use the version in develop branch).
|
||||
|
||||
|
||||
## Installation for mdBook
|
||||
|
||||
> Note that building with Cargo below can be time consuming.
|
||||
|
||||
Needed for release process:
|
||||
|
||||
```
|
||||
sudo apt install rustc
|
||||
```
|
||||
```
|
||||
cargo install mdbook-linkcheck
|
||||
```
|
||||
Needed to build the mdBook (not part of release process):
|
||||
|
||||
```
|
||||
sudo apt install rustc
|
||||
```
|
||||
```
|
||||
cargo install mdbook mdbook-linkcheck
|
||||
```
|
||||
|
||||
|
||||
[Instructions for translators]: ../maintenance/Instructions-for-translators.md#software-preparation
|
||||
@@ -0,0 +1,113 @@
|
||||
# FreeBSD Build Environment
|
||||
|
||||
## Table of contents
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Preparation](#preparation)
|
||||
* [Installation for package building](#installation-for-package-building)
|
||||
* [Translation work](#translation-work)
|
||||
* [Installation for mdBook](#installation-for-mdbook)
|
||||
|
||||
|
||||
## Introduction
|
||||
|
||||
These are instructions for creating a build environment for Zonemaster
|
||||
components based on Perl. This is not meant as instructions for installing
|
||||
Zonemaster itself.
|
||||
|
||||
This instruction is for creating it on FreeBSD. See other files for other OSs.
|
||||
|
||||
## Preparation
|
||||
|
||||
1. Do a clean installation of latest version of FreeBSD
|
||||
|
||||
2. Become root:
|
||||
|
||||
```sh
|
||||
su -l
|
||||
```
|
||||
|
||||
3. Update to latest patch level
|
||||
|
||||
```sh
|
||||
freebsd-update fetch install
|
||||
```
|
||||
|
||||
4. Reboot into latest patch level and then continue as root on next step
|
||||
```sh
|
||||
shutdown -r now
|
||||
```
|
||||
|
||||
5. Create a new user (optional)
|
||||
|
||||
Make sure to add `wheel` as an additional group for the user.
|
||||
|
||||
```sh
|
||||
adduser
|
||||
```
|
||||
|
||||
6. Update list of package repositories:
|
||||
|
||||
Create the file `/usr/local/etc/pkg/repos/FreeBSD.conf` with the
|
||||
following content, unless it is already updated:
|
||||
|
||||
```sh
|
||||
FreeBSD: {
|
||||
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
|
||||
}
|
||||
```
|
||||
|
||||
7. Check or activate the package system:
|
||||
|
||||
Run the following command, and accept the installation of the `pkg` package
|
||||
if suggested.
|
||||
|
||||
```sh
|
||||
pkg info -E pkg
|
||||
```
|
||||
|
||||
8. Update local package repository:
|
||||
|
||||
```sh
|
||||
pkg update -f
|
||||
```
|
||||
|
||||
## Installation for package building
|
||||
|
||||
1. Install dependencies and tools:
|
||||
|
||||
```sh
|
||||
pkg install gmake gettext-tools git-lite p5-Locale-PO p5-App-cpanminus p5-ExtUtils-PkgConfig p5-MIME-Base32 p5-Module-Install libtool autoconf automake p5-Devel-CheckLib p5-Module-Install-XSUtil p5-Test-Exception libidn libidn2
|
||||
```
|
||||
|
||||
2. Clone 'develop' branch from all Zonemaster repositories except GUI:
|
||||
|
||||
```sh
|
||||
git clone -b develop https://github.com/zonemaster/zonemaster.git
|
||||
for d in ldns engine cli backend; do git clone -b develop https://github.com/zonemaster/zonemaster-$d.git; done
|
||||
```
|
||||
|
||||
## Translation work
|
||||
|
||||
Install for translation (handling PO files), only needed if PO files are to be
|
||||
handled.
|
||||
|
||||
* Follow "Software preparation" in [Instructions for translators] for
|
||||
FreeBSD (usually use the version in develop branch).
|
||||
|
||||
## Installation for mdBook
|
||||
|
||||
Needed for release process:
|
||||
|
||||
```
|
||||
pkg install mdbook-linkcheck
|
||||
```
|
||||
|
||||
Needed to build the mdBook (not part of release process):
|
||||
|
||||
```
|
||||
pkg install mdbook mdbook-linkcheck
|
||||
```
|
||||
|
||||
|
||||
[Instructions for translators]: ../maintenance/Instructions-for-translators.md#software-preparation
|
||||
87
zonemaster/docs/internal/distrib-testing/README.md
Normal file
87
zonemaster/docs/internal/distrib-testing/README.md
Normal file
@@ -0,0 +1,87 @@
|
||||
# Build Environment Preparation
|
||||
|
||||
## Overview
|
||||
|
||||
The build environment is used for several purposes, but the purpose
|
||||
is not for the actual installation of Zonemaster. For the installation
|
||||
the normal installation instructions for users should be used. In most
|
||||
cases, if you create a build environment you usually do not install
|
||||
Zonemaster on that.
|
||||
|
||||
* When testing the installation instructions for users you should avoid
|
||||
to do that from a build environment.
|
||||
* For the use cases below, your should in most cases make sure that
|
||||
you use the develop branch.
|
||||
* You should probably read this file
|
||||
[from the develop branch][BuildEnvironmentPreparation], not master
|
||||
branch to get the latest changes.
|
||||
|
||||
## Use cases
|
||||
|
||||
1. Creating Perl tarballs for testing 1).
|
||||
2. Creating Perl tarballs for uploading to CPAN as part of a Zonemaster
|
||||
release 1).
|
||||
3. Creating Zonemaster-GUI zip distribution for testing.
|
||||
4. Creating Zonemaster-GUI zip distribution for release.
|
||||
5. Translation work (PO file updates).
|
||||
6. Updating documents in Zonemaster/Zonemaster by scripts in
|
||||
[utils README] as part of release.
|
||||
7. Check for broken, internal links in mdBook as part of release.
|
||||
8. Development work.
|
||||
|
||||
There could be more use cases.
|
||||
|
||||
1\) Zonemaster-LDNS, Zonemaster-Engine, Zonemaster-CLI and Zonemaster-Backend.
|
||||
|
||||
|
||||
### Building Perl CPAN packages
|
||||
|
||||
To create a Perl tarball (use cases 1 and 2) you need a specific environment.
|
||||
Once you have set up your build environment follow the building instructions as
|
||||
described in [Create Test Distribution] document of the release process.
|
||||
|
||||
Build environments:
|
||||
* [Debian build environment]
|
||||
* [FreeBSD build environment]
|
||||
* [Ubuntu build environment]
|
||||
* Rocky-Linux environment (TBD)
|
||||
|
||||
### GUI zip distribution
|
||||
|
||||
For use cases 3 and 4, install [Ubuntu Node.js environment].
|
||||
|
||||
### Translation work
|
||||
|
||||
For use case 5 (which applies for Zonemaster-Engine and
|
||||
Zonemaster-CLI) install one of the environments listed for
|
||||
use case 1 and 2 and then follow the Zonemaster-Engine
|
||||
[instructions for translators].
|
||||
|
||||
### Updating documents
|
||||
|
||||
For use case 6, install one of the environments listed
|
||||
for use cases 1 and 2, and then follow the
|
||||
[installation instructions] for Zonemaster-Engine. Make sure
|
||||
that you install from develop branch.
|
||||
|
||||
### Check for broken, internal links in mdBook
|
||||
|
||||
For use case 7, install according to the build environment
|
||||
instructions (see above).
|
||||
|
||||
### Development work
|
||||
|
||||
For use case 8, install an environment as for use cases
|
||||
1 or 3. Additional installation might be needed.
|
||||
|
||||
|
||||
<!-- Zonemaster links point on purpose on the develop branch. -->
|
||||
[BuildEnvironmentPreparation]: https://github.com/zonemaster/zonemaster/blob/develop/docs/internal/distrib-testing/README.md
|
||||
[Debian build environment]: Debian-build-environment.md
|
||||
[FreeBSD build environment]: FreeBSD-build-environment.md
|
||||
[Ubuntu build environment]: Ubuntu-build-environment.md
|
||||
[Ubuntu Node.js environment]: Ubuntu-Node.js-build-environment.md
|
||||
[Create Test Distribution]: ../maintenance/ReleaseProcess-create-test-distribution.md
|
||||
[Installation instructions]: https://github.com/zonemaster/zonemaster/blob/develop/docs/public/installation/zonemaster-engine.md
|
||||
[instructions for translators]: https://github.com/zonemaster/zonemaster/blob/develop/docs/internal/maintenance/Instructions-for-translators.md
|
||||
[utils README]: ../../../utils/README.md
|
||||
@@ -0,0 +1,42 @@
|
||||
# Ubuntu Node.js Build Environment
|
||||
|
||||
The build process takes over 1GB of RAM. A machine with at least 2GB of RAM is recommended to build Zonemaster-GUI.
|
||||
|
||||
The requirements to build the Zonemaster-GUI distribution zip file are Node.js
|
||||
and npm. Below are instructions to create such a build environment on Ubuntu.
|
||||
|
||||
Node.js and npm are available from the [Node.js] official website. The required
|
||||
Node.js version is 18. The process has been tested on Ubuntu 22.04, which we use
|
||||
here.
|
||||
|
||||
1. Make a clean installation of Ubuntu 22.04.
|
||||
|
||||
2. Update the package database and install curl
|
||||
```sh
|
||||
sudo apt-get update && sudo apt-get install curl
|
||||
```
|
||||
|
||||
3. Install Node.js by using [NVM], a node version manager.
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
|
||||
```
|
||||
|
||||
4. After installation, log out and log in again to handle [known issue], or just:
|
||||
|
||||
```sh
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
5. Install the supported Node.js version
|
||||
```sh
|
||||
nvm install 24
|
||||
```
|
||||
|
||||
6. Switch to the previously installed version
|
||||
```sh
|
||||
nvm use 24
|
||||
```
|
||||
|
||||
[known issue]: https://github.com/nvm-sh/nvm#troubleshooting-on-linux
|
||||
[Node.js]: https://nodejs.org/en
|
||||
[NVM]: https://github.com/nvm-sh/nvm
|
||||
@@ -0,0 +1,118 @@
|
||||
# Ubuntu Build Environment
|
||||
|
||||
## Table of contents
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Preparation](#preparation)
|
||||
* [Installation for package building](#installation-for-package-building)
|
||||
* [Install Docker](#install-docker)
|
||||
* [Translation work](#translation-work)
|
||||
* [Generate documents in Zonemaster/Zonemaster](#generate-documents-in-zonemasterzonemaster)
|
||||
* [Installation for mdBook](#installation-for-mdbook)
|
||||
|
||||
## Introduction
|
||||
|
||||
These are instructions for creating a build environment for Zonemaster components
|
||||
based on Perl. This is not meant as instructions for installing Zonemaster
|
||||
itself. You should normally use the version of these instructions found in the
|
||||
develop branch.
|
||||
|
||||
This instruction is for creating it on Ubuntu. See other files for other OSs.
|
||||
|
||||
This description targets to create a system that can be used for the following
|
||||
needs for testing and releasing Zonemaster:
|
||||
|
||||
1. Git work on the Zonemaster repositories.
|
||||
2. Creating distributing packages for testing or uploading to CPAN.
|
||||
3. Creating Docker imaging for testing or uploading to Docker Hub.
|
||||
4. Updating PO files (translation).
|
||||
5. Generating the files listed in the [utils README].
|
||||
|
||||
|
||||
## Preparation
|
||||
|
||||
1. Make a clean installation of [Ubuntu] 22.04.
|
||||
|
||||
2. Update the package database.
|
||||
|
||||
```sh
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
## Installation for package building
|
||||
|
||||
1. Install dependencies and tools:
|
||||
|
||||
```sh
|
||||
sudo apt-get install git cpanminus gettext autoconf automake build-essential libdevel-checklib-perl libextutils-pkgconfig-perl libmime-base32-perl libmodule-install-xsutil-perl libssl-dev libtest-exception-perl libidn2-dev libtool
|
||||
```
|
||||
|
||||
2. Clone 'develop' branch from all Zonemaster repositories except GUI:
|
||||
|
||||
```sh
|
||||
git clone -b develop https://github.com/zonemaster/zonemaster.git
|
||||
for d in ldns engine cli backend; do git clone -b develop https://github.com/zonemaster/zonemaster-$d.git; done
|
||||
```
|
||||
|
||||
## Install Docker
|
||||
|
||||
This step is only needed if Docker images are to be built.
|
||||
|
||||
The Docker version installed by the command below is the version found in the
|
||||
Ubuntu package repository. If a newer version is needed, follow the
|
||||
instructions on the [Install Docker Engine on Ubuntu] page instead.
|
||||
|
||||
```sh
|
||||
sudo apt-get install docker.io
|
||||
```
|
||||
|
||||
Add yourself to the Docker group.
|
||||
|
||||
```sh
|
||||
sudo usermod -aG docker $LOGNAME
|
||||
```
|
||||
|
||||
## Translation work
|
||||
|
||||
Install for translation (handling PO files), only needed if PO files are to be
|
||||
handled.
|
||||
|
||||
* Follow "Software preparation" in [Instructions for translators] for
|
||||
Ubuntu (usually use the version in develop branch).
|
||||
|
||||
## Generate documents in Zonemaster/Zonemaster
|
||||
|
||||
Only needed if the files listed in [utils README] are to be generated (updated).
|
||||
|
||||
* Follow the [Installation instructions] for Zonemaster-Engine for Ubuntu.
|
||||
* Only install the dependencies from binary packages and CPAN (if any).
|
||||
* Do not install neither Zonemaster::LDNS nor Zonemaster::Engine at this stage.
|
||||
|
||||
## Installation for mdBook
|
||||
|
||||
> Note that building with Cargo below can be time consuming.
|
||||
|
||||
Needed for release process:
|
||||
|
||||
```
|
||||
sudo apt install rustc
|
||||
```
|
||||
```
|
||||
cargo install mdbook-linkcheck
|
||||
```
|
||||
Needed to build the mdBook (not part of release process):
|
||||
|
||||
```
|
||||
sudo apt install rustc
|
||||
```
|
||||
```
|
||||
cargo install mdbook mdbook-linkcheck
|
||||
```
|
||||
|
||||
|
||||
|
||||
[Install Docker Engine on Ubuntu]: https://docs.docker.com/engine/install/ubuntu/
|
||||
[Installation instructions]: ../../public/installation/zonemaster-engine.md
|
||||
[Instructions for translators]: ../maintenance/Instructions-for-translators.md#software-preparation
|
||||
[Ubuntu]: https://ubuntu.com/
|
||||
[Utils README]: ../../../utils/README.md
|
||||
Reference in New Issue
Block a user