Skip to content

Support infrastructure

Tristan Israël edited this page Feb 22, 2026 · 5 revisions

This page is not up-to-date

This page explains how to setup the deployment infrastructure.

Topologies

Different topologies can be implemented depending on whether you rely on Internet or not for Alpine mirrors.

Using Internet

If you will be using Internet to provide Alpine and Safecor mirrors you will only need to host you own products packages on standard HTTP server.

Using a local mirror

If your systems are offline with no access to Internet, or if you want to implement local mirrors for better performance, you will have to provide a standard HTTP server for Alpine and Safecor packages, and for your own packages.

Using network boot

If your system will boot on the network you will have to deploy DHCP, TFTP and NFS servers.

Summary

This section summarizes the cases and the services to provide locally.

Use case DHCP TFTP NFS HTTP ADMIN
Network boot Yes Yes Yes (1) No (2) Yes
USB / embedded boot No No No (2) No Yes
Local repository cache No No No Yes Yes
Offline (no Internet) No No No Yes Yes
  • (1) If you want to manage user or specific hardware configurations.
  • (2) Only for your own products' packets.

Common implementation

In all the cases you will have to implement the following services on your local area network (LAN):

Name IPv4 Address Description
DHCP 192.168.10.1 DHCP server for PXE boot
TFTP 192.168.10.1 TFTP server for PXE boot
HTTP 192.168.10.2 HTTP server serving the white stations configurations
NFS 192.168.10.2 NFS server allowing the integrator to store or modify white stations configurations
REPOSITORIES 192.168.10.3 HTTP server serving Alpine packages (APK)
ADMIN 192.168.10.250 Machine enabling the administrator to install and configure the deployment infrastructure

Assisted deployment

The assisted deployment offers a simple way to create the support infrastructure using the deployment system Ansible.

The operations consist in describing the configuration (services and machines) in an Ansible file in a format derived from JSON, and execute the deployment which runs automatically. This process can also be used to update the support infrastructure.

The Ansible scripts are available in the directory setup/infractructure/ansible.

Prerequisites

The first step is to decide which topology you want to implement (see Topologies) and continue with the next chapter.

Configure Ansible

The configuration of Ansible consists in defining the topology of your infrastructure in the Ansible inventory.

The first step is to copy inventory.yml.dist to inventory.yml. Then you can personalize the infrastrcture by changing the values in the file.

The following table explains the fields of the inventory:

Field Description Default
install_dhcp Defines whether the DHCP server must be installed Yes
install_tftp Defines whether the TFTP server must be installed Yes
install_http Defines whether the HTTP server must be installed Yes
install_nfs Defines whether the NFS server must be installed Yes
depot_alpine Defines the Alpine's local mirror repository URL (probably on the HTTP server) Yes
depot_alpine Defines the Kernel's local mirror repository URL (probably on the HTTP server) Yes
alpine_version Defines the Alpine version to be used Yes
dhcp_domain Defines the network domain that will be used on the LAN and broadcasted by the DHCP safecor.lan
lan_subnet Defines the LAN IPv4 subnet 192.168.10.0
lan_netmask Defines the LAN IPv4 netmask 255.255.255.0
lan_ip_start Defines the first IP address attributed by the DHCP server 192.168.10.10
lan_ip_end Defines the last IP address attributed by the DHCP server 192.168.10.253
lan_ip_broadcast Defines the IPv4 broadcast address 192.168.10.255
http_server Defines the address of the HTTP server 192.168.10.2
nfs_server Defines the address of the NFS server 192.168.10.2
tftp_server Defines the address of the HTTP server 192.168.10.2
dhcp_server Defines the address of the HTTP server 192.168.10.1

The sections hote_dhcp, hote_http, hote_nfs and hote_tftp are used to defined specific configuration for these hosts. The user and password used by Ansible during the deployment must by defined in the fields ansible_user and ansible_password.

Keep the mirrors up-to-date

The mirrors should be kept up-to-date as frequently as possible (daily to weekly) in order to benefit from the bug and security fixes.

The script setup/infrastructure/scripts/update-alpine-mirror.sh is dedicated to updating a local Alpine mirror. It should be placed in the path of the mirror on the HTTP server.

Run the script: ./update-alpine-mirror.sh [arch] [version] where arch is x86_64, armv7 or aarch64 and version is the version of Alpine to update, for example 3.22.

The following command will update the local mirror:

$ ./udpate-alpine-mirror.sh x86_64 3.22

It will update all files in the folder ./alpine/v3.22/main/x86_64 and ./alpine/v3.22/community/x86_64. The local mirror will be an exact copy of the remote, meaning that all files removed from the official repository will be removed from the local mirror and all files added on the official repository will be added in the local mirror.

Clone this wiki locally