PXE provisioning management: render netboot artifacts and drive DHCP for targets
Project description
netboot
PXE provisioning management: describe your netboot targets, images and DHCP
zones in config, and let netboot render the per-target boot artifacts and arm (or
disarm) DHCP for a machine as it enters and leaves the install process.
netboot is a small, hook-driven engine. A YAML config declares targets
(host/MAC/IP), images (what to boot), dhcp zones (the network a target
lives on) and content repos (where artifacts are fetched/served from). For a
given target netboot builds a render context and produces netboot files from
Jinja2 or shell-style templates, resolving names by MAC, hostname or IP with
sensible fallbacks. Backends and behaviour are extensible through an event-hook
system and pluggable DhcpServer handlers.
Install
pip install netboot # provides the `pixie` command
# or, from a checkout:
pip install .
Optional extras:
| Extra | Enables |
|---|---|
netboot[config] |
YAML config loading for the CLI (pyyaml) |
netboot[dns] |
DNS resolution of hostname targets (dnspython) |
netboot[docs] |
Build the documentation site (mkdocs) |
Built on duho (CLI/args/command discovery),
pathlib_next (URI-aware paths),
yaconfiglib (layered YAML), and
Jinja2. IP/MAC/DNS helpers are vendored in-tree (netboot._netutils).
CLI
The command is pixie (PXE is pronounced "pixie"); netboot is the library
package it drives.
# Initiate the PXE process for a target (render artifacts + arm DHCP):
pixie initiate my-host
# Complete it (post-boot cleanup, disarm DHCP):
pixie complete my-host
Global options:
| Option | Purpose |
|---|---|
-c, --config PATH |
Explicit config file (yaml/cfg) |
--baseconfig DIR |
Base config directory to search (default ./config) |
-l, --load-module M |
Import module(s) before building netboot (config/hook deps) |
--cmdspath PATH |
Extra directories/packages to search for commands |
A target is looked up by exact id, or by hostname prefix / MAC / IP.
Library
from netboot import Pixie
pixie = Pixie(**config) # config: the merged YAML mapping
target = pixie.lookup_target("my-host")
ctx = pixie.make_context(target) # render context (image + dhcpzone + target)
print(ctx.render("boot.ipxe.j2")) # render a template against the context
pixie.initialize(target) # arm DHCP for the target
pixie.complete(target) # cleanup once installed
Extending
- Hooks. Pass
hooks=[...](callables or"module.func"import strings) toPixie(...). Each hookf(event, netboot, value, kwargs) -> valueis called for everyPixieEventand may transform the value flowing through it — used to customise lookup, context construction and the init/complete lifecycle. - DHCP backends. Subclass
netboot.dhcp.DhcpServer; the lowercased class name is the URI scheme it handles (class dnsmasq(DhcpServer)→dnsmasq://...). Import your plugin module via--load-moduleso it is registered before the config builds the zones.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netboot-0.1.1.tar.gz.
File metadata
- Download URL: netboot-0.1.1.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a82eb6354c09256fe624fcd95b3efc91bb3b483fa65f739050efdef071e22d9c
|
|
| MD5 |
8adb269e5865479d8e754f533539737b
|
|
| BLAKE2b-256 |
74daf48c65eb5f66c54f40f0ae3b7b3d2c4bcbdc6ac0f7dab78a0e93f69ca3c5
|
Provenance
The following attestation bundles were made for netboot-0.1.1.tar.gz:
Publisher:
release.yml on jose-pr/netboot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netboot-0.1.1.tar.gz -
Subject digest:
a82eb6354c09256fe624fcd95b3efc91bb3b483fa65f739050efdef071e22d9c - Sigstore transparency entry: 2212314643
- Sigstore integration time:
-
Permalink:
jose-pr/netboot@5ef6e49948ad70d63753d443fb4770e617f5bc81 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jose-pr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5ef6e49948ad70d63753d443fb4770e617f5bc81 -
Trigger Event:
push
-
Statement type:
File details
Details for the file netboot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: netboot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b311a9340e381a6977e017c10c795c71ce755c462cf6a3882e538aa999d6073
|
|
| MD5 |
daddabdb560120c5a6ec3718a7ae0264
|
|
| BLAKE2b-256 |
f0d8be69edace6397d69fa26706b7b700a8d992b59be4cd31be1bc65fff7c89f
|
Provenance
The following attestation bundles were made for netboot-0.1.1-py3-none-any.whl:
Publisher:
release.yml on jose-pr/netboot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netboot-0.1.1-py3-none-any.whl -
Subject digest:
5b311a9340e381a6977e017c10c795c71ce755c462cf6a3882e538aa999d6073 - Sigstore transparency entry: 2212314671
- Sigstore integration time:
-
Permalink:
jose-pr/netboot@5ef6e49948ad70d63753d443fb4770e617f5bc81 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jose-pr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5ef6e49948ad70d63753d443fb4770e617f5bc81 -
Trigger Event:
push
-
Statement type: