Run the gateway from the editor
The configuration editor can start the gateway on the configuration that you edit.
A bar at the bottom of the editor shows the state of the gateway, its endpoint URL and its log.
The Virtual address space panel of the editor is a simulation: it makes the instances: and nothing else.
Words on this page
| Word | Meaning |
|---|---|
| managed mode | The gateway starts with run --managed. The editor controls it with commands over an IPC channel. |
| deploy | A command from the editor to the gateway. The gateway loads the saved configuration file. |
| digest | A short code of the loaded configuration, for example #a1b2c3d4e5f6. |
Why a deploy is a command
In managed mode, the gateway does not watch the configuration file.
A file watcher does not work on a Docker Desktop bind mount: a write from the host raises no event in the container.
A file watcher also cannot report the result.
With a command, the gateway acknowledges each deploy.
If the configuration does not load, the editor shows the reason, for example cannot find nodeset file models/foo.xml.
If the configuration loads, the editor shows the endpoint URL and the digest.
When the digest changes after a redeploy, your revision runs.
Before you start
- Install the editor and the gateway. The Docker Compose bundle includes both.
- Save the configuration file. The buttons use the saved file, not the editor buffer.
- Make sure that no other gateway uses the port from
port:.
The gateway opens real connections to the devices in brownfieldDevices:.
The gateway also binds the OPC UA port from port:.
A deploy on a plant network can disturb production or collide with a running gateway.
On an editor that must never do this, set DISABLE_RUNTIME_CONTROL=true.
How to run the gateway from the editor
- Save the configuration file. The bar warns you when the buffer differs from the file.
- Click Run. The gateway starts and the bar shows the endpoint URL and the digest.
- Change the configuration and save it.
- Click Redeploy. The gateway reads the file again and restarts.
- Click Stop. The gateway stops and releases its port.
| Button | Effect |
|---|---|
| Run | Starts the gateway from the saved configuration file. |
| Redeploy | The gateway reads the configuration file again and restarts. |
| Stop | Stops the gateway and releases its port. |
How to check that it works
- Click Run.
- Look at the state in the bar. It shows the endpoint URL and a digest.
- Connect an OPC UA client to the endpoint URL.
- Read the log in the bar. It shows which mapping entries resolved and which did not.
Settings
| Environment variable | Meaning |
|---|---|
OMNI_EDGE_CLI | The path to the gateway CLI (dist/opcua-omni-edge.js). Set it when the gateway is not a dependency of the editor. |
DISABLE_RUNTIME_CONTROL | Set to true to remove the feature. The bar disappears and the /api/runtime/* endpoints answer 403. |
When OMNI_EDGE_CLI is not set, the editor looks for the opcua-omni-edge package.
Then it looks for a sibling package in a development checkout.
Where the gateway looks for models
The gateway resolves imports[].filename relative to the folder of the configuration file.
The editor stores the uploaded models in the same folder.
For example, /data/config.yaml with models/my.NodeSet2.xml resolves to /data/models/my.NodeSet2.xml.
Without the editor
Use these commands to run the gateway from the command line:
# controller-driven: no watcher, commands over IPC (what the editor uses)
opcua-omni-edge run --managed -c config.yml
# unattended: reload when the file changes
opcua-omni-edge run --watch -c config.yml
# unattended on a bind mount, where filesystem events never arrive:
# compares modification time AND content instead
opcua-omni-edge run --watch --poll -c config.yml
--managed needs an IPC channel. It works only when a parent process starts the gateway with child_process.fork().