Repository navigation
Conversation
Fleetbase Cloud's API registers itself with the Registry Service as the one cloud instance and acts for each company, and the console can be frozen for the cutover window. - REGISTRY_CLOUD_AUTO_REGISTER=true with REGISTRY_CLOUD_PLATFORM_SECRET: registry:init (boot), the scheduler (every five minutes) and registry:cloud-register register this API through POST /v1/instances/register/cloud, signed with the platform secret. Idempotent across restarts and replicas: a stored token the service accepts is kept, one process registers at a time (cache lock, then a fresh read of the settings), the service rotates the same instance (D17), and an unreachable service never triggers a registration. registry:init never fails the boot. - The instance kind is cloud whenever auto-registration is on. On a cloud instance every instance request names the company (X-Registry-Tenant: the session's company, or the installer job's), and instance state is cached per company; the public catalog is still cached once. - Install reports are for the installing company, and on the cloud instance every uninstall releases that company's seat. - registry:cloud-sync-installs: after the cutover import, record locally what each company had installed (GET /v1/instances/me/tenant-installs), so consoles keep loading their engines. - registry:maintenance on|off|status (stored setting) or REGISTRY_MAINTENANCE=true: checkout, install, update and uninstall from the console answer 503 with the message, and the Extensions pages show it as a banner (four locales). The server CLI is not frozen. - Fixtures recorded from the service (record_cloud.py).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5, Workstream O (cloud migration): the cloud console's side of the cutover. Service side and runbook: fleetbase/registry (
docs/cutover.md); infra: fleetbase/registry-infra#2.Cloud instance identity
REGISTRY_CLOUD_AUTO_REGISTER=trueandREGISTRY_CLOUD_PLATFORM_SECRETset, the API registers itself with the service as the one cloud instance: on boot (registry:init, which deploy scripts already run), every five minutes from the scheduler, and on demand withregistry:cloud-register [--force] [--json]. The request is signed with the platform secret (X-Registry-Timestamp,X-Registry-Nonce,X-Registry-Signature: v1=<HMAC-SHA256 of "{ts}.{nonce}.{body}">).registry:initnever fails the boot.cloudwhenever auto-registration is on.Per-company requests
X-Registry-Tenant(the session's company, or the installer job's company viaRegistryClient::forCompany()), so Purchased, Installed, counts, install reports and checkout belong to that company's organization on the service. Instance state is cached per company; the public catalog is still cached once. The company's name goes along so the service can name an organization for a new company (looked up through a resolver the provider sets, so support classes stay database-free).registry:cloud-sync-installs [--dry-run]: the cutover step that records locally (registry_service_installs) what each company had installed, from the service's import (GET /v1/instances/me/tenant-installs). Without it, cloud consoles would stop loading every engine installed before the move: v0.2.0 reads installed engines only from that table, and nothing filled it from the old installs.Maintenance freeze
php artisan registry:maintenance on|off|status [--message=](a stored setting that reaches every worker on its next request) orREGISTRY_MAINTENANCE=true: checkout, install, update and uninstall from the console answer 503 with the message. The server CLI is not frozen, so operators can still fix things.maintenance, checkout is reported unavailable while frozen, and every Extensions page shows a banner (RegistryMaintenanceBanner, anInfoBlock) with the message; the installer and purchase services say why instead of opening their modals. Copy in four locales.Tests
previous_token, no registration while the service is down, two replicas registering once,--force, disabled without both settings, refusal fails the command but not the boot; tenant headers, per-company caching, reports and seats, the install sync with pagination and unknown companies, the freeze settings and command). Fixtures recorded from the service (record_cloud.py, README updated). php-cs-fixer clean on the changed files.ember test --filter "/registry-maintenance-banner|registry-context|extension-installer|extension-purchase/"): 30 of 31 pass, including the 4 new tests (banner, context getters, installer and purchase refusals). The one failure,modals/extension-purchase-status: each phase after the checkout redirect, is pre-existing and unrelated: the test sets options withoutreceiptUrland then asserts the receipt link (from 991ca5a); neither the component nor its test is touched here.