Landing page deploy setup

From Vrooli/Vrooli · View interactive version

Landing page deploy setup is an AI agent skill from the GitHub repository Vrooli/Vrooli. Prepare a local `landing-page-business-suite` (LPBS) instance so `scenario-to-desktop` can deploy desktop artifacts through LPBS to a remote LPBS deployment.

How to use this skill

Skill file

Tools focus: Landing Page Deploy Setup

Prepare a local landing-page-business-suite (LPBS) instance so scenario-to-desktop can deploy desktop artifacts through LPBS to a remote LPBS deployment.

Required reading:

Optional reading:


1. When to Use This Tool

| Goal | Use this skill? | Notes |

|---|---|---|

| Prepare LPBS for desktop artifact deployment | Yes | This is the canonical setup flow |

| Build/package desktop binaries | No | Use scenario-to-desktop |

| Deploy LPBS to VPS | No | Use scenario-to-cloud |

| Run end-to-end release orchestration | No | Use landing-page-desktop-upload |


2. Scope Boundaries

In scope:

Out of scope:

Clarification:


3. Inputs

Required (base LPBS readiness):

LPBS_SERVICE_SECRET source-of-truth rule:

One deployment selector is required for Gate B health checks:

Additional requirement for Gate F (remote profile setup):

Optional (only when onboarding or validating a specific app entry):


4. Setup Workflow (Idempotent Gates)

Run gates in order. Do not skip a failing gate.

Primary-path rule:

```bash

landing-page-business-suite deploy-readiness \

--profile-tag {{PROFILE_TAG}} \

--domain {{DOMAIN}}

```

```bash

landing-page-business-suite deploy-readiness \

--profile-tag {{PROFILE_TAG}} \

--domain {{DOMAIN}} \

--app-key {{APP_KEY}}

```

Gate A: Ensure local LPBS is running
landing-page-business-suite --auto-start status

Pass condition:

Fallback lifecycle path (if needed):

vrooli scenario start landing-page-business-suite
landing-page-business-suite status

If vrooli scenario start ... exits non-zero during an in-progress restart, re-run landing-page-business-suite --auto-start status and continue only when it succeeds.

Gate B: Resolve remote LPBS API base

Preferred (domain known):

scenario-to-cloud deployment health --domain {{DOMAIN}} --scenario landing-page-business-suite

If this fails, follow scenario-to-cloud convergence flow first.

Agent handoff rule (when SSH bootstrap is interactive):

Remote API base for profile setup:

If no domain is available, discover deployment details:

scenario-to-cloud deployment list --scenario landing-page-business-suite

No-domain fallback convergence:

  1. From deployment list, pick one row (prefer status=deployed).
  2. If the row has a domain, set {{DOMAIN}} and run:

```bash

scenario-to-cloud deployment health --domain {{DOMAIN}} --scenario landing-page-business-suite

```

  1. If the row has no domain but has a host, set {{VPS_HOST}} and run:

