Installing on the master server using the installer
Overview
System installation is performed from a local machine via an ssh connection to the server if the available server address matches the address on which the system is to be deployed.
cd /tmp/era_installer bash install_ssh.sh --ui=text
Otherwise, when the server local address is not accessible externally, first unpack and copy the installer to the server, then connect over ssh and run the script.
rsync -avrh --progress -e "ssh -p PORT" /tmp/era_installer USER@HOST:/tmp ssh USER@HOST -p PORT cd /tmp/era_installer bash era/scripts/install.sh --ui=text
The /tmp folder is chosen as the destination because it is a priori accessible to all users. This is the recommended practice.
The --ui=text key sets text mode: questions are asked line by line, and the answer is confirmed with Enter.
Without it the installer chooses pseudo-graphics if a suitable tool exists on the server: whiptail on Debian-like OSes, dialog on others.
The same can be run via the dispatcher: bash era/era.sh install --ui=text.
The installer first asks all questions, then shows what it is going to do, and changes the server only after confirmation.
Any question accepts: Enter — accept the default value, < — return to the previous question, ? — hint, ! — show everything entered.
Installation process algorithm
1) Run the installation script: on the local machine bash install_ssh.sh --ui=text, on the server bash era/scripts/install.sh --ui=text (or bash era/era.sh install --ui=text).
When launched from the local machine, connection data is asked first, then the installer copies files to the server and continues the survey there.
Server address: 192.168.0.115 ssh user: admin ssh port [22]: ssh key file:
The key may be omitted — then a password is requested. Target host checks (OS, bash version, permissions, space, occupied ports) are performed before copying.
2) Wait for files to be copied to the server.
Each large image file is asked about separately: if it is already on the server from a previous run, copying can be skipped.
Copy era/image/era_1_11_0-2026_8_31_1_docker.tar.gz (1.2G)? (y/n) [y]:
3) Screen Server and role. Specify the address, postfix, data directory, server name, role, and master domain.
== Server and role == Platform IP address: 192.168.0.115 Instance name postfix: _01 Data path [/opt]: Server name in configuration [box-115]: srv01 Is this the master server? (y/n): y Master domain name: pbx.company.ru PSK cookie [era2020key]:
Platform IP address — the local interface address on which the system is deployed.
Postfix is present in the container name, in the PostgreSQL DBMS instance name (if installed here), and in file system directory names.
Several system instances can be installed simultaneously on the server in different docker containers.
It is recommended to give instances of one system on different servers the same postfix.
Server name participates in creating the distributed configuration, pointing specifically to this server.
By default the machine hostname is offered, but any unique value not repeated on other servers can be specified.
Master domain name — the root domain for creating the tree of child domains and generating the license.
A wildcard SSL certificate may be issued for this domain, and users will enter this domain name in the browser address bar.
It has no default: the domain is always specified.
PSK cookie — the access code between cluster nodes.
The code must match on all system instances operating in a single configuration.
4) Screen Packages and network. Specify whether the server has internet access and whether a proxy is needed.
== Packages and network == Allow the installer to download packages from the internet? (y/n) [y]: Use an http/https proxy? (y/n) [n]:
If there is no internet access, answer n.
The installer will check for the required packages and, if something is missing, name what is missing — then installation should be interrupted and package installation on the server performed.
If you answer y to the proxy question, the http and https server addresses are asked.
5) Screen PostgreSQL — mode. Specify whether to install the DBMS and in what form.
== PostgreSQL -- mode == Install PostgreSQL? (y/n) [y]: y Where to place PostgreSQL? 1) On the host 2) In a docker container Choose a number: 1 Role of this PostgreSQL instance 1) Master 2) Replica (recovery) Choose a number: 1 Configure replication? (y/n) [n]: y
If the system will connect to existing external PostgreSQL servers or farms, installing a DBMS instance is not required — answer n.
Then connection parameters to the ready server are requested, and during configuration connection strings to additional servers — replicas or duplicates — are specified.
In a multi-server installation DBMS instances are installed only on selected servers according to the deployment plan.
For the first cluster server the Master role is selected, for the second — Replica (recovery).
Replication is supported only for host mode.
If the PostgreSQL image is absent from the distribution, for container mode it is offered to take the image from Docker Hub.
6) Screen PostgreSQL — access. Specify the port, users, and passwords.
== PostgreSQL -- access == PostgreSQL port [5441]: DB user for the platform [platformpgadmin]: Password of DB user platformpgadmin [••••••]: Password of DB user postgres [••••••]: Replication user [era_replica]: Password of DB user era_replica [••••••]: OS group for the postgres user:
The password question names the account for which it is entered — if you set your own user name, it will ask about that one.
WARNING! The same passwords must be set for each of these users when installing on all servers whose DBMS instances will be in streaming replication mode.
WARNING! Do not specify the standard port 5432 to avoid a conflict, since it will be occupied by the default main instance.
OS group for the postgres user is needed if the DBMS data is placed in a non-standard mounted partition: the postgres user is added to this group and gets access to the directory.
If the group was not created, leave the field empty.
If "do not install PostgreSQL" was selected on the previous screen, the address and port of the ready server, the role name, and its password are asked instead.
It is assumed that the role already exists in the external DBMS:
CREATE ROLE platformpgadmin ENCRYPTED PASSWORD '<role_pwd>' LOGIN CREATEDB CREATEROLE INHERIT;
The role name may be arbitrary.
7) Screen PostgreSQL — directories. Specify where to store data and backups.
== PostgreSQL -- directories == PostgreSQL data directory [/var/lib/postgresql/17/era_01]: PostgreSQL backup directory [/tmp/pg_backups/era_01]: Clear the data directory if it already exists? (y/n) [y]:
The data directory default depends on the mode: for a host cluster it is the package path, for a container it is a directory inside the instance.
Values should be changed if the deployment plan provides for placement in a specific mounted partition.
8) Screen Platform volumes. Specify host directories for container volumes.
== Platform volumes == Volume for /var/lib/era [/opt/era_01/lib]: Volume for /var/log/era [/opt/era_01/log]: Volume for /var/lib/era_files/local [/opt/era_01/local]: Volume for /var/lib/era_files/rectemp [/opt/era_01/rectemp]: Volume for /var/lib/era_files/logstore [/opt/era_01/logstore]: Volume for /var/lib/era_files/syncroot [/opt/era_01/syncroot]: Volume for /var/lib/era_files/a [/opt/era_01/a]: Volume for /var/lib/era_files/b [/opt/era_01/b]: Volume for /var/lib/era_files/c [/opt/era_01/c]:
Purpose of the directories:
-
/var/lib/era— working directories (recording, mixing, mnesia); -
/var/log/era— log journals; -
/var/lib/era_files/local— temporary files of the web server and script machine, file server attachments; -
/var/lib/era_files/rectemp— temporary conversation recordings of the MG role; -
/var/lib/era_files/logstore— long-term log journal storage; -
/var/lib/era_files/syncroot— storage synchronized between all servers; -
/var/lib/era_files/a,b,c— directories for moving files from one disk to another; it is recommended to specify directories on different disks.
Default values should be changed if the deployment plan provides for placement in a specific mounted partition.
9) Screen NFS. Specify client directories and the NFS server role.
== NFS == Local directory for /var/lib/recpath [/opt/era_01/era_recpath]: Local directory for /var/lib/siteshare [/opt/era_01/era_siteshare]: Local directory for /var/lib/globalshare [/opt/era_01/era_globalshare]: Start an NFS server on this host? (y/n) [n]: NFS server address:
Purpose of the directories:
-
recpath— default conversation recording storage, may be slow; it is recommended to mount reliable file storage in advance; -
siteshare— network folder accessible to all servers of the current site; -
globalshare— network folder accessible to all cluster servers on all sites.
WARNING! The NFS server role on the same host is not recommended: if this server drops out of the cluster, NFS access will be blocked on all other servers.
Ideally the NFS server address should be the virtual address of a file storage group, for example one running VRRP, or the address of a device performing the function of reliable file storage.
If the address is left empty, no mounting is performed, and shared directories remain local.
This mode is suitable for storing conversation recordings and attachments but prevents using network folders in scripts.
If mounting failed, installation is not interrupted: the directory is marked with the nomount.sign file, and the platform will not accept it as working storage.
WARNING! When installing a multi-site system, mount directory configuration must be more refined than the installer script provides.
In particular, siteshare and globalshare storages must be separated.
10) Screen Kernel parameters.
== Kernel parameters == Reuse connections in TIME_WAIT? (y/n) [n]:
The fs.inotify.max_user_watches limit is raised by the installer itself — the platform watches a large number of files, and the stock value is insufficient.
11) Screen Additional servers. Appears only on the master.
== Additional servers == Are additional servers planned? (y/n) [n]: y How many additional servers? [1]: 2 Server 1 name: srv02 Server 1 IP address (srv02): 192.168.0.116 Server 2 name: srv03 Server 2 IP address (srv03): 192.168.0.117
Nothing is installed here: from this list ready commands for each server are printed at the end.
The name must match the server name in the configuration created on the master.
If there are no additional servers, answer n — the screen ends there.
12) Screen Check installation parameters. Check the summary and plan.
== Check installation parameters == Server and role ipaddress 192.168.0.115 input srvname srv01 input master y input ... Will be performed on 192.168.0.115: 1. Install docker 2. Create PostgreSQL data directory /var/lib/postgresql/17/era_01 ... What do we do? 1) Continue -- start changing the server [*] 2) Change... 3) Show / hide passwords 4) Save answers and exit 5) Show repeat command 6) Cancel Choose a number:
Until this moment the server has not been changed.
Each value shows its source: input, command line, answers file, or default.
The "Change…" item returns to the selected screen — including to correct a value that came from the answers file or a key.
13) Wait for execution. The installer will bring up PostgreSQL, create directories, configure NFS and kernel parameters, load the image, and start the container.
== Apply == -> [1/7] PostgreSQL -> [2/7] Volume directories ... -> [7/7] Container initialization Waiting up to 60 s for the container initialization report. Container initialized: Install server success!
If the container reports an error, the installer exits with code 5 and provides its text.
14) Look at what changed on the server. The form is printed immediately after application.
== What changed on the server ==
[ ok ] Packages docker-ce, docker-ce-cli, containerd.io and 1 more
[ ok ] PostgreSQL postgresql_17_era_01.service service, port 5441
[ ok ] Database roles platformpgadmin
[ ok ] Volume directories 12 in /opt
[ ok ] NFS server nfs-kernel-server service, directories exported: 3
[ ok ] Shared directories mounted: 3
[ ok ] Kernel parameters fs.inotify.max_user_watches = 10000000
[ ok ] Platform container era_01, started
[ ok ] Platform initialization Install server success!
System files changed:
/etc/sysctl.conf
/etc/exports.d/era_nfs.exports
The system state is checked, not command return codes: the service is active, the directory is mounted, the cluster responds, the container is started.
[FAIL] in any row means the change failed, and the installer exits with code 5 — even if all commands ran.
[warn] — the server works, but not completely: for example, a port is not opened in firewalld; this does not affect the return code.
[skip] — the step was not reached, application stopped earlier.
15) Save the commands printed at the end.
== Commands for this server ==
Reinstall this server:
bash era/scripts/install.sh --non-interactive --ipaddress=192.168.0.115 ...
Remove this server:
bash era/scripts/uninstall.sh --non-interactive --datapath=/opt --eracontainername=era_01 ...
Commands for additional servers:
srv02 (192.168.0.116):
bash era/scripts/install.sh --non-interactive --ipaddress=192.168.0.116 --srvname=srv02 --master=n --micaddress=mic1@192.168.0.115 --dopginstall=n --pghost=192.168.0.115 ...
srv03 (192.168.0.117):
bash era/scripts/install.sh --non-interactive --ipaddress=192.168.0.117 --srvname=srv03 --master=n --micaddress=mic1@192.168.0.115 --dopginstall=n --pghost=192.168.0.115 ...
Commands for additional servers are printed if they were listed on screen 11.
Each remains to be executed on its own server: the node role, mic address, master database, and NFS server are already substituted.
Passwords on the screen are hidden; the ready command with all values is next to the log in the .cmd file with 0600 permissions.
The .params answers file is also saved there — it is convenient for repeating installation on another server: bash era/scripts/install.sh --answers-file=<file>.
Installation complete.