Solutions
LE Sparkplug Edge Node

Deploying The Solution

10min



Document image


This guide provides step-by-step instructions to set up and deploy the LE Sparkplug Edge Node solution on your Litmus Edge device. Before proceeding with the guide, make sure you have the following prerequisites:

  • Litmus Edge API Token. Please follow the Create an API Token instructions to obtain the API token. (Optional with Litmus Edge Manger v2.9.x and later)
  • MQTT Broker connection credentials. The solution supports MQTT Protocol versions 3.1.0 and 3.1.1.

There are two methods to deploy the solution.

Method 1: Upload the Image to Litmus Edge

  1. Download the LE Sparkplug Edge Node image from the Central Portal website by clicking on the Download button and selecting the appropriate version (LE Sparkplug Edge Node vx.x.x).



Download the LE Sparkplug Edge Node Image
Download the LE Sparkplug Edge Node Image

  1. Log in to your Litmus Edge and navigate to Applications > Images.
  2. Click the Upload Image (+) icon, select Upload, and then select the downloaded image (le-sparkplug-x-x-x.tar.gz), and click Import. It may take a while for the image to appear.
  3. Use the docker run command to run the application, providing the required environment variables. For example:
Linux


Additionally, the following optional fields can be included in each MQTT Server Object to configure TLS settings for the server:

  • ca_cert: Base64-encoded string representing the CA certificate that should be used to verify the MQTT server's certificate.
  • client_cert: Base64-encoded string representing the client certificate that should be presented to the MQTT server during the TLS handshake.
  • client_key: Base64-encoded string representing the private key that should be used with the client certificate.
  • skip_cert_verify: Boolean indicating whether certificate verification should be skipped during TLS handshake. If this field is set to true, the MQTT client will not verify the server's certificate, and the connection will be vulnerable to man-in-the-middle attacks. This field should only be set to true for testing and debugging purposes.

If any of the optional fields are included in an MQTT Server Object, the MQTT client will use them to configure TLS settings for that server. If any of the fields are missing or invalid, the MQTT client will use default settings. Please follow the instructions in TLS Certs to encode the certifications in base64 strings.

For example:

Linux

Store And Forward Mechanism is available in LE Sparkplug Edge Node v1.4.0 and later

Please refer to the Environment Variables used by the application.

Alternatively, create a JSON configuration file with the provided flow (RECOMMENDED).

  1. Download the flow from the downloading page by clicking on LE Sparkplug Edge Node - Flow



Download the Flow
Download the Flow


Here's an example of a JSON configuration file:

JSON

  1. Use the docker run command to run the application, mounting the configuration file's directory. For example:
Linux


Method 2: Using the Marketplace (Litmus Edge Manager)

  • Download the catalog JSON file by clicking on Litmus Edge Manager - App from the downloading page:
Download the catalog JSON file
Download the catalog JSON file

  • Import the LE Sparkplug Edge Node application to your catalog by using the catalog JSON file. Refer to the instructions on Marketplace: Catalogs and Applications for more details.
  • Download the Litmus Solutions Registry from the downloading page:
Download The Registry
Download The Registry


Note: Before deploying the application, make sure to Provision a connection between the edge device and Litmus Edge Manager.



That's it! Your LE Sparkplug Edge Node application should now be running on your Litmus Edge device. 🎉