installer command group works on an installer blob: the blob that holds an organization’s installations of apps.
It installs a committed version of an app under an alias, upgrades it to a newer version, uninstalls it, removes its
record, lists what is installed and reads the log of what happened. What an installation, a status and the log are is
defined by the installer blob type; this group is the terminal’s way to ask for them.
The examples use the fictional Field Reports app, acme-corp/field-reports, installed by the installer
acme-corp/installed-apps as reports.
The commands
An installation is made and changed only by
install, uninstall and remove; the other two read.
Plan first, then confirm
Every command that changes an installation shows what it would do before it does it.install asks the platform for
its plan first: the lines it would act on, the limits the version needs, the
problems that would stop it, and a digest of what it would act on.
uninstall and remove send their call once without confirmation, and the platform answers with the lines it would act
on and their digest. The CLI never prompts. It prints the lines, and without --yes it refuses:
The first run of the Field Reports install, without --yes, is the dry run. It prints what --yes would do and writes
nothing to the installation:
(from 0.2.0), and a draft reads draft 0.3.0. A label or version that is not text, as a draft’s app.yaml
may give one, reads as missing, and the plan’s problems say why: a version is left out, as
Field Reports draft from acme-corp/field-reports, as reports-dev in acme-corp/installed-apps, and a label reads as the
app blob, acme-corp/field-reports. The lines under it are the platform’s, word for word. The limits block follows
them, cut in this sample: every limit the version needs, grouped under limits at <where>, each row ok or unmet
with what it needs and what the place has (Limits and problems
shows a whole one). All of it goes to stderr, so -q does not quiet it. The last line is the exact text
refused: pass --yes to <verb>, and the exit code is 1. Under --json stdout stays empty and the refusal is one JSON
document on stderr. Its code is APP_NOT_CONFIRMED, and confirm holds one entry: for install, the installation, the
plan’s lines and limits, whether the run created the installer blob, and the plan’s digest; for uninstall and
remove, the installation, its lines and their digest. A digest is in the entry only when the answer has one.
Run the same command with --yes to act. Nothing is carried over from the dry run: the --yes run asks again for what
it would do, prints it the same way, and in the same run sends its
digest as confirmed. It confirms what it prints then, so with
--version left out, a version committed since the dry run is the one it installs; name --version where the version
must not move. The digest covers only the gap between that print and the call: the platform plans again before it acts,
and when that plan differs, because a version was committed, an input or a limit’s value changed, or another operation
ran, nothing is done. The CLI prints the new plan the platform answers with, and ends with
refused: the plan changed while it was confirmed; nothing was installed (uninstalled, or removed), exit 1, code
PLAN_CHANGED.
A plan that reports problems is never acted on. The CLI checks problems before --yes, so INSTALL_HAS_PROBLEMS wins
even without it: the CLI prints each as problem: <text> on stdout, wrapped at 110 columns, and ends with
refused: N problems; nothing was installed, exit 1. --yes overrides nothing: a plan with a problem has no digest,
so there is nothing to confirm.
The CLI reads every field of an answer it would act on before it prints any of it. A plan, or with --yes the lines an
uninstall or remove would confirm, with a field missing or of another shape is refused API_TRANSIENT_ERROR,
cannot read the platform's answer: ...; nothing was installed (uninstalled, or removed), and no confirmed call
is sent. A platform refusal ends the run either way, so a field of another shape in one is read as absent and never
printed.
One write happens even without --yes: if the installer blob named by --installer does not exist, the CLI creates it,
private, and prints created installer blob acme-corp/installed-apps before it plans, because a plan is asked of a
revision. A second run finds it.
Following an operation
An install or an uninstall with--yes is asynchronous on the platform: the request answers installing or
uninstalling and a worker does the rest. The CLI follows the log once a
second, printing each message as it is written, and drains it once more when the installation leaves that status:
HH:MM:SS message in local time, with the level before the message when it is not info. The command
exits 0 when the installation ends ready (or uninstalled). It exits 1 with INSTALLATION_FAILED when it ends
failed, the reason being in the log, and an install that failed is run again with the same command. It gives up after
30 minutes with INSTALLATION_FOLLOW_TIMEOUT, and the installation carries on without it; the hint names
blobhub installer log <alias> --installer <org>/<blob> --follow, which picks the log up again.
Under --json, a failed install or uninstall puts the log’s error entries in problems, or its last five entries when
none is an error; a timeout puts its last five.
--input
install takes an input’s value from where you name it. --input is repeatable, and each form says where the value is
read from; none of them is a template.
A secret input such as
weather_key is given as env: so it never appears in a command line or a shell history. An
unset or empty variable is ENV_VAR_NOT_SET, naming the variable; a name given twice, an empty name, a missing =, an
env: naming no variable, an unreadable file or a document that does not parse is INPUT_ARGUMENT_INVALID. The CLI
never prints an input’s value, in text or in --json. What the inputs are, and how a document is checked against its
schema, is in app.yaml.
An input holding a value JSON cannot carry is VALUE_NOT_JSON, refused before any request, the installer blob’s
creation included. The message names the value by its path and never carries it:
- A YAML document that holds itself, an alias inside its own anchor, is refused as the file is read, naming the
file and the path of what holds itself:
--input config: envs/acme.yaml: regions: holds itself. An alias outside its own anchor is sent as a copy of what the anchor holds. - A lone surrogate in a string or a key, from a document’s
\uXXXXescape of one or an argument or variable whose bytes are not UTF-8, is refused in the platform’s words, naming its path:inputs.config.city: a lone surrogate is not valid UTF-8. A key that holds one is written escaped in the path, as the plan writes it. A surrogate pair, in JSON or YAML, such as"\ud83d\ude00", is one character, and is sent as that character. - NaN or an infinity, such as YAML’s
.nan(inputs.config.ratio: is not a finite number), a non-string key, such as a number, a value of no JSON type, such as a YAML!!setor!!binary, and an integer too large to write are refused by their path too.
!!omap or !!pairs is sent as JSON sends it, an array of [key, value] arrays, so a path names an entry by
its index: inputs.<name>.<key>[0][1] is the value of its first entry.
On an upgrade, give only what changes: the installation remembers its documents, and a secret whose credentials exist
counts as given.
Who installs
Installing creates the app’s service accounts and stores its credentials, and both need a person behind the request (Access). So the first install, and any upgrade that adds an account or a credential, runs under a person’s key, with ADMIN on the installer blob and on its organization. An upgrade that adds neither can run in CI under a service account’s key, with no new account or credential:person_required, and nothing is written. The first install of Field Reports, run that way:
this install stores credentials weather and blobhub on reports-runner, and a caller that is neither a person nor a
service account reads this request does not come from a person
(Problems).
An app a person may not see, or that does not exist, is the platform’s 403, which the CLI reports as
BLOB_NOT_ACCESSIBLE. So is an uninstall that retires an account, sent with a service account’s key. The CLI names no
cause of its own: the message is what was refused, such as
cannot install acme-corp/field-reports into acme-corp/installed-apps: or
cannot uninstall in acme-corp/installed-apps: , then the platform’s own message, or
the platform refused (HTTP 403) without a message when it gives none. A private app is shared by adding the person,
or the service account, as a member of the app blob with READ.
Options shared by the group
See also
- Installer blob type — installations, the log, access and refusals.
planandinstall— the operations behindinstall.- Apps — what an app is and its lifecycle: install, upgrade, uninstall and remove.
blobhub app push— installs a draft as a development installation.- Error codes — every code these commands can raise.

