Setup Agent
In this step of our Quickstart Guide we will deploy a DSK Agent Edge with a DSK Edge Simulated Sensor/Source and link it to our Data Owner Node.
Deploy DSK Agent Edge & Simulated Sensor
Use the "Deploy to Azure" button directly below to create a Linux virtual machine on Azure with everything pre-installed/configured and the Tributech DSK Edge services up and running.
Preview the Azure resources that will be created with the "Visualize" button.
Select desired Azure Subscription/Resource Group/Region and define the name for the Agent related Azure resources (VM, Network security group,...). The Agent name must be unique within your Resource Group.
Define virtual machine Size and authentication related properties.
The Size needs to meet our Hardware Requirements. We recommend e.g.Standard_B1ms
orStandard_DS1_v2
.
SSH access allows to connect to the VM for management purposes and to support SSH tunneling/port forwarding used for connections to the DSK Agent from the Agent Companion (see Connect to Edge Agent).
Provide DSK related configuration:
- To access the client secrets and some other information required in the next steps:
- Login to the DataspaceAdmin
- Click on your account (top right) and than Administration
- Go to API Keys
- DSK Agent id: globally unique identifier (UUID) for the Agent
- DSK Hub name: The name of the DSK Hub to which your DSK Node is connected.
(e.g.your-hub
foryour-hub.dataspace-hub.com
)noteOn our Playground Ecosystem this is
play
forplay.dataspace-hub.com
. - DSK Node name: The name of your DSK Node to which the DSK Agent will be linked.
(e.g.your-node
foryour-node.dataspace-node.com
) - Data-API client secret: The client secret for the authentication at the Data-API of the DSK Node.
- Trust-API client secret: The client secret for the authentication at the Trust-API of the DSK Node.
- Docker Registry Token (DSK Edge) name: The name of the token used for authentication at the private Docker Registry hosting the DSK Agent Docker images. Default:
tributech-io-dsk-edge
. - Docker Registry Token (DSK Edge) secret: The access token for authentication at the private Docker Registry hosting the DSK Agent Docker images.
- Docker Image Tag: The Docker Image tag defining the DSK Agent version to be deployed.
- Additional DSK Edge services:
- None: Only the main DSK Edge services (DSK Agent and mosquitto MQTT broker) will be deployed.
- DSK Edge Simulated Sensor: Additionally deploy the DSK Edge Simulated Sensor service.
- OPC UA Source and Server/Simulator: Additionally deploy the OPC UA Source and Server/Simulator service.
- To access the client secrets and some other information required in the next steps:
Review terms and provided input and create the Azure resources.
Successful deployment🎉.
Output of the deployment showing sample command to connect to the VM using SSH incl. port forwarding for access to the DSK Agent (e.g. for the Agent Companion).
You can now continue with connecting to, linking & configuring the DSK Edge Agent.
Link & Configure with Agent Companion
After the DSK Agent Edge is deployed and running we need to link it to our Node and configure it.
Download & Run
- Windows
- macOS
More information on Downloading & Running the Agent Companion.
Login to DSK Node
- Click Login (top right corner).
- Enter the name/domain of your DSK Hub and DSK Node and click Login (below).
(The provided information defines to which DSK Node an DSK Agent will be connected during the linking process.) - A window with the login page of the authentication server will pop-up where you can sign in with your personal user account of your DSK Node.
- The window will be closed on successful login and the Agent Companion will be connected to the DSK Node (indicated by the green sign on top right at the DSK Node name).
Connect & Link
- We need to be able to connect to the API of the DSK Edge Agent to link & configure it with the Agent Companion.
Our recommended option is to open an SSH connection to the deployed virtual machine of the DSK Edge Agent with an SSH tunnel/port forwarding for the remote port of the API forwarding it to an local port on your localhost.
ssh <vm-user>@<vm-ip> -L <local-port>:localhost:5000
# e.g.
ssh tributech@20.86.158.183 -L 5000:localhost:5000
- After the SSH connection with the tunnel/port forwarding is established we can connect to the DSK Edge Agent with the Agent-Companion.
(e.g.http://localhost:5000
)
- By linking the DSK Edge Agent all metadata for the agent is created on the DSK Node and we establish the trust between the parties. We need to be logged in to the desired target Node and connected to the DSK Edge Agent (indicated by the green signs on the top right).
- Click on Link/Relink Agent
- The next step after linking is to configure the DSK Edge Agent
- The DSK Edge Agent can now be configured based on twins with our twin builder.
Configure
We can now configure our DSK Agent Edge using a twin based configuration.
- As a simple starting point for our example scenario we can import the Steel Factory Plant Line template.
- The Steel Factory Plant Line template provides a full example twin configuration for the DSK Agent Edge and Simulated Sensor/Source which you can adapt to your desire.
- After we are finished with defining our twin configuration we need to Upload To Device and verify it was Successfully applied.
Verify in DataSpace-Admin
After our DSK Agent Edge and Simulated Sensor/Source was deployed, linked and configured, it will be present on the DSK Node as Agent including an auto-generated Dataset.
Agent
- The linked agent should be listed under Agents.
- The streams should be available according to the twin configuration.
- Availability of (recent) data for streams can be verified.
Dataset
- A auto-generated dataset for the Agent should be present under My Datasets
- With streams according to the twin configuration of the Agent.
- Availability of (recent) data for streams can be verified.