Skip to main content

OPC UA Source

The DSK OPC UA Source allows to connect to OPC Unified Architecture (UA) based servers for data integration. The OPC UA Source act's as a OPC UA client and forwards the received data for a stream to the DSK Agent via our MQTT broker.

Automated setup#

During the automated setup of the DSK Agent you can select to additionally deploy the DSK OPC UA Source and OPC UA server/simulator for demonstration of such an integration.

Deploy OPC UA source

Afterwards you can continue with connecting to, linking & configuring the DSK Edge Agent and the OPC UA Source.

Manual setup#

For the manual setup of the DSK OPC UA Source (opcua-source) and an OPC UA server/simulator (opcua-server) we need the main DSK Edge services as a basis.

  • Copy the docker-compose.override.yml file.
    (see also Docker doc - Understanding multiple Compose files)

    docker-compose.override.yml
    version: "3.3"
    services:  # DSK OPC-UA Source - Connects to the OPC-UA Server and publishes the values via MQTT to the DSK agent  opcua-source:      image: ${DOCKER_REGISTRY-tributech.azurecr.io/}opcua-source:${TAG:-latest}    depends_on:      - mosquitto-server      - opcua-server      - dsk-agent          environment:      Logging__LogLevel__Default: Information      MqttOptions__MQTTHost: mosquitto-server      OPCUASourceOptions__OPCUAServerUrl: opc.tcp://opcua-server:4840/va_tt_demo      # use fixed hostname (instead of hostname based on Docker container id) to avoid changing application client certitifcate      OPCUASourceOptions__OverrideHostName: localhost    networks:      - edge-net    # samples for mapping folders with certificates (see also https://github.com/OPCFoundation/UA-.NETStandard/blob/master/Docs/Certificates.md#certificate-stores)    # e.g. to have permanent application client certitifcate and/or to trust OPC-UA server certificate    volumes:      - ./volumes/opcua-source/own/private/:/app/certs/OPC Foundation/CertificateStores/MachineDefault/private # ApplicationCertificate (with private keys)      - ./volumes/opcua-source/own/certs/:/app/certs/OPC Foundation/CertificateStores/MachineDefault/certs/ # ApplicationCertificate      - ./volumes/opcua-source/trusted/certs/:/app/certs/OPC Foundation/CertificateStores/UA Applications/certs/ # TrustedPeerCertificates      - ./volumes/opcua-source/issuer/certs/:/app/certs/OPC Foundation/CertificateStores/UA Certificate Authorities/certs/ # TrustedIssuerCertificates      - ./volumes/opcua-source/rejected/certs/:/app/certs/OPC Foundation/CertificateStores/RejectedCertificates/certs/ # RejectedCertificateStore    restart: unless-stopped    logging:      driver: "json-file"      options:        max-size: "2m"        max-file: "5"      
      # OPC-UA server/simulated data generator  opcua-server:    image: ${DOCKER_REGISTRY-tributech.azurecr.io/}va_tt_srv_1.0:latest    networks:      - edge-net    # Expose ports for development and testing purposes    #ports:    #  - "4840:4840"    restart: unless-stopped    logging:      driver: "json-file"      options:        max-size: "2m"        max-file: "5"
  • Startup all DSK Edge and OPC UA services (will automatically retrieve the Docker images).

    docker-compose up -d
  • You can now continue with connecting to, linking & configuring the DSK Edge Agent and the OPC UA Source.