```bash

scenario-to-cloud deployment health --host {{VPS_HOST}} --scenario landing-page-business-suite

```

  1. Do not continue to Gate F until an HTTPS API base is known (https://<domain>/api/v1).

Pass condition:

Quality rule:

```bash

scenario-to-cloud redeploy \

--domain {{DOMAIN}} \

--scenario landing-page-business-suite \

--if-needed --preflight --wait

```

Then re-run deployment health and continue only when freshness is current, or record explicit approved risk for known deterministic fingerprint drift.

Drift stop condition:

Operator override (only when a human explicitly requests immediate redeploy):

scenario-to-cloud redeploy \
  --domain {{DOMAIN}} \
  --scenario landing-page-business-suite \
  --force-run --preflight --wait
Gate C: Ensure local admin session

Run this gate when deploy-readiness reports admin session failure, or when you need to perform admin-only mutations.

landing-page-business-suite admin-session

If session is missing/expired:

landing-page-business-suite admin-login \
  --email <local_admin_email> \
  --password @/path/to/local-admin-password.txt

Pass condition:

Gate D: Ensure download storage is configured and reachable

Run this gate when deploy-readiness reports download storage failure, or when onboarding storage for the first time.

Inspect current settings:

landing-page-business-suite admin-download-storage-get

Validate connectivity:

landing-page-business-suite admin-download-storage-test

If not configured, update settings first:

cat > /tmp/lpbs-download-storage.json <<'JSON'
{
  "provider": "s3",
  "bucket": "<bucket>",
  "region": "<region>",
  "endpoint": "<optional-s3-endpoint>",
  "force_path_style": false,
  "default_prefix": "downloads",
  "signed_url_ttl_seconds": 900,
  "public_base_url": ""
}
JSON

landing-page-business-suite admin-download-storage-update \
  --body @/tmp/lpbs-download-storage.json
landing-page-business-suite admin-download-storage-test

Pass condition:

Gate E (Optional): Ensure a specific download app exists

Run this gate only when:

landing-page-business-suite admin-download-apps-list

If {{APP_KEY}} is missing and you intend to onboard it, create it:

cat > /tmp/lpbs-download-app.json <<'JSON'
{
  "app_key": "{{APP_KEY}}",
  "name": "{{APP_NAME}}",
  "description": "Desktop application"
}
JSON

landing-page-business-suite admin-download-apps-create --body @/tmp/lpbs-download-app.json

Pass condition:

Gate F: Ensure remote profile exists, is logged in, and passes test

Run this gate when deploy-readiness reports remote profile/session failure, or when onboarding a new profile.

List profiles:

landing-page-business-suite remote-profiles-list

Create profile if missing:

landing-page-business-suite remote-profiles-create \
  --tag={{PROFILE_TAG}} \
  --label=Production \
  --api-base=https://{{DOMAIN}}/api/v1

Selector-first rule:

Login + test:

landing-page-business-suite remote-profiles-login \
  --tag {{PROFILE_TAG}} \
  --email <remote_admin_email> \
  --password @/path/to/remote-admin-password.txt

landing-page-business-suite remote-profiles-test --tag {{PROFILE_TAG}}

Pass condition:

Gate G: Ensure `LPBS_SERVICE_SECRET` is set for deploy stage auth

Default safety rule:

Verify current state first:

scenario-to-cloud secrets verify LPBS_SERVICE_SECRET \
  --scenario landing-page-business-suite \
  --targets scenario,deployment \
  --domain {{DOMAIN}}

scenario-to-cloud secrets verify LPBS_SERVICE_SECRET \
  --scenario scenario-to-desktop \
  --targets scenario

If verify indicates missing/mismatch in either scope, sync using the canonical LPBS runtime value:

scenario-to-cloud secrets set LPBS_SERVICE_SECRET \
  --scenario landing-page-business-suite \
  --value <canonical_lpbs_service_secret> \
  --targets scenario,deployment \
  --domain {{DOMAIN}} \
  --restart

scenario-to-cloud secrets set LPBS_SERVICE_SECRET \
  --scenario scenario-to-desktop \
  --value <canonical_lpbs_service_secret> \
  --targets scenario

Pass condition:

Gate G.1 (required for unattended runs): verify auth gates (and re-verify secrets only if sync was applied)

landing-page-business-suite service-auth-status --require-enabled
scenario-to-desktop deploy-target test {{PROFILE_TAG}} --require-service-auth

If no deploy target exists for {{PROFILE_TAG}}, create one first:

scenario-to-desktop deploy-target add {{PROFILE_TAG}} \
  --scenario landing-page-business-suite \
  --profile {{PROFILE_TAG}} \
  --label Production

Pass condition:

Optional one-shot diagnosis for the same gate:

scenario-to-desktop deploy-target doctor {{PROFILE_TAG}}

5. Readiness Verification Bundle

Run this before handing off to deployment.

Path A (recommended when deploy-readiness already passed in the current run):

scenario-to-desktop deploy-target test {{PROFILE_TAG}} --require-service-auth

Path B (when deploy-readiness has not been run in the current run):

landing-page-business-suite deploy-readiness \
  --profile-tag {{PROFILE_TAG}} \
  --domain {{DOMAIN}}

# If validating readiness for a specific release, include:
#   --app-key {{APP_KEY}}

scenario-to-desktop deploy-target test {{PROFILE_TAG}} --require-service-auth

All executed commands must succeed.

5.1 Cleanup (required if temp files were created)

rm -f /tmp/lpbs-download-storage.json
rm -f /tmp/lpbs-download-app.json

6. Troubleshooting & Edge Cases

Use this section for long-tail operational failures and recovery paths.

| Symptom | Likely cause | Fix |

|---|---|---|

| admin session not configured | Missing/expired local admin session | Re-run admin-login |

| download storage not configured | Storage row missing/invalid | Run admin-download-storage-update, then admin-download-storage-test |

| download app not found for target release | {{APP_KEY}} not registered yet | Create app via admin-download-apps-create (requires {{APP_NAME}}) |

| remote-profiles-create returns 409 Remote profile tag already exists | {{PROFILE_TAG}} already exists | Run remote-profiles-list, select existing profile where tag == {{PROFILE_TAG}}, and continue with login/test using that ID |

| remote-profiles-list returns 500 | Legacy/invalid remote profile rows (for example connector_id is NULL) or server-side schema drift | Run vrooli scenario logs landing-page-business-suite --runtime; if logs show list_remote_profiles_failed, stop Gate F and hand off a data/code fix task before retrying |

| remote-profiles-create fails input validation for API base | api_base malformed or missing /api/v1 suffix | Re-run with --api-base=https://{{DOMAIN}}/api/v1 and follow the command's emitted Next steps guidance |

| Remote profile is not logged in / session expired | Remote cookie missing/expired | Re-run remote-profiles-login --tag {{PROFILE_TAG}}, then remote-profiles-test --tag {{PROFILE_TAG}} |

| remote-profiles-login returns 401 and later admin commands fail with admin session not configured | Remote login failure invalidated local admin session | Re-run admin-login, then retry remote-profiles-login and remote-profiles-test |

| deployment health is healthy but freshness is outdated | Deployed bundle fingerprint drift vs local scenario state | Run deployment health and follow the emitted Next step command first. If drift persists with healthy endpoint after one --if-needed convergence, record risk and hand off per scenario-to-cloud guidance |

| scenario-to-desktop deploy-target test {{PROFILE_TAG}} --require-service-auth fails OR deploy later fails with service auth 401/403 | LPBS_SERVICE_SECRET unset/mismatch in LPBS runtime scope or in scenario-to-desktop scope | 1) Run scenario-to-desktop deploy-target test {{PROFILE_TAG}} --require-service-auth and capture exact error. 2) Verify LPBS scope: scenario-to-cloud secrets verify LPBS_SERVICE_SECRET --scenario landing-page-business-suite --targets scenario,deployment --domain {{DOMAIN}}. 3) Verify scenario-to-desktop scope: scenario-to-cloud secrets verify LPBS_SERVICE_SECRET --scenario scenario-to-desktop --targets scenario. 4) Re-sync failing scope, then rerun Gate G.1 and continue only after both checks pass. |

Command timing note:


6.1. Update Policy Configuration (Optional)

LPBS supports per-app update policies that control auto-update behavior for desktop clients.

Default policy (applied automatically when an app is created):

To view an app's current policy:

curl -fsS "http://localhost:<port>/api/v1/admin/download-apps/{{APP_KEY}}/update-policy" \
  -H "Cookie: <admin_session>"

To update an app's policy:

curl -fsS -X PUT "http://localhost:<port>/api/v1/admin/download-apps/{{APP_KEY}}/update-policy" \
  -H "Cookie: <admin_session>" \
  -H "Content-Type: application/json" \
  -d '{"check_interval_hours": 12, "update_mode": "mandatory", "allow_downgrade": false}'

Note:


7. Guardrails


8. Output Expectations

May create/update:

Must not:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.