Skip to content

Add pegasus server create for Hetzner provisioning#36

Draft
czue wants to merge 7 commits into
mainfrom
hetzner-poc
Draft

Add pegasus server create for Hetzner provisioning#36
czue wants to merge 7 commits into
mainfrom
hetzner-poc

Conversation

@czue

@czue czue commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds pegasus server create command that provisions a Hetzner Cloud server
  • Auto-detects SSH keys from ~/.ssh/, uploads to Hetzner if needed
  • Stores Hetzner API token in ~/.pegasus/hetzner_credentials (same pattern as Pegasus API key)
  • Optionally updates config/deploy.yml with the new server IP for Kamal deployments
  • Bumps Python requirement from 3.9 to 3.10 (3.9 is EOL)

Usage

pegasus server create my-app-production
pegasus server create my-app --server-type cx32 --location fsn1 --image ubuntu-22.04

New dependencies

  • hcloud — official Hetzner Cloud Python SDK
  • pyyaml — already a transitive dep via cookiecutter, now explicit

Test plan

  • 46 tests passing (14 new)
  • Manual test with real Hetzner token — create server, verify SSH access
  • Verify Kamal config auto-update with a real Pegasus project
  • Test the token prompt flow end-to-end

🤖 Generated with Claude Code

czue and others added 7 commits February 27, 2026 11:28
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from yaml.dump (which rewrites entire file) to string
replacement, preserving comments and formatting. Also clean up
token stripping in the prompt flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant