Installation on the current server

The same as era_installer/install-ssh.adoc#era-installer-install-ssh, but the distribution directory is already on the server and the command runs there.

bash era/scripts/install.sh

There are two differences from the ssh variant: no connection screen and no file delivery. The wizard screens, the confirmation screen, and the apply phase are exactly the same.

When this is more convenient

  • The directory is already on the server — for example, you copied it once and are repeating the installation.

  • The platform image weighs gigabytes and the channel to the server is narrow: there is no point copying it every time.

  • Installation is performed from a third-party deployment script that has its own way of delivering files.

The directory is copied in any usual way, usually rsync:

rsync -a --exclude='logs/' ./ user@192.168.0.10:/tmp/era_installer/
ssh -t user@192.168.0.10 'cd /tmp/era_installer && bash era/scripts/install.sh'

The same via the dispatcher, if that is more familiar:

ssh -t user@192.168.0.10 'cd /tmp/era_installer && bash era/era.sh install'

The -t key is mandatory if the installer will ask anything. Without it ssh does not allocate a terminal on the other side, and the wizard notices: pseudo-graphics do not start, and password input stops being hidden — what you type is displayed by your local terminal, and the remote side cannot turn this off. The installer warns about this before the first password question.

If the launch comes from a script where there is no terminal at all, pass passwords via a file: --secrets-file — see era_installer/unattended.adoc#era-installer-unattended-secrets.

The destination directory is /tmp: any user can write there, and copying does not require root. A regular user cannot write to /opt, and rsync would stop on access denial before installation. The distribution can be placed in any directory — it determines its root from its own path — but that directory must be writable by the user copying it.

Apply phase order

It is always the same and repeats the plan you saw on the confirmation screen.

  1. Proxy — if set, environment variables are set before everything else.

  2. Docker — installed if absent; the service is enabled if not running.

  3. PostgreSQL — container or cluster on the host.

  4. Volume directories — created and, when running without root, transferred to the user with uid 1000.

  5. Shared directories — NFS server role, client role, or skipping with marker creation.

  6. Kernel parameters — inotify limits and, on request, network ones.

  7. Ports in firewalld — before starting the container so the platform is available immediately.

  8. Platform image — loaded into docker.

  9. Platform container — started.

  10. Waiting for initialization — the installer waits for a result report from the container.

  11. Product layer — copied if found in era/assets.

A step is skipped if it is not needed given your answers: for example, docker is not touched if it is already running. Skipped steps are absent from the plan too — the plan and the action queue are built from the same conditions.

What changed on the server

Immediately after application a form is printed: the list of changes and the result of each.

== What changed on the server ==

  [ ok ] Packages                            docker-ce, docker-ce-cli, containerd.io and 1 more
  [ ok ] PostgreSQL                          container postgres<postfix>, port 5441
  [ ok ] Database roles                      platformpgadmin
  [ ok ] Volume directories                  12 in /opt
  [ ok ] NFS server                          nfs-kernel-server service, directories exported: 3
  [FAIL] Shared directories                  not mounted: /opt/era<postfix>/era_recpath
  [ ok ] Kernel parameters                   fs.inotify.max_user_watches = 10000000
  [warn] Ports in firewalld                  not opened: 8080/tcp
  [ ok ] Platform image                      era_1_11_0-2026_8_31_1_docker
  [ ok ] Platform container                  era<postfix>, started
  [ ok ] Platform initialization             Install server success!

System files changed:
    /etc/exports.d/era_nfs.exports
    /etc/sysctl.d/97-era-platform-inotify.conf

The labels are the same as in prechecks, but they answer a different question. Prechecks look at whether it is possible to start; the form — at what actually happened, and takes it from system state rather than command return code: the container is started, the service is active, the directory is mounted, the cluster responds.

This matters because some steps intentionally do not interrupt installation: failed NFS mounting, an unopened port in firewalld, container silence on timeout. Without the form their failure would remain only in the log.

The checks do not depend on who launched the installer: the kernel limit is read from /proc, not via sysctl (its /usr/sbin directory is usually absent from a regular user’s PATH), database information is taken from the database itself, container information from docker. If a value could not be read at all, the row gets [warn] rather than [FAIL]: without seeing the value, one cannot assert that the change was not made.

Label Meaning

[ ok ]

The change was made and confirmed by a check.

[warn]

The server works, but not completely: for example, a port is not opened — the platform will start but be inaccessible externally. Does not affect the return code.

[FAIL]

The change failed. The installer exits with code 5 even if the action queue reached the end.

[skip]

This step was not reached: installation stopped earlier.

The form is printed after a failure too — that is when it is most needed: you can see what was changed and what remains working. With --dry-run there is no form: the server was not changed, and there is nothing to report.

On removal the same form is printed, but it answers the question "what remains": container, cluster, mounts, instance directory.

What is shown at the end

After a successful installation the following are printed:

  • the command by which this server is reinstalled;

  • the command by which it is removed;

  • the ssh installation command, if the connection address is known;

  • commands for additional servers, if you listed them on screen 10;

  • the path to the file with the ready command.

Passwords in the printed commands are hidden: the screen remains in the terminal scrollback. The command with real values is in the .cmd file next to the log, with 0600 permissions — copy from there; commands for additional servers are there too.

Commands for additional servers

If on screen 10 you answered that other servers are planned and listed their names and addresses, one ready command per server is printed at the end. The command is non-interactive: it remains to be executed on that server.

The command is based on the answers of this run: the servers belong to one system, and the postfix, directories, database password, and network parameters are shared. The role and what follows from it differ:

  • --master=n, and the master domain is not passed — there is one master in the system;

  • --micaddress=mic1@<master address> — the server finds the master at this address;

  • --dopginstall=n and --pghost=<master address> — no own database is installed, the server connects to the master database;

  • --installnfsserver=n, and with an NFS server on the master — --nfsserveraddr=<master address>;

  • --lang — the same as the master installation used: the command is executed by a person, and getting an installation in another language would be surprising. The repeat command has no such key — it is executed by a script.

Check the command before launching: the installer bases it on the master answers and does not know how the specific server differs.