Running without questions
Any answer can be passed with a key. When all required values are passed, the installer asks nothing — this is the mode for deployment scripts.
Three modes that are easy to confuse
| Key | What it does |
|---|---|
|
Asks only what has no default. The confirmation screen remains. |
|
Asks nothing. If a value is missing, it stops with code 2 and lists the missing keys. The confirmation screen does not block. |
|
Walks the whole path and prints every command but executes none. When launched over ssh it applies to the target host: the wrapper copies the distribution and starts the installer for real, and the server-side run becomes the trial — the plan is built by the server. |
--non-interactive also enables -y.
The combination --non-interactive --dry-run is the usual way to check a command before a real launch.
Answers file
The simplest way to obtain a correct set of keys is to run the wizard manually once.
Each run writes a .params file with all collected values next to the log:
logs/install_20260101-120000.params
This file can be passed back to the installer:
bash era/scripts/install.sh --answers-file=logs/install_20260101-120000.params
Values from the file are substituted as answers; anything absent from it is asked.
They can be corrected on the confirmation screen: the "Change…" item returns to the selected screen, and on re-entry the wizard asks questions again — including about what came from the file or command line.
Previous values are substituted as defaults, so pressing Enter is enough until the required question.
A correction is marked in the summary with the corrected source.
Command-line keys override the file — convenient for changing one or two values:
bash era/scripts/install.sh --answers-file=srv1.params \
--ipaddress=192.168.0.11 --srvname=srv2 --non-interactive
The file can be written without installing anything: on the confirmation screen select "Save answers" or set --save-answers=<path>.
Passwords are stored in clear text in the answers file.
It is created with 0600 permissions. Do not put it in a repository and do not copy it to shared directories.
To keep passwords separately, use --secrets-file.
|
Ready repeat command
Every run, including a trial, writes a .cmd file — a non-interactive command with all values:
logs/install_20260101-120000.cmd
It is also printed at the end of installation, but there passwords are hidden.
In the file they are real, permissions — 0600.
This command is the working way to install ten identical servers: take it after the first installation and change the address and name.
If the servers belong to one system, there is no need to change the address manually: list them on screen 10 during master installation, and the installer will print a command for each — with the node role, mic address, and master database.
These commands are appended to the same .cmd file.
See era_installer/install-local.adoc#era-installer-install-local-addservers.
Ten servers
#!/bin/bash
set -euo pipefail
BASE="--answers-file=./srv-base.params --non-interactive"
while IFS=' ' read -r host ip name; do
printf '=== %s\n' "$host"
bash install_ssh.sh $BASE \
--host="$host" --user=user \
--ipaddress="$ip" --srvname="$name" \
|| printf 'FAILURE on %s, code %s\n' "$host" "$?"
done <<'HOSTS'
192.168.0.11 192.168.0.11 srv1
192.168.0.12 192.168.0.12 srv2
192.168.0.13 192.168.0.13 srv3
HOSTS
Check the script with --dry-run before launching for real: then each command shows its plan and changes nothing.
Return codes allow distinguishing the failure cause — see era_installer/reference-exit-codes.adoc#era-installer-exit-codes. Code 3 means prechecks failed and the server was not touched; code 5 — installation was interrupted midway and the server was partially changed.
Passwords separate from other answers
bash era/scripts/install.sh --answers-file=srv.params --secrets-file=/root/era.secrets
The secrets file format is the same key=value as the answers file, but it contains only passwords.
This way the main answers file can be stored next to the script, while passwords are taken from a location with restricted access.
/root/era.secrets file# Platform passwords. File permissions -- 0600.
pgerapwd=S3cret_era_pwd
pgpostgrespwd=S3cret_admin_pwd
# Needed only with replication (--usereplic=y).
pgreplicapwd=S3cret_replica_pwd
# Password of the system postgres user; set if you need it.
pgospwd=S3cret_os_pwd
Parsing rules are the same as for the answers file:
-
one
key=valuepair per line; -
the key is the parameter name from the reference "Name" column (
pgerapwd), not the command-line key (--pgerapwd); -
lines starting with
#and empty lines are skipped; -
spaces around
=are discarded, and the value is everything after the first=— a password may contain=but cannot start or end with a space; -
quotes are not needed and are not stripped:
pgerapwd="abc"sets the password together with the quotes.
Only keys marked as secret in the reference are accepted in the secrets file:
| Key | What password this is |
|---|---|
|
Password of the database user the platform uses ( |
|
Password of the |
|
Password of the replication user ( |
|
Password of the system |
The installer will not accept other keys and will say so: a non-secret parameter in the secrets file is almost certainly a mistake, and accepting it silently would hide it. Values from the secrets file have the same weight as those passed with a command-line key and override the answers file.
The file is read only by the installer; passwords do not get into the log — •••••• appears in their place.
It does not check or change file permissions: set 0600 yourself.
When installing over ssh, secrets are passed to the server separately: they are written to a temporary file under umask 077 and deleted after launch, including if installation was interrupted.
They do not appear in command-line arguments — otherwise anyone looking at the process list would see them.
What to check before a mass launch
-
--dry-runon one server: the plan matches expectations. -
Postfix uniqueness if another instance already exists on the server.
-
The
--ipaddressaddress exists on the target server. -
Disk space: the precheck warns but does not stop.
-
Passwords have not remained at registry defaults.