Platform control script

Description

The script is intended for managing the system via CLI. Parameter format: key=value, key-value pairs separated by spaces, order does not matter

Usage
era [command] [parameters]

File path — /usr/bin/era

Commands

Table 1. Commands
Name Description

install

Server installation. Command parameters:

  • starttype — server type. Possible values: firstinit | servinit. Required parameter.

    • required parameters for firstinit: starttype, srvip, srvname, psk, sqlstr, gendomain

    • required parameters for servinit: starttype, srvip, srvname, psk, micnodes

    • additional parameters: distports, wshttpport, wshttpsport [,instdir, isdev]

  • srvip — server address. Must be one of the addresses available on the server.

  • srvname — server name. Recommended: [a-zA-Z0-9]. (currently not validated)

  • psk — secret key. Specified the same for all servers being installed within one configuration. (currently not validated)

  • sqlstr — PostgreSQL DB connection string(s). Needed to deploy databases at firstinit. List of connection strings separated by '-'. Format: host:[Host],port:[Port],login:[Login],pwd:[Pwd],database:[Database]

    • [Login] specified during installation will be the owner of the created databases and objects in them

  • gendomain — master domain that will be used throughout the system lifetime. (currently not validated)

  • micnodes — list of configuration role nodes (ic or mic roles) to connect to and initialize the current server. The node address must be ipv4.

  • distports — list of ports that the server process (and its service processes) can occupy. Format: MinPort:PortCnt, where MinPort is an integer >0, PortCnt is an integer, and MinPort+PortCnt<65536. Default: 9300:10

  • nodesports — list of ports that role node processes can occupy. Format: MinPort:PortCnt, where MinPort is an integer >0, PortCnt is an integer, and MinPort+PortCnt<65536. Default: 9310:90

  • wshttpport — port the ws role will try to occupy to handle http requests. Default: 80

  • wshttpsport — port the ws role will try to occupy to handle https requests. Default: 443

upgrade

System update. The command is used in case of extreme necessity for manual server update. The engineer must know the consequences. Command parameters:

  • instdir — path to the root directory of the installed platform. Currently fixed: /usr/lib/era

start

Start the server. Calls supervisorctl. No parameters.

restart

Stop and then start the server. Calls supervisorctl. No parameters.

status

Server state. Displays the state of the process managed by supervisorctl. No parameters.

stop

Stop the server. Calls supervisorctl. No parameters.

product

Output product information (composition, component versions, etc.). No parameters.

help

Display help. No parameters.

See also