prompts / one-click-app.md
edit FILL IN & copy this prompt →513 words

Prompt: deploy a one-click app (GitLab and friends) at your subdomain

Have an agent deploy an app from the ird catalog on a dedicated server at <subdomain>.<your domain> — DNS and TLS automatic — handle the one-time root password correctly, wait for it to come up, and know how to remove it.

Needs: ird access (MCP server or the ird CLI, logged in); a zone hosted on ird DNS; an SSH key on the account (ird vps ssh-keys add) Costs: hourly at the chosen tier's normal VPS price until the server is destroyed (vps_tiers) Group: servers

Paste everything below the line into a fresh conversation. Fill in the FILL IN block first.


Task

Deploy APP at SUBDOMAIN.ZONE on the smallest eligible tier (unless I say otherwise), give me the credentials once, and tell me when it is reachable.

FILL IN

APP:        gitlab            # a catalog app (see apps_catalog), e.g. gitlab
ZONE:       example.ro        # zone hosted on ird DNS
SUBDOMAIN:  git
TIER:       smallest eligible # or a tier id
SSH_KEY:    laptop            # name or id from `ird vps ssh-keys`

Non-negotiable rules

  1. Price before deploy. Show the tier, hourly price and hourly × 730, wait for a yes.
  2. The root password is shown once and never stored by ird. Relay it to me immediately and verbatim the moment apps_deploy returns, tell me to change it after first login, and don't write it to any file.
  3. Deploy once. apps_deploy blocks until the server is provisioned. On a timeout check apps_list before anything else; never call deploy twice for the same hostname.
  4. Poll gently. After deploy, apps_get at most once a minute, for at most 15 minutes; then report the state and stop.

Steps

A. Catalog. apps_catalog (CLI: ird apps catalog) → the entry for APP: its app_id (e.g. ird_gitlab) and eligible_tier_ids. vps_tiers → prices; choose TIER. dns_list_zones must include ZONE; apps_list must not already have SUBDOMAIN.ZONE. ird vps ssh-keys → key id.

B. Confirm with me.

C. Deploy. apps_deploy(app_id, zone=ZONE, subdomain=SUBDOMAIN, tier_id, ssh_key_ids=[id]) (CLI: ird apps deploy SUBDOMAIN.ZONE --app <app_id> --tier … --ssh-key …). A zone marked sensitive needs a totp_code from me. Nothing is charged on a capacity error — report and stop.

D. Relay the credentials (rule 2): url, root_password, the server's IP and id.

E. Wait for it. apps_get(deployment=SUBDOMAIN.ZONE) → dns_state and boot progress. Reachable when the URL answers over HTTPS with the app's login page (first boot of GitLab takes several minutes; the certificate is issued once DNS resolves).

F. Verify. curl -sI https://SUBDOMAIN.ZONE → 200/302 from the app; dig +short SUBDOMAIN.ZONE = the server IP; ssh root@<ip> with SSH_KEY works (for backups/upgrades later).

G. Removal (only when I name the deployment): apps_destroy(deployment=<hostname or id from apps_list>) (CLI: ird apps destroy SUBDOMAIN.ZONE) — destroys the server, all app data, and the managed DNS record; billing stops. Irreversible.

Deliverable

The app URL, instance id, IP, tier, monthly cost, where the root password was relayed (chat only), the current state from apps_get, and the destroy command for later.

static mirror of HEAD · about · clone: git clone https://ird.cod-sursa.ro/prompts.git