Chapter 4: Provisioning & Payload Scripting
Injecting access keys, allocating resources, and executing scripts.Commissioning a raw machine node provides zero utility if the target stays powered off or missing cryptographic authorization fields. We resolve this by forcing execution rules directly across our targets.
1. Forcing Access Key Propagation
We re-run the diagnostic commissioning phase, forcing MAAS to inject our local public keys into the root user structure, while maintaining active system power:
maas admin machine commission xttpfx enable_ssh=1
2. Locating Node Network Endpoints
We execute standard container listing lookups to pull down the dynamic IP address lease given to our virtual machine environment:
lxc list
Our target container endpoint registers as active and readable across our subnet network:
| native-cub | RUNNING | 10.38.31.202 (eth0) | VIRTUAL-MACHINE |
3. Secure Copy Payload Ingestion
With an active, reachable route running, we use `scp` to pass configured automation scripts straight into the remote user filesystem namespace:
scp ./motd.sh ubuntu@10.38.31.202:
4. Allocating and Deploying across Production
To bind this system to production ownership and kick off the final operating system deployment phase, we execute the direct master commands:
maas admin machines allocate system_id=xttpfx maas admin machine deploy xttpfx
5. Advanced Telemetry Sort Tuning
When scaling out across hundreds of bare-metal servers, un-ordered logs introduce massive operational noise. We structure our reporting layout arrays by running native multi-parameter sorting matrices inside `jq` before building table views:
maas admin machines read | jq -r '(["HOSTNAME","SYSID","TAG","POOL","ZONE"] | (., map(length*"-"))),(sort_by(.tag_names[0],.pool.name,.hostname)[] | [.hostname,.system_id,.tag_names[0],.pool.name,.zone.name]) | @tsv' | column -t