本文へ移動
cccskills
無料GitHub で公開

new-deployment

Bring up a NEW MeshWeaver instance the ONLY sanctioned way: a Hosting/Deployment record in the estate's private deployments repository, provisioned by the control instance's Hosting plugin (a Provision InstanceAction on the control instance) — never kubectl, never deploy.sh, never the ACR image: images come from the fleet's own registry cr.meshweaver.cloud. Use when standing up a customer/internal portal, when a Provision refuses or fails, or when auditing whether an instance is wired the way its record says. Covers the human-done prerequisites (Entra app, registry instance key, db-connection secret, a tag present in cr), what the operator's Provision plan does in what order, the refusals that are ANSWERS not errors, and the traps that read as success.

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaverスター 12(GitHub 12 + cccskills 0)
連携ツールKubernetesPostgreSQL

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md11.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

/new-deployment — a new instance is a record, provisioned by the control instance

A deployment is one Hosting/Deployment record — mesh/Deployments/<id>.json in the estate's PRIVATE deployments repository — that the control instance (e.g. https://control.example.com, its own record carrying operator.enabled: true) turns into a namespace, a database, DNS, a Helm release and a certificate when a global admin files a Provision action against it. Everything else — cluster, ingress, Postgres server, Key Vault, the registry, observability — already exists and is shared.

🔒 The inventory is private. Hosts, namespaces and database names live in the estate's private deployments repository (mesh/Deployments/*.json, its inventory, the Deployments tab) — see "Where an estate's instances are declared" in Instances.md. The public MeshWeaver repo carries the mechanism (chart, operator scripts, the Hosting plugin's sources) and must never carry who runs what.

🚨 The maintained runbook is docs/new-deployment.md in the estate's private deployments repository. It is authoritative wherever it and this page disagree; this page is the map, not a copy of the commands.

Where the work happens — and where it does not

whohow
the recorda human, by PRmesh/Deployments/<id>.json (GitSynced to the portals; a mesh-side edit is written back as a PR by DeploymentGitSync)
secrets an instance cannot mint for itselfa human, onceKey Vault <vault>, names <keyVaultSecretPrefix><Section>-<Key>
namespace, database, identity, DNS, pull secret, release, TLSthe operator, from the Provision plana Hosting/InstanceAction node on the control instance
the clusternobody by handkubectl is not part of this procedure; a step that needs it is a defect in the lane, file it

1. What a human does first

Every one of these is a prerequisite the Provision REFUSES without, so do them before filing it. <prefix> is the record's keyVaultSecretPrefix.

  1. The sign-in app (multi-tenant; invitation-only is the gate, not the audience): az ad app create --display-name "<Name> Portal (<host>)" --sign-in-audience AzureADMultipleOrgs --web-redirect-uris https://<host>/signin-microsoft, then az ad sp create --id <appId>, then the client secret into the vault as <prefix>Authentication-Microsoft-ClientSecret — through the record page's Set Key Vault secrets… dialog on the control instance (write-only; the governed writer identity stores it, policy secrets-write-only-entry, Doc/Architecture/SecretsWriteOnlyEntry), never a vault command of your own. The appId goes on the record as signIn.microsoftClientId. 🚨 az … credential reset PRINTS the secret on stderr: --query password -o tsv > "$S/x" 2>/dev/null, paste it from that file into the dialog, then rm. Never cat a stderr capture from a minting verb.
  2. The registry instance key — ONE key, two jobs (plugin catalog AND image pull): POST https://<plugin-registry-instance>/api/instances/register with {"bootstrapKey":"","instanceId":"<id>","displayName":"…","homeUrl":"https://<host>"} (open registration = the free plan; an admin raises it under Admin ▸ Instance grants). Paste .instanceKey into the same Set Key Vault secrets… dialog as <prefix>PluginCatalog-RegistryToken. hosting-kv-ensure lists this object as REQUIRED and refuses the whole Provision without it — "minting a random value here would produce an instance that boots, registers nothing, and shows an empty Store with no error".
  3. The database connection string — <prefix>db-connection (InstanceSpec.DatabaseSecretName), composed from the shared admin password in vault object memex-postgres-password: Host=<pg-server>.postgres.database.azure.com;Port=5432;Username=<pg-admin>;Password=…;Database=<db>;SslMode=Require;Trust Server Certificate=true. FQDN, never an IP — Azure moves the backing instance and DNS follows it. Mapped on the record's keyVaultSecrets.secrets as ConnectionStrings__memex.
  4. An image tag that EXISTS in cr.meshweaver.cloud. imageRepository: cr.meshweaver.cloud/memex-portal-ai, pinnedImageTag: <tag> — a first install with no pin is REFUSED by hosting-deploy ("Pin an image tag on the Deployment record for the first install"). If the tag is not in cr yet (CD pushes to ACR), copy it there as the registry's publisher account: crane copy meshweaver.azurecr.io/memex-portal-ai:<tag> cr.meshweaver.cloud/memex-portal-ai:<tag> and the same for memex-migration (the migration image is DERIVED by replacing memex-portal-ai → memex-migration; both must be present).
  5. The record itself, by PR, with (a sibling record is the worked example): imagePullSecret: registry-pull; volumes[] for data/content/attachments/users with claimName, mountPath, size, storageClass: azurefile-memex, accessMode: ReadWriteMany and create: true — the chart creates the claims; without create a new instance gets emptyDir and every restart wipes it; keyVaultSecrets naming the three vault objects above plus <prefix>Ai-KeyProtection-MasterKey (GENERATED by hosting-kv-ensure, never regenerated — it seals every stored enc: provider key); pluginRepos[0] = { name: "Plugins", url: "https://<plugin-registry-instance>" } (the name is the REGISTRY's name, never the instance's — a bare preInstall id is qualified against it and the catalog FAILS CLOSED on a mismatch); preInstall: ["Essentials"]; updatePolicy: Stable for a customer; extraPortalConfig with Hosting__Deployment: <id> and Hosting__ReportTo: https://control.example.com (the control instance). Gates that read it: check-record-renders-overlay.py (record ↔ values.<release>.public.yaml, extraPortalConfig one way, keyVaultSecrets both ways), check-image-pins.py (resolves every pin — cr.meshweaver.cloud pins need MW_REGISTRY_KEY), config-key-coverage.

