Skip to content

Commit a4bf69e

Browse files
committed
docs: update README with neutral technical framing and TF-Tech NV ownership
1 parent 830dc93 commit a4bf69e

1 file changed

Lines changed: 72 additions & 46 deletions

File tree

README.md

Lines changed: 72 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
# Zero-OS Bootstrap Webservice
1+
# 0-Bootstrap
22

3-
This web service will provides dynamic construction of iPXE scripts for booting and bootstrapping Zero-OS kernel images.
3+
A network bootstrapping webservice that generates dynamic iPXE scripts, bootable ISO images, USB images, UEFI loaders, and kernel images for bare-metal node provisioning.
4+
5+
## What this is
6+
7+
0-Bootstrap provides network bootstrapping capabilities for Zero-OS nodes. It delivers initial configuration and boot images over the network, enabling automated operating system provisioning without manual intervention. The service generates custom boot configurations based on node identity and network parameters.
8+
9+
The webservice is built with Flask and serves as the entry point for nodes joining the infrastructure, producing iPXE scripts, ISO files, USB images, UEFI bootloaders, and directly-bootable kernels on demand.
10+
11+
## What this repository contains
12+
13+
- `bootstrap.py` — Flask web service that handles boot image generation
14+
- `config.py` — Service configuration (networks, paths, ports)
15+
- `setup/template.sh` — Pre-compilation script for iPXE templates
16+
- `db/schema.sql` — SQLite schema for runtime provisioning database
17+
- `kernel/` — Directory for kernel images (`zero-os-BRANCH-ARCH.efi`)
18+
19+
## Role in the stack
20+
21+
## ZOS / Zero-OS
22+
23+
ZOS, also known as Zero-OS, is the operating system layer used to run and manage nodes. It provides the low-level runtime environment for workloads, networking, storage, and automation.
24+
25+
0-Bootstrap is the first service a bare-metal node contacts when joining the network. It produces the correct boot artifacts so that ZOS can be fetched and started automatically. The service supports multiple environments (production, test, development, QA) via configurable network profiles.
26+
27+
## Relation to ThreeFold
28+
29+
This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.
30+
31+
## Ownership
32+
33+
This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.
434

535
## Endpoints
636

@@ -10,85 +40,81 @@ The most simple endpoint is the plain text version:
1040
You can generate a bootable image with a bundle boot-script via:
1141
- `/iso/`: generate a bootable ISO file
1242
- `/usb/`: generate a bootable USB image file
13-
- `/uefi/`: generate an UEFI bootloader file
14-
- `/uefimg/`: same as above, but an image to be dd'd to an usb stick for UEFI boxes
15-
- `/krn/`: generate directly-bootable kernel
16-
17-
Static target:
18-
- `/krn-generic`: build a generic ipxe kernel, with our SSL certificates authorized
19-
- `/uefi-generic`: build a generic ipxe uefi bootable image, with our SSL certificates authorized
20-
- `/krn-provision`: build a generic ipxe kernel, calling our provisioning endpoint with nic mac address
21-
- `/uefi-provision`: build a generic ipxe uefi bootable, calling our provisioning endpoint with nic mac address
43+
- `/uefi/`: generate a UEFI bootloader file
44+
- `/uefimg/`: same as above, but an image to be dd'd to a USB stick for UEFI boxes
45+
- `/krn/`: generate a directly-bootable kernel
46+
47+
Static targets:
48+
- `/krn-generic`: build a generic iPXE kernel, with SSL certificates authorized
49+
- `/uefi-generic`: build a generic iPXE UEFI bootable image, with SSL certificates authorized
50+
- `/krn-provision`: build a generic iPXE kernel, calling the provisioning endpoint with NIC MAC address
51+
- `/uefi-provision`: build a generic iPXE UEFI bootable, calling the provisioning endpoint with NIC MAC address
2252
- `/kernel/[name]`: provide the kernel (static file)
2353

24-
## Arguments
25-
All endpoints (except `/krn-generic/` and `/kernel/` which are static) accepts more optional arguments:
54+
### Arguments
55+
56+
All endpoints (except `/krn-generic/` and `/kernel/` which are static) accept optional arguments:
57+
2658
```
2759
...endpoint/target/[farmer-id]/[extra-arguments]
2860
```
2961

30-
Target can be one of the following, to specify in which environment kernel boots:
62+
Target can be one of the following to specify the environment:
3163
- `prod`: production environment
3264
- `test`: testnet environment
3365
- `dev`: devnet environment
3466
- `qa`: quality-assurance special dedicated network
3567

36-
These networks are configurable via the `config.py` file. The dictionary pointed by `runmode` should contain
37-
a short keyword and define a long pretty name.
68+
These networks are configurable via `config.py`. The dictionary pointed to by `runmode` should contain a short keyword and define a long pretty name.
3869

