Service script machine (svc)

Description

Service for executing service scripts preconfigured by the administrator.

Made redundant and scaled in Active-Active mode.

Table 1. System characteristics

Code

scr

Operation mode

Service

Redundancy mode

Active-Active

Site types

Any

Layer

Business logic

Placement

Internal

State preservation and recovery on restart

No

Application

era_script

Limitations

  • Executes only the scripts belonging to domains served on the current site.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and digits and must start with a letter.

roletype

str

required

Role type. Possible values: "scr".

ext

json

empty

Additional role options. Contains a JSON object or list.

enabled

bool

empty

Role activity flag. When set to false, the role does not participate in validation and is not started.

limit_of_cores

int

empty

Limit on the number of CPU logical cores used. Default: 0 - unlimited.

logging_default_level

int

empty

Default logging level set specifically for the role instance (microservice type). More

allow_divergence

bool

false

Flag allowing parameter differences in roles of the same group. Default: false - not allowed.

roleid

int

required

Role identifier.
Unique across the entire system, regardless of site or server. Cannot be changed.
An integer from 1 to 9999.

separate

bool

required

Flag indicating whether the role is allocated to a separate node.

sections

array<str>

empty

List of sections in which the instance participates.
A section is specified in the service task: the task runs only on instances with this section (if there are none on the site, on any instance). Instances with a non-empty section list do not participate in selection for other scripts while the site has instances without sections.

Configuration example

Configuration management is performed in an application available to master domain administrators. The application hides the full configuration content, but it is still available through the API.

The configuration contains a section describing all instances of all roles. Parameters are defined for each specific role instance.

Node example
{
  "name": "svc1",
  "roletype": "svc",

  "roleid": 11220,
  "separate": true
}

See also