feat(scale): implement scale dns + scale down (DNS management + strategy-based teardown)#232
feat(scale): implement scale dns + scale down (DNS management + strategy-based teardown)#232wjgong001 wants to merge 3 commits into
Conversation
…ldest/random) Replaces the [stub] with a real implementation: - --instances to control how many to destroy (default 1) - --provider to filter by cloud provider - --all to destroy every running instance - --strategy: cheapest | oldest | random (default: cheapest) - --dry-run to preview without changes - Reports hourly savings and remaining fleet state - Closes existing issue if applicable
|
Updated with scale down implementation: feat(scale): implement scale down with strategy selection
This was the last remaining stub in the Still stubs: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
22 similar comments
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
|
🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: |
Summary
Implements the
sh1pt scale dnscommand group with three sub-commands for managing DNS records on deployed fleets.Changes
packages/cli/src/commands/scale-dns.ts— Full DNS command implementationpackages/cli/src/commands/scale.ts— Replaced the old stub withscaleCmd.addCommand(dnsCmd)+ updated hint in scale up commandFeatures
sh1pt scale dns list— Shows current DNS records from the configured providersh1pt scale dns set <hostname>— Point a domain/subdomain to a fleet IP (auto-resolves from state or via--ip)sh1pt scale dns remove <hostname>— Remove a DNS record by hostnameSupported DNS Providers
dns.cloudflare.apiToken+dns.cloudflare.zoneIdin credentials)dns.vercel.apiTokenin credentials)dns.namecheap.apiKey+dns.namecheap.emailin credentials)Flags
--dry-run— Preview changes without execution--json— Machine-readable JSON output--provider <name>— Select provider (default: cloudflare)--ttl <seconds>— DNS TTL (default: 60)--proxied— Cloudflare-only: route through CF edge--ip <address>— Explicit IP forsetcommand (default: first fleet IP from state)Credentials Format
DNS provider config is read from
~/.sh1pt/credentials.jsonunder thednskey:{ "dns": { "cloudflare": { "apiToken": "...", "zoneId": "..." }, "vercel": { "apiToken": "..." }, "namecheap": { "apiKey": "...", "email": "..." } } }TypeScript
Passes
tsc --noEmitcleanly. Follows existing code patterns (Commander.js, kleur, same import style, same error handling).