2. What the operator does — the Provision plan, in order

Composed by InstanceActionPlan.ProvisionSteps (MeshWeaver.Plugins, in-mesh — it compiles in the portal, no CI type-checks it), run by MeshWeaver.Plugins/deploy/hosting-operator/bin/run.sh in a Job in memex-ops, fail-fast, the failing STEP named on the node:

  1. az postgres flexible-server db create — control plane, workload identity. (Memex#132 — PGPASSWORD has no secret channel — blocks Backup/Suspend/Teardown/Restore, not this.)
  2. hosting-kv-ensure — generates the master key, REQUIRES the registry token.
  3. hosting-federate — federated credential, subject exactly system:serviceaccount:<ns>:memex-portal-sa; a mismatch does not error, it silently stops self-update tag discovery.
  4. hosting-dns upsert — the A record at the shared ingress IP. DNS BEFORE TLS: HTTP-01 needs it.
  5. hosting-pull-secret — ensures the namespace, turns the vault's registry token into the kubernetes.io/dockerconfigjson Secret named by imagePullSecret, reads it back, never prints the key.
  6. hosting-deploy --image <imageRepository>:<pinnedImageTag> with values rendered from the record (HelmValues) — the chart is BAKED INTO THE OPERATOR IMAGE, so the control record's operator.image (meshweaver.azurecr.io/hosting-operator:<short sha>, published on every push to MeshWeaver main) decides which chart deploys. A stale operator image deploys a stale chart.
  7. rollout wait → 8. hosting-tls (waits for the Secret to carry a key pair) → 9. hosting-verify → 10. hosting-verify-catalog (the expected mounts and packages, so an empty Store cannot read as healthy).

3. Filing it

On the control instance (through its own MCP server), create under Deployments/:

{ "id": "<id>-provision", "namespace": "Deployments", "nodeType": "Hosting/InstanceAction",
  "name": "Provision <id>", "content": { "$type": "InstanceActionContent",
  "deployment": "Deployments/<id>", "requestedAction": "Provision",
  "confirmation": "<id>", "dryRun": true, "reason": "…" } }

Dry run first — Authorize → Read record → Plan → "Dry run — nothing changed" prints the composed step list on the node's log; a refusal here (state: Refused, error naming the field) is the ANSWER, not an error to retry. Then the real one (dryRun: false). Read state/phase/message and the log on the node; a failed step names itself and the plan is idempotent from the top, so fix the cause and file again.

4. After it answers

  • A cold instance recompiles every dynamic NodeType. The startup budget on the record (startupProbe.budgetSeconds, 3 h on the siblings) exists for this; a pod 0/1 during the bake is the gate doing its job. Do not cycle pods while it warms.
  • Register the GitHub Environment and a deployments entry in the estate's private deployments repository, add the inventory row (see "Where an estate's instances are declared" in Instances.md), set Admin/UpdatePolicy (Stable for a customer). A deployment nobody recorded is a deployment nobody will remember to patch.

🚨 Traps that read as success

  • HTTP 200 proves nothing. The Blazor shell answers 200 for an error page or a paywall redirect; hosting-verify checks rendered content — so should you.
  • Nobody can sign in is a perfectly healthy instance: every Authentication__*__ClientId empty and dev login off means it boots, passes probes, serves, and has nothing to authenticate against. Step 1 is not optional.
  • The chart ConfigMap emits only the keys it templates; a record extraPortalConfig key the chart has no line for reaches NO container, with no error. config-key-coverage is the guard.
  • kubectl set env is not a deployment. Helm's three-way merge never removes an inline entry it did not own; the record's inlineEnv exists to make such drift visible, not to bless it.
  • Never emit "" for an int/bool key — it fails binding, DI throws, the landing page dies.
  • A refused Provision with hosting-kv-ensure naming a missing vault object wants the object ISSUED (step 1.2), never a random value.
  • az prints minted secrets on stderr — see step 1.1; a leaked value is rotated in the same turn.

Related

  • /plugins — the registry the instance consumes packages from
  • /release — how images get built; a tag missing from cr is copied there by hand (step 1.4)
  • /deployment · /delete-user · /storm · /debug — operating a live instance
  • Design: ContainerRegistryInMemex.md (the registry as a separate service) · Memex#132 (the operator's PGPASSWORD gap)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

async

無料

Forwarding AccessContext through async/reactive boundaries, and the no-async rule on the actor-model mesh. Use when writing or reviewing any hub-reachable / Blazor-view / agent-round / IIoPool code that creates, reads, or updates a mesh node, OR when a write "silently does nothing" / "Access denied" appears after a .Subscribe / IIoPool / Observable.Create hop. The async/await/ToTask/.Wait/.Result/.GetAwaiter/FirstAsync family and lost AccessContext are the two ways async boundaries cause wedges and storms. Grounded in AsynchronousCalls.md, SyncedMeshNodeQueries.md, AccessContextPropagation.md.

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaver122026年10月29日 更新

ci

無料

What CI proves, what it cannot prove, and how to write a gate that cannot pass on no evidence. Use when authoring or changing a GitHub Actions workflow, adding a required check, wiring a satellite repo CI, or reasoning about whether a green run actually covers your change. Covers the absolute no-skip-trapdoor rule (a gate must never carry continue-on-error on its input step nor an if that asks whether a secret is set — GitHub paints a skipped job the same colour as a passed one), the reusable workflow_call jobs satellite repos must call instead of hand-rolling, why runs on main are deliberately never cancelled, and the large body of in-mesh C# that no dotnet build or test ever type-checks.

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaver122026年10月29日 更新

debug

無料

Debug a deadlock / hang / timeout in the mesh — a test that times out, a hub handler whose response never arrives, a GetRemoteStream / GetMeshNodeStream / GetQuery that never emits, an agent round or per-instance-hub activation that parks forever. Use whenever something times out and you need to find WHERE the message flow breaks down. The timeout is the symptom, never the bug — raising it just hangs longer. Grounded in DebuggingMessageFlow.md.

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaver122026年10月29日 更新

Remove / reset a user (and their partition) on a running MeshWeaver portal (AKS). Use when you need to kick out a user — e.g. a throwaway test account — so they re-onboard from scratch. The normal delete API REFUSES a user's home ("user partition root … cannot be deleted"), so deletion is a Postgres-schema drop, not an MCP call. Covers where a user's data actually lives (per-user PG schemas named by BOTH id AND email, e.g. `rbuergi` + `rbuergi@systemorph.com`), how to reach PG (the connection string is inline in the portal's `ConnectionStrings__memex` env — NOT the `POSTGRES_PASSWORD` secret), the substring-match footgun (`buergi` also matches admin `rbuergi`), the in-memory resurrection gotcha (a recycle re-saves the node — a portal restart is what actually clears it), and the half-onboarded case where the user has NO schema at all (in-memory only → restart is the whole fix).

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaver122026年10月29日 更新

deploy

無料

Deploy MeshWeaver — the two routes (shared AKS cluster, and Azure Container Apps via the Aspire test/prod modes) and the traps that make a deploy look done when it is not. Use when rolling a code change onto a portal, standing up or patching an environment, or verifying that what is running is what you built. FIRST RULE (maintainer, 2026-09-08): on AKS an operation is a Hosting/InstanceAction on the control instance (Roll, Restart, Suspend, Audit, Reconcile, …) executed by the in-cluster operator — az aks command invoke / kubectl are break-glass, never the procedure. Also covers the bootstrap build-image / set-image / restart sequence the operator runs for you, why an env deploy.sh is first-time setup and not a code-update path, why the database migration is a run-once Job that a helm upgrade runs — never a Deployment to roll — and the DbVersionGate that makes a portal refuse to serve ahead of its schema.

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaver122026年10月29日 更新

gui

無料

Build or review ANY MeshWeaver UI — layout areas, editable views, forms, tables, content editing, side-panel composers — by wiring the framework's EXISTING data-binding pieces, NEVER hand-rolling. The one rule is ALWAYS DATA-BIND, especially editable views: the backend layout area declares WHAT to render (a UiControl tree + node PATHS), and every value read / write-back happens on the GUI side through the per-node IMeshNodeStreamCache. Hand-woven binding — replicating a node into a /data/{id} copy + a save subscription, emitting HTML strings, hand-built selects/checkboxes, .Take(1) on a live stream, async/await/QueryAsync in a layout area — is the bug class behind "awaiting first data" / "renders empty" / a stuck editable view. Use when writing or reviewing a layout area, control, editor, form, table, or any data-bound view. Grounded in src/MeshWeaver.Layout/DataBinding/, Doc/GUI/DataBinding.md + Editor.md, the Edit extension (EditorExtensions.cs), and the node-bound editor controls.

日本語の概要は準備中です。原文の説明を表示しています。

Systemorph/MeshWeaver122026年10月29日 更新

Systemorph のスキルをすべて見る

このスキルの問題を報告する