39-
By default, theses default network have new links inside `kernel-net-path` config location. This directory should contains files
40-
called `prod.efi`, `test.efi`, `dev.efi` and `qa.efi`. Theses files will be used as default kernel per network.
70+
By default, these networks have links inside the `kernel-net-path` config location. This directory should contain files called `prod.efi`, `test.efi`, `dev.efi`, and `qa.efi`. These files are used as the default kernel per network.
4171

42-
> This introduce flexibility about kernel update and allow different kernel to serve differents network, so 'testnet' can use a test
43-
kernel while 'prod' stay stable. In order to update kernel, it's easy when using symlinks (`prod.efi` can -and should- be a symlink to the
44-
current kernel version).
72+
This provides flexibility for kernel updates and allows different kernels to serve different networks, so testnet can use a test kernel while production stays stable. Using symlinks is recommended (`prod.efi` can be a symlink to the current kernel version).
4573

46-
Any [argument] are optional, but are ordered and dependants (eg: you cannot provide extra argument without providing farmer-id network)
74+
Any `[argument]` is optional, but arguments are ordered and dependent (you cannot provide extra arguments without providing the farmer-id and network).
4775

48-
Theses are valid endpoint example:
76+
Valid endpoint examples:
4977
- `/ipxe/prod`
5078
- `/ipxe/test/1234`
5179
- `/ipxe/dev/5550/console=ttyS0`
5280

53-
### Branches
54-
55-
### Extra Argument
56-
57-
Everything set on the last argument will be forwarded as-it to the kernel argument. You can set spaces, etc.
81+
### Extra Arguments
5882

83+
Everything set in the last argument is forwarded as-is to the kernel argument line.
5984

6085
## Installation
6186

62-
To speedup ISO and USB images creation, the script will use a iPXE-template directory which contains a pre-compiled version of the sources.
87+
To speed up ISO and USB image creation, the script uses an iPXE template directory containing a pre-compiled version of the sources.
6388

64-
To pre-compile code, you can run the `setup/template.sh` script.
65-
This will prepare the template and put it on `/opt/ipxe-template`.
89+
To pre-compile, run the `setup/template.sh` script. This prepares the template and places it at `/opt/ipxe-template`.
6690

67-
In order to compile correctly the sources, you'll need (ubuntu): `build-essential syslinux liblzma-dev libz-dev genisoimage isolinux wget dosfstools udev`
91+
Build dependencies (Ubuntu): `build-essential syslinux liblzma-dev libz-dev genisoimage isolinux wget dosfstools udev`
6892

6993
### Database
7094

71-
Clients can be provisioned on the runtime using a database, you need to create the database, even if it's empty.
72-
Just run: `cat db/schema.sql | sqlite3 db/bootstrap.sqlite3`
73-
74-
## Run
95+
Clients can be provisioned at runtime using a database. You need to create the database, even if it is empty:
7596

76-
This is a `Flask` web service, just run the `bootstrap.py` server file. On ubuntu, you'll need `python3-flask`.
97+
```bash
98+
cat db/schema.sql | sqlite3 db/bootstrap.sqlite3
99+
```
77100

78-
Kernel images will be served from `kernel` directory. Images are in form: `zero-os-BRANCH-ARCH.efi`
101+
## Run
79102

80-
## License
103+
This is a Flask web service. Run the `bootstrap.py` server file. On Ubuntu you will need `python3-flask`.
81104

82-
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
83-
Copyright (c) TFTech NV.
105+
Kernel images are served from the `kernel` directory. Images are in the form: `zero-os-BRANCH-ARCH.efi`
84106

85107
## Configuration
86108

87109
You can customize the service by editing `config.py`:
88-
- `base-host`: http web address (eg: https://bootstrap.grid.tf)
89-
- `ipxe-template`: iPXE template path (by default, setup script install it to `/opt/ipxe-template`)
90-
- `ipxe-template-uefi`: iPXE UEFI template path (by default, setup script install it to `/opt/ipxe-template-uefi`)
110+
- `base-host`: HTTP web address (e.g., `https://bootstrap.grid.tf`)
111+
- `ipxe-template`: iPXE template path (default: `/opt/ipxe-template`)
112+
- `ipxe-template-uefi`: iPXE UEFI template path (default: `/opt/ipxe-template-uefi`)
91113
- `kernel-path`: path where to find kernels
92-
- `http-port`: http listen port,
93-
- `debug`: enable (True) or disable (False) debug Flask
114+
- `http-port`: HTTP listen port
115+
- `debug`: enable (`True`) or disable (`False`) Flask debug mode
116+
117+
## License
94118

119+
This project is licensed under the Apache License 2.0 — see the [LICENSE](LICENSE) file for details.
120+
Copyright (c) TF-Tech NV.

0 commit comments

Comments
 (0)