feat(deploy): add deploy vps command - #141
Merged
Merged
Conversation
Deploy an SSH-able VPS on a processor without an acurast.json: vendors the app-tunnel/cargo example (Shell runtime, dropbear over the Acurast reverse tunnel) as a CLI-shipped template and synthesizes the project config from flags, VPS_* env vars, or an interactive wizard (precedence in that order). - extract executeDeployFlow from the deploy action so both commands share signer/balance/pricing/submission logic - enable positional options so flags shared with `deploy` (--dry-run, --min-memory, ...) reach the subcommand - image aliases: ubuntu24 (noble, default) / ubuntu25 (questing), pinned proot-distro tarballs with sha256 - SSH auth: password and/or authorized key (SSH_AUTHORIZED_KEY written to authorized_keys by the template's start.sh)
DevTools log forwarding only works for NodeJS runtimes — the Shell (cargo) runtime has no snippet to inject, so the post-deploy hint was misleading. Since the tunnel hostname is generated on the processor and there is no remote log access, a missing callback URL makes the SSH connect command unrecoverable: warn, and in interactive mode require confirmation before deploying without one.
executeDeployFlow decided whether to wait for EnvironmentVariablesSet by checking config.includeEnvironmentVariables. `deploy vps` passes env vars directly without listing them there, so the CLI exited right after processor acknowledgement — killing the SDK's in-flight setEnvVars submission. The processor never received NETWORK / SSH_PASSWORD / CALLBACK_URL and the tunnel app aborted on startup.
Wizard answers are written as VPS_* variables (existing lines updated, rest of the file preserved), so subsequent runs pre-fill from the environment and skip the questions. Prompt only appears when the wizard actually asked something.
The non-interactive benchmark gate returned before the dry-run exit, so `--dry-run --non-interactive` with filters never printed "Dry run, not deploying" (e2e scenario 07 failure). A dry run submits nothing — skip the abort.
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
Adds
acurast deploy vps— deploy an SSH-able "VPS" on an Acurast processor with a single command, noacurast.jsonrequired:acurast deploy vps --image ubuntu24 --min-memory 2GB --min-storage 10GB \ --min-compute-score 100 --authorized-ssh-key "ssh-ed25519 AAAA..."start.shgains optionalSSH_AUTHORIZED_KEY→authorized_keysinstallation (password auth stays enabled).buildVpsConfig.tsfrom flags >VPS_*env vars (.envsupported) > interactive wizard (@inquirer/prompts).ubuntu24(noble, default) /ubuntu25(questing) → pinned proot-distro tarballs with sha256.executeDeployFlowfrom thedeployaction so both commands share signer/balance/pricing/submission/progress logic (behavior-preserving refactor).deploy(--dry-run,--min-memory, …) reach the subcommand instead of being consumed by the parent.--callback-url(e.g. webhook.watch) receives thestartedevent with the exact SSH connect command; otherwise it's in the deployment logs (acurast devtools <id>).Testing
test/buildVpsConfig.test.ts— 11 new unit tests (env precedence, flag mapping, alias table, validation errors, schema acceptance); full suite 63/63 green.07-deploy-vps-dry-run.sh+vps.exp: non-interactive flags,VPS_*env vars, and the interactive wizard through a pseudo-tty, all with--dry-run.deployregression (flags before/after positional arg) verified.