Skip to main content

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​

WordMeaning
managed modeThe gateway starts with run --managed. The editor controls it with commands over an IPC channel.
deployA command from the editor to the gateway. The gateway loads the saved configuration file.
digestA 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:.
warning

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​

  1. Save the configuration file. The bar warns you when the buffer differs from the file.
  2. Click Run. The gateway starts and the bar shows the endpoint URL and the digest.
  3. Change the configuration and save it.
  4. Click Redeploy. The gateway reads the file again and restarts.
  5. Click Stop. The gateway stops and releases its port.
ButtonEffect
RunStarts the gateway from the saved configuration file.
RedeployThe gateway reads the configuration file again and restarts.
StopStops the gateway and releases its port.

How to check that it works​

  1. Click Run.
  2. Look at the state in the bar. It shows the endpoint URL and a digest.
  3. Connect an OPC UA client to the endpoint URL.
  4. Read the log in the bar. It shows which mapping entries resolved and which did not.

Settings​

Environment variableMeaning
OMNI_EDGE_CLIThe path to the gateway CLI (dist/opcua-omni-edge.js). Set it when the gateway is not a dependency of the editor.
DISABLE_RUNTIME_CONTROLSet 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().