Deploy & instances
Two steps, kept apart on purpose:
- Deploy makes a version of your package available on a cluster. Nothing of your app runs yet.
- Create an instance starts one running copy in one organization. Its
initruns once, with that instance’s init arguments, so every organization that uses your app starts from its own state.
- 01 · Registrynotes 1.2.0Your signed package, com.acme.notes.
- 02 · DeployInstalled on the clusterEvery node fetches it and checks the signature.
- 03 · Instancenotes · your orginit {"title": "Team notes"}
- 04 · Instancenotes-globex · globexinit {"title": "Globex notes"}
Deploy a version
Section titled “Deploy a version”- In the console, open Deploy an app and pick the package: one of your organization’s private packages, or a public one from the registry.
- Name the app and pick the version.
- Choose where it runs: your organization’s shared cluster, or one of your dedicated clusters. The console shows the estimated cost.
- Press Deploy, then confirm with your passkey. Your browser installs the version on the cluster.
Deploying again with the same name is an upgrade, from the app’s page.
Create an instance for an organization
Section titled “Create an instance for an organization”On the app’s page, the Instances box lists the instances you created and creates new ones. For each one you pick:
| Field | What it decides |
|---|---|
| Organization | Where the instance lives and who reaches it. The app’s own organization (created with its first instance), a new organization (for example a customer’s), or one an earlier instance created. |
| Instance name | Its name on the cluster. |
| Init arguments | JSON your #[app::init] receives: this instance’s starting state. For an init(title: String), {"title": "Globex notes"}. |
Then confirm with your passkey: your browser creates the organization if it is new, and the instance in it. If the browser tab closes before the console hears back, running the same step again finds the instance it made rather than creating a second one.
Your app’s own frontend can create instances the same way with mero-js (createOrg, then createApp with
initArgs), for example when a new customer signs up. See Clients.
Upgrades
Section titled “Upgrades”An upgrade installs the new version and upgrades every instance in the app’s own organization, after one passkey confirmation. An instance in another organization is upgraded by that organization’s owner, so a customer decides when their instance moves. An app with no instance yet only installs the new version.