syntheses:vps-create-flow
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| syntheses:vps-create-flow [17/07/2026 02:52] – created - external edit 127.0.0.1 | syntheses:vps-create-flow [03/08/2026 23:16] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== VPS Creation / Provisioning Flow ====== | ||
| - | |||
| - | ===== Notes ===== | ||
| - | |||
| - | End-to-end flow: customer clicks Create Server → validation → guest created in DB → HostCommand queued → HostDaemon executes on compute host → VPS starts running. | ||
| - | |||
| - | ===== Repository ===== | ||
| - | |||
| - | * **Source:** '' | ||
| - | * **API layer:** Product/ | ||
| - | * **Domain layer:** Product/ | ||
| - | * **Persistence: | ||
| - | * **Host commands:** Product/ | ||
| - | |||
| - | ===== Flow Summary ===== | ||
| - | |||
| - | # ''' | ||
| - | Accepts a '' | ||
| - | Delegates to '' | ||
| - | |||
| - | # ''' | ||
| - | 1. Fetches the customer via '' | ||
| - | 2. Checks '' | ||
| - | 3. Calls '' | ||
| - | - '' | ||
| - | - '' | ||
| - | - DTO validation via '' | ||
| - | - Plan is active ('' | ||
| - | 4. Calls '' | ||
| - | 5. Starts a '' | ||
| - | 6. Calls '' | ||
| - | 7. Forces '' | ||
| - | 8. Processes payment if the guest has a blocking invoice ('' | ||
| - | 9. Returns an '' | ||
| - | |||
| - | # ''' | ||
| - | 1. Checks '' | ||
| - | 2. Checks '' | ||
| - | 3. Validates private IP if specified ('' | ||
| - | 4. Validates split-nics requires VPC | ||
| - | 5. Calls '' | ||
| - | 6. Calls '' | ||
| - | 7. Sets port block, IPv6, split-nics, next duration, SSH keys, etc. | ||
| - | 8. Calls '' | ||
| - | 9. Optionally assigns a specific private IP (VPC) | ||
| - | 10. Calls '' | ||
| - | 11. Handles referral code logic | ||
| - | 12. Flags as unreviewed at 10th server (fraud prevention) | ||
| - | 13. Calls '' | ||
| - | |||
| - | # ''' | ||
| - | Creates a new Guest entity: | ||
| - | - Sets '' | ||
| - | - Generates unique name and hostname | ||
| - | - Generates rescue password | ||
| - | - Sets Host/ | ||
| - | - Calls '' | ||
| - | - Calls '' | ||
| - | - Sets status to '' | ||
| - | |||
| - | # ''' | ||
| - | 1. '' | ||
| - | 2. '' | ||
| - | 3. '' | ||
| - | 4. '' | ||
| - | 5. '' | ||
| - | 6. '' | ||
| - | 7. '' | ||
| - | |||
| - | # ''' | ||
| - | Creates a '' | ||
| - | - Sets email password, SSH keys, deployment script, user data | ||
| - | |||
| - | ===== HostCommand Execution (Guest actually starts) ===== | ||
| - | |||
| - | The '' | ||
| - | |||
| - | # '' | ||
| - | 1. Checks for blocking commands via '' | ||
| - | 2. Validates customer has permission | ||
| - | 3. Commits the command to '' | ||
| - | |||
| - | # '' | ||
| - | Persists the command. The HostDaemon on the compute host polls for new commands. | ||
| - | |||
| - | # ''' | ||
| - | Receives the '' | ||
| - | |||
| - | # '' | ||
| - | |||
| - | ===== Data/State Transitions ===== | ||
| - | |||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | |||
| - | ===== Key Entities ===== | ||
| - | |||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | |||
| - | ===== Failure Points ===== | ||
| - | |||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | * ''' | ||
| - | |||
| - | ===== Related Wiki Pages ===== | ||
| - | |||
| - | * [[syntheses/ | ||
| - | * [[syntheses/ | ||
| - | * [[syntheses/ | ||
| - | * [[wiki: | ||
| - | |||
| - | ===== Open Questions ===== | ||
| - | |||
| - | * How does the Guest actually transition from Building to Running? Is it HostDaemon that sets the status, or is there a callback mechanism? | ||
| - | * What happens if HostDaemon fails during guest creation? Is there a retry/ | ||
| - | * How does the billing invoice get finalized? Is there a separate payment flow? | ||
syntheses/vps-create-flow.1784256735.txt.gz · Last modified: by 127.0.0.1
