# eaxsim-cloud configuration

> eaxsim-cloud configuration: every key, its type and meaning, generated from the Go structs that decode it.

Product: Platform · Type: Reference · Editions: Cloud
Source: https://eaxware.com/docs/platform/reference/generated/config/eaxsim-cloud/
Verified against commit d9508db.

<!-- GENERATED by tools/docgen (node tools/docgen/docgen.mjs). Do not edit by hand: change the source and regenerate. -->

The configuration file of eaxsim-cloud, the simulation control plane (-config, default cloud.json; the file of the former eaxcloud binary loads unchanged).

Keys are the JSON keys. **Optional** marks keys that are omitted when empty, or that may be absent (pointers).

## Config

Config is the control plane's configuration file (cloud.json; the
former eaxcloud binary's file loads unchanged).

Source: `eaxPLC/pkg/cloud/config.go`

| Key | Type | Optional | Description |
|---|---|---|---|
| `listen` | string |  | default 127.0.0.1:8200 |
| `data_dir` | string |  | default data/cloud |
| `eaxsim` | string |  | path of the eaxsim binary |
| `sandbox` | [Sandbox](#sandbox) |  |  |
| `tenants` | list of [Tenant](#tenant) |  |  |
| `meter_seconds` | integer | yes | MeterSeconds: how often running simulations are metered (default 10). |
| `admin_key_file` | string | yes | AdminKeyFile: a file holding the admin API key (the eaxCloud portal manages tenants with it; "eaxsim-cloud key admin &lt;file&gt;" writes one). Readable by its owner only (0600). Empty: the admin API is off and the tenants are the ones in this file. |

## Sandbox

Sandbox isolates each simulation process (Linux; ignored elsewhere).

Source: `eaxPLC/pkg/cloud/config.go`

| Key | Type | Optional | Description |
|---|---|---|---|
| `cgroup` | string | yes | Cgroup: put each simulation in a cgroup v2 under this parent (e.g. /sys/fs/cgroup/eaxsim-cloud) with its CPU, memory and pids limits. |
| `uid` | integer | yes | UID/GID the simulations run as (the control plane runs as root); 0: unchanged. |
| `gid` | integer | yes |  |
| `uid_base` | integer | yes | UIDBase: every simulation runs as its own uid (UIDBase + n, gid the same) and owns its directory (0700): simulations of different tenants cannot read each other's files. Wins over UID/GID. |

## Tenant

Tenant is a customer. The tenants of the configuration file are fixed
(edit the file and restart); the admin API adds and changes the others
at run time (data\_dir/tenants.json).

Source: `eaxPLC/pkg/cloud/config.go`

| Key | Type | Optional | Description |
|---|---|---|---|
| `id` | string |  |  |
| `name` | string |  |  |
| `api_key_sha256` | string |  | APIKeySHA256: the hex SHA-256 of the tenant's API key (the key itself is shown once, when generated, and never stored). |
| `previous_api_key_sha256` | string | yes | PreviousKeySHA256: the key a rotation replaced, still accepted until PreviousKeyExpires (a rotation with a grace period). |
| `previous_api_key_expires` | timestamp (RFC 3339 string) |  | PreviousKeyExpires: the end of the previous key's grace period (omitted when there is none). |
| `disabled` | boolean | yes | Disabled: no new simulation is created or started, running ones are stopped. |
| `quota` | [Quota](#quota) |  |  |
| `commissioning_target` | [CommissioningTarget](#commissioningtarget) | yes | CommissioningTarget: the tenant's real eaxScada its simulations attach to (virtual commissioning). Without it a simulation runs with no broker at all, reachable only through this control plane. |
| `nats_url` | string | yes | NATSURL and ScadaURL are the former way to attach simulations to a broker. They still load but no longer attach anything: a simulation of a tenant that has them is refused until the tenant is configured with commissioning_target instead. |
| `scada_url` | string | yes |  |

## Quota

Quota bounds what a tenant may run.

Source: `eaxPLC/pkg/cloud/config.go`

| Key | Type | Optional | Description |
|---|---|---|---|
| `max_sims` | integer |  | simulations defined |
| `max_running` | integer |  | running at once |
| `max_plcs` | integer |  | per simulation |
| `cpu_cores` | number |  | per simulation (cgroup cpu.max) |
| `memory_mb` | integer |  | per simulation (cgroup memory.max) |
| `max_credits_monthly` | number |  | 0: unlimited |

## CommissioningTarget

CommissioningTarget is an explicit opt-in: simulated PLCs publish on this
broker and the eaxScada behind it shows their values as if they came
from the plant. Every simulation start is logged and audited with it.

Source: `eaxPLC/pkg/cloud/config.go`

| Key | Type | Optional | Description |
|---|---|---|---|
| `nats_url` | string |  | NATSURL: the eaxScada's broker (nats://, tls://). |
| `scada_url` | string |  | ScadaURL: the eaxScada that authenticates calls to the simulated PLCs' API (a PLC reachable on a broker never runs without it). |
| `acknowledged` | string |  | Acknowledged must be exactly "simulated values will appear on this eaxScada". |
