feat(atlas): Add the atlas-deployer CLI - #231
Merged
Merged
Conversation
atlas-deployer builds one Atlas bench in a Firecracker VM on a bare metal host and manages it after that. It replaces the manual steps around setup.sh with create, start, stop, restart, status, ssh, logs, setup, resize, and destroy. The VM belongs to the systemd unit atlas-pilot-vm.service, and the unit runs a generated network script for the tap device and the firewall rules, so one file owns the host network. The state in /var/lib/atlas-vm/deployer.toml holds the resolved settings that every command after create reads. Configuration moves from atlas-vm.env to atlas-deployer.toml. The CLI renders the pilot, atlas, and image values into /root/atlas-vm.env in the guest, which setup.sh still reads. Each [[image]] table adds one guest image, and setup.sh builds every variant as a site file. setup.sh gives the bench user a uv-managed Python 3.14 before it installs Pilot. Ubuntu 24.04 ships Python 3.12, which cannot parse the Atlas sources, and Pilot validates an app with the interpreter that runs it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NSMPtPvysvhQ9pHQ8ttApK
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NSMPtPvysvhQ9pHQ8ttApK
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NSMPtPvysvhQ9pHQ8ttApK
The deployer wrote /root/atlas-vm.env into the image it built, so every guest disk carried the site password for its whole life. The deployer now gives the file to the guest for one setup run and deletes it, with setup.sh, when the run ends. Also drop --verbose. A healthy boot stays quiet, and a boot that never reaches Secure Shell still reports the last console lines. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NSMPtPvysvhQ9pHQ8ttApK
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NSMPtPvysvhQ9pHQ8ttApK
Contributor
|
The deployer wrote raw key=value lines, and setup.sh sources them. A password with a space became a command, and a metacharacter changed what the shell ran. Every value is now quoted shell, and setup.sh quotes the password again for the login shell that `su -` starts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NSMPtPvysvhQ9pHQ8ttApK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
atlas-deployerbuilds one Atlas bench in a Firecracker VM on a bare metal host and manages it after that. It gives a fresh machine a working Atlas control plane with one command.What changed
scripts/atlas-vm/atlas_deployer.py, a Python CLI withcreate,start,stop,restart,status,ssh,logs,setup,resize, anddestroy.createinstalls it as/usr/local/bin/atlas-deployer.atlas-pilot-vm.service. The unit runs a generatednetworkscript on start and stop, so the tap device and the firewall rules have one owner.atlas-vm.envtoatlas-deployer.toml. The CLI renders the[pilot],[atlas], and[[image]]values into/root/atlas-vm.envin the guest, whichsetup.shreads.setup.shbuilds one guest image for each[[image]]table, and publishes every image as a site file.setup.shgives the bench user a uv-managed Python 3.14 before it installs Pilot.resizechanges the vCPU count, the memory, and the disk, then grows the guest file system. A disk can only grow.scripts/atlas-vm/README.md.