-
Notifications
You must be signed in to change notification settings - Fork 0
Provisioning
This page describes various methods to provision a device with a PSEC-based system.
Manual provisioning consists of going through an installation process step-by-step using a USB drive.
1 - Create an installation USB stick for Alpine Linux.
- The Alpine Linux version must match the desired repository version.
- The ISO image used must be Alpine Standard.
2 - Install Alpine Linux on the device.
- Assign a network interface with either DHCP or a static IP depending on the context.
- In the APK Mirror section, if using an internet repository, select
f, otherwise do not select any menu entry but manually enter the URL of the local Alpinemainrepository. - Create an
adminuser account.
3 - Reboot the system at the end of the installation.
4 - After reboot, log in as admin.
5 - Add binary repositories
- Type
$ su - rootand enter the password defined during the installation. - Run
# vi /etc/apk/repositoriesand add thecommunityrepository, thePSECrepository, and any product-specific repositories. - Save and exit with
:wq. - Run
# apk update
6 - Add PGP keys
- Run
# cd /etc/apk/keysthen# wget [PSEC repository URL]/psec.rsa.pub, and repeat the process for other product-specific repositories. - Run
# apk update.
7 - (Optional, only in development phase) Allow the admin user to execute root commands
- Run
# apk add sudo, then# visudo - Edit the line
# %wheel ALL=(ALL:ALL) NOPASSWD: ALLand remove the#to uncomment it. - Save and exit with
:wq - Type
# exit
8 - Install XEN
- Run
$ sudo apk add xen xen-hypervisor - Run
$ sudo reboot - On reboot, select the first GRUB entry labeled with
Xen - After booting, log in as
root - Start the Xen service with
# rc-service xenstored start
9 - Install the product following the provided documentation.
This procedure helps creating an ISO image with an application embedded. This is the official process of creating a bootable product ISO that can be booted as an ISO or as an USB drive.
The following example is based on PSEC Diagnostic app.
Procedure:
- Prepare an Alpine development machine (see Development.md).
- Provision the public and private keys of the product's repository.
- Clone
aportsfrom gitlab :$ git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git. - Copy the files
genapkovl-diag.shandmkimg.diag.shinaports/scripts. - Make these scripts executable (
chmod +x) - Enter the scripts dir :
$ cd aports/scripts - Run mkimage :
$ TMPDIR=~/tmp ./mkimage.sh --tag v3.22 --outdir ~/iso --arch x86_64 --repository https://www.alefbet.net/github/psec --repository http://dl-cdn.alpinelinux.org/alpine/v3.21/main --repository http://dl-cdn.alpinelinux.org/alpine/v3.21/community --profile diag --hostkeys --workdir ~/tmp - At the end, the ISO image will be created in
~/iso.
The ISO image can be burnt on a DVD-ROM or copied on a USB key.