Script era

Table of contents

Description

The script is designed to control the system via CLI. Parameter format: key=value, key-value pairs are separated by spaces, order is not important

Utilization
era [command] [parameters]

File path - /usr/bin/era

Teams

Table 1. Teams
Name Description

install

Server Setup. Command Parameters:

  • starttype - server type. Possible values: firstinit | servinit. Mandatory parameter.

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

    • mandatory 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 use: [a-zA-Z0-9].(Currently not validated)

  • psk - secret key. Specifies the same for all installed servers within the same configuration. (Currently not validated)

  • sqlstr - PostgreSQL database connection string(s). Necessary for unrolling databases at firstinit. List of connection strings with '-'. Format: host:[Host],port:[Port],login:[Login],pwd:[Pwd],database:[Database]

    • At the moment [Login] should be erapgadmin

  • gendomain - A master domain to be used throughout the life of the system. (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 can be occupied by the server process (and its service processes). Format: MinPort:PortCnt, where MinPort is an integer >0, PortCnt is an integer with MinPort+PortCnt<65536. Default: 9300:10

  • nodesports - list of ports that can be occupied by role node processes. Format: MinPort:PortCnt, where MinPort is an integer >0, PortCnt is an integer, with MinPort+PortCnt<65536. Default: 9310:90

  • wshttpport - port that will attempt to take over the ws role to handle http requests. Default: 80

  • wshttpsport - port that will attempt to take over the ws role to handle https requests. Default: 443

upgrade

System Update. The command is used in case of emergency to manually update the server. The engineer should be aware of the consequences. Command parameters:

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

start

Starting the server. Supervisorctl is called. There are no parameters.

restart

Stopping and then starting the server. Supervisorctl is called. There are no parameters.

status

Server state. Displays the state of the process managed by supervisorctl. There are no parameters.

stop

Stopping the server. A call to supervisorctl is made. There are no parameters.

product

Output of product information (composition, component versions, etc.). There are no parameters.

help

Help display. There are no parameters.

See also