Platform Login

« back to blog overview

Automatically Deploying Crosser.io Containers on the Edge

Crosser.io is an exceptional low code industrial IoT platform that boasts several factory floor and cloud integrations. It offers a range of features that make it ideal for a wide variety of projects in IIoT, smart buildings, smart cities, and robotics. Its ability to run machine learning on the edge and provide IoT edge streaming analytics is particularly useful for companies looking to develop innovative solutions in these areas.

The platform is based on a similar low code concept as Node-Red, making it easy for those familiar with the latter to understand Crosser.io’s functionality. On the edge device, Crosser.io is delivered as a docker container, with the different Crosser flows centrally managed and updated by the platform. However, deploying and maintaining the Crosser container on the edge device is the responsibility of the user.

To help you get started with Crosser.io, this tutorial offers step-by-step guidance on deploying the Crosser container on the edge using the qbee IoT device management software and creating a basic flow to demonstrate this. This will enable you to automatically provision large fleets of devices with Crosser.io and keep the container up-to-date, allowing you to manage both flows and containers throughout the lifecycle of your project. In addition, qbee will handle the host OS and make it secure, updated and monitored. This will include a monitoring and restart layer for the containers creating warning events if the container has to be restarted for some reason.

Overall, Crosser.io is an innovative and versatile platform that offers a range of features that are beneficial for companies looking to develop cutting-edge IIoT, smart building, smart city, and robotics solutions. With this tutorial, you can easily deploy Crosser.io on your edge devices and start developing your own IoT solutions.

Deploying Crosser.io on your device fleet with Automation 

It is very easy to deploy Crosser.io docker containers manually following the tutorial here. But often you want to setup crosser on hundreds of containers. This can be done by using the qbee docker configuration engine to manage the crosser instances.

This is the docker-compose.yml:

version: '3.5'

services:
  edgenode:
    image: docker.crosser.io/crosser/edgenode:latest
    container_name: crosser-edgenode
    restart: always
    environment:
      - SecurityConfiguration__Credentials__NodeId=ENTER-YOUR-NODEID-HERE
      - SecurityConfiguration__Credentials__AccessKey=ENTER-YOUR-ACCESS-KEY-HERE
    ports:
      - 9090:9090
      - 9191:9191
      - 1883:1883
    volumes:
      - "./data:/application/data"
    logging:
      driver: json-file
      options:
        max-size: "50m"
        max-file: "2"

We will now extract the information from this file and insert it into the qbee docker configuration. We also do some improvements:

First of all, as a best practice, we do not pull the latest container, but a defined version such that we keep control over the update process. We use 

docker.crosser.io/crosser/edgenode:2.5.6

In addition, we move the

SecurityConfiguration__Credentials__AccessKey=ENTER-YOUR-ACCESS-KEY-HERE

into a seperate file called crosser.env which we upload with the qbee file manager into the according path.

The rest of the compose file is used as a docker argument with two additional changes. We do not use the restart command since qbee takes care of the container management and we expand the full path to the data file.

Then the configuration looks like this. Please note that we selected one device to receive this (RPI2), but this could also be defined for a group of devices or the whole fleet.

The docker argument reads:

-e SecurityConfiguration__Registration__Name=$(sys.host) -p 9090:9090 -p 9191:9191 -p 1883:1883 -v /var/lib/crosser-edgenode/data:/application/data --log-driver json-file --log-opt max-size=50m --log-opt max-file=2

This corresponds to the previous compose file except that the name is set as a variable resolving the hostname. This can be defined in any other way as well. In order to enable qbee to fetch this container the registry authentication needs to be defined in the second tab:

Now this configuration can be saved and committed and then all devices in scope will automatically deploy and start the crosser docker container. If you later want to upgrade you can exchange the version with exactly the version you want to use. Qbee supports also docker compose, including a templating engine which allows to individualise the containers further (for example certificates). Please refere to this docker compose tutorial for more information.

Qbee has a built-in logging engine that logs all relevant events from the devices. Any necessary restart of the container will be initiated by qbee and this causes a warning to be logged in contrast to the info message from the first start.

Building a Demo Crosser.io Flow and deploying it to the edge container

Our crosser.io container is ready on the edge and awaits its first flow. We have recreated the flow from the crosser demo. This flow can be executed in the cloud sandbox or on your edge device.

We let it run on our Raspberry Pi by connecting to it. The connected device and the resulting flow output can be seen below-

Conclusion

The crosser.io low code industrial automation platform and the qbee.io IoT device management platform are a perfect match for deploying edge processing in a fully automated way. This powerful combination allows for full lifecycle management of both hardware and software, making it a cost-effective solution for companies looking to implement complex IIoT projects.

With the added benefit of edge machine learning and the ease of low code programming, the crosser.io and qbee.io integration offers a game-changing solution for businesses seeking to develop innovative IIoT solutions. This approach significantly reduces costs and simplifies the process of deploying edge processing, making it an attractive option for companies of all sizes.

By utilizing the crosser.io and qbee.io platforms, businesses can take advantage of a powerful, automated solution for managing their IIoT projects. This means they can focus on developing their solutions, knowing that their hardware and software are being effectively managed throughout the entire lifecycle of the project. Overall, the combination of crosser.io and qbee.io provides businesses with a powerful, flexible and cost-effective solution for developing cutting-edge IIoT projects.

Interested to know more?