Viewing docs for Matchbox v0.2.0
published on Friday, Oct 11, 2024 by Pulumiverse
published on Friday, Oct 11, 2024 by Pulumiverse
Matchbox
I want to use the Pulumi Matchbox package (matchbox) in my project.
## Provider details
- Package: matchbox
- Version: v0.2.0
- Publisher: Pulumiverse
- Source: pulumi
- Repository: https://github.com/pulumiverse/pulumi-matchbox
## Documentation
The Pulumi Cloud Registry API serves canonical, up-to-date docs for this package — including private packages and every published version. Send the "Accept: text/markdown" header for clean readable content, or "application/json" for structured data.
Start at the navigation tree, which cross-links to the readme, installation guide, and per-resource docs URL template:
- https://api.pulumi.com/api/registry/packages/pulumi/pulumiverse/matchbox/versions/latest/nav
Returns a summary by default. The full tree can be hundreds of kB for large providers, so prefer targeted search: append "?q=<query>&depth=full" to filter by resource/function title or token (for example "?q=bucket&depth=full"). Only request the full nav without a query if you actually need to enumerate every resource.
Other endpoints:
- Overview and getting started: https://api.pulumi.com/api/registry/packages/pulumi/pulumiverse/matchbox/versions/latest/readme
- Installation and configuration: https://api.pulumi.com/api/registry/packages/pulumi/pulumiverse/matchbox/versions/latest/installation
- Per-resource/function docs: https://api.pulumi.com/api/registry/packages/pulumi/pulumiverse/matchbox/versions/latest/docs/{token}?lang={lang}
Replace {token} with the percent-encoded token from the nav response (for example aws:s3/bucket:Bucket).
Replace {lang} with typescript, python, go, csharp, java, or yaml.
Fetch the installation endpoint above for the correct setup steps — install instructions vary between native providers, bridged Terraform providers, and component packages.
Help me get started using this provider. Show me a complete Pulumi program that provisions a common resource, including all necessary configuration and imports.
Viewing docs for Matchbox v0.2.0
published on Friday, Oct 11, 2024 by Pulumiverse
published on Friday, Oct 11, 2024 by Pulumiverse
The Matchbox provider for Pulumi can be used to provision the Matchbox iPXE server. The Matchbox provider must be configured with certificates to connect correctly to the server.
Example
import fs from 'fs';
import * as pulumi from "@pulumi/pulumi"
import * as matchbox from "@pulumiverse/matchbox"
const matchboxConfig = new pulumi.Config("matchbox")
const matchBoxEndpoint = matchboxConfig.require("endpoint")
const config = new pulumi.Config()
// Set stack config item "stream" to a value applicable for the os releases, e,g:
// "Fedora CoreOS release stream (e.g. testing, stable)"
const osStream = config.get("stream") || "stable"
// Set stack config item "versioin" to a value applicable for the os version, e,g:
// "Fedora CoreOS version to PXE and install (e.g. 32.20200715.3.0)"
const osVersion = config.require("version")
const ignitionData = fs.readFileSync('worker.yaml', 'utf8');
const pxeProfile = new matchbox.Profile("pxeProfile", {
initrds: [
pulumi.interpolate`https://builds.coreos.fedoraproject.org/prod/streams/${osStream}/builds/${osVersion}/x86_64/fedora-coreos-${osVersion}-live-initramfs.x86_64.img`
],
args: [
"ip=dhcp",
"rd.neednet=1",
pulumi.interpolate`initrd=fedora-coreos-${osVersion}-live-initramfs.x86_64.img`,
pulumi.interpolate`coreos.inst.image_url=https://builds.coreos.fedoraproject.org/prod/streams/${osStream}/builds/${osVersion}/x86_64/fedora-coreos-${osVersion}-metal.x86_64.raw.xz`,
pulumi.interpolate`coreos.inst.ignition_url=${matchBoxEndpoint}/ignition?uuid=\${uuid}&mac=\${mac:hexhyp}`,
"coreos.inst.install_dev=sda",
"console=tty0",
"console=ttyS0",
],
rawIgnition: ignitionData
})
const pxeGroup = new matchbox.Group("node1", {
profile: pxeProfile.id,
selector: {
mac: "52:54:00:a1:9c:ae"
},
metadata: {
customVariable: "machine_specific_value_here"
}
})
Viewing docs for Matchbox v0.2.0
published on Friday, Oct 11, 2024 by Pulumiverse
published on Friday, Oct 11, 2024 by Pulumiverse
