Node Installation

Node Installation

The first step when installing a local edge Node is to register the Node in Crosser Cloud to get the credentials. This is covered in the In Crosser Cloud section below.

There are two options for installing a Crosser Node on a local server: using a Docker Linux container (recommended for Linux systems) or as a Windows service (recommended for Windows systems). Follow the steps in either Installing a local Crosser Node using Docker or Installing a local edge Node as a Windows service below, depending on your choice of platform.

In Crosser Cloud

1: Register a key

You have 2 options when registering a new Node:

  1. Register a single Node (can be used only once)

  2. Register a global key to be used within your organization for a limited time

Single Node

To register a single Node:

  • Navigate to ‘Nodes’ in the menu and select the tab ‘Register Nodes’

  • Enter a name for your Node and click ‘Add’

  • The Node is now added and by clicking ‘Show Credentials’ you can get the Id and Access Key for the Node. Keep them for later use.

Global Key

This can only be done by the organization administrator. To define a global key:

  • Navigate to ‘Organization’ in the User menu select the menu item ‘Registration Keys’

  • Define a date interval the key is valid for and click ‘Generate Key’

  • The key is now generated and by clicking ‘Show Registration Key’ you can get the key. Keep it for later use.

Installing a local Crosser Node using Docker

Prerequisites

You have a platform that supports the minimum requirements:

  • Docker is installed

  • Docker Compose is installed

2: Login to docker.crosser.io

Open a terminal and enter:

[sudo] docker login https://docker.crosser.io

When prompted, enter the username and password which you find in the ‘Docker Credentials’ section on the ‘Register Node’ tab on the Nodes page (you have to enable ‘Advanced Settings’ to see this).

3: Get docker-compose.yml

To be able to use docker-compose you need a configuration file. Download the file docker-compose.yml into a local folder, or copy the content below into your own 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"

4: Setup Credentials

With Node key

Replace ENTER-YOUR-NODEID-HERE and ENTER-YOUR-ACCESS-KEY-HERE in your docker-compose.yml file with the values you got when registering the Node above.

With global key

In the docker-compose.yml file replace these two lines:

  - SecurityConfiguration__Credentials__NodeId=ENTER-YOUR-NODEID-HERE

  - SecurityConfiguration__Credentials__AccessKey=ENTER-YOUR-ACCESS-KEY-HERE

with these lines:

  - SecurityConfiguration__Registration__Key=ENTER-YOUR-GLOBAL-KEY-HERE

  - SecurityConfiguration__Registration__Name=UNIQUE-NAME-HERE

Then replace ENTER-YOUR-GLOBAL-KEY-HERE with the global registration key you, or your administrator, generated and replace UNIQUE-NAME-HERE with the name you want to give the Node (only alphanumeric characters and underscore are allowed in Node names).

5: Proxies

If the Crosser Node is running behind a proxy you need to add configurations in the environment section, just like you did with the credentials above.

Node versions 2.6 and higher

https_proxy=user:pw@192.168.102.10:1180

In analogy with this, http_proxy is set by:

http_proxy=user:pw@192.168.102.10:1180

See the Environment Settings page for more proxy settings.

Node versions <2.6

httpsProxy=192.168.102.10

In analogy with this, httpProxy is set by:

httpProxy=192.168.102.10

6: Start the Node

Run this command from the folder where you created the docker-compose.yml.

[sudo] docker-compose up -d

The Node will be downloaded from the docker registry and started.

7: Ready to go

If no errors were reported your Node is now up and running and connected to Crosser Cloud (check that you have a green checkmark next to the Node on the Nodes or Dashboard pages).

Next, start to build and deploy some flows on your new Node.

Good luck!


Installing a local Crosser Node as a Windows service

Prerequisites

You have a platform that supports the minimum requirements.

1. Download the installer

Login to Crosser Cloud

Download the Windows installer from the Nodes page, on the Register Nodes tab. On this tab enable Advanced settings to open up the list with downloadable files. Download the file for the version you want to install and unzip it in a directory on your local host server. This directory will be used to store configuration data used by the Node, so make sure to select a directory that is persistent, i.e. not a temp directory that might be cleaned by some background process.

Note that you need Nodes:Create permission to access the Register Nodes tab.

2. Install the Windows service

Note: The installer is implemented as a PowerShell script, therefore scripting must be enabled in PowerShell for scripts downloaded from the Internet. You can check your current execution policy with:

Get-ExecutionPolicy


Make sure it’s one of UnRestricted or Bypass, if not use the following command to change it:

Set-ExecutionPolicy -Scope Process UnRestricted


To install the Node, open a PowerShell window as Administrator, in the directory where you stored the installer. Then run:

.\InstallWindowsService.ps1


You will be asked to provide the Id and Access Key credentials you obtained when registering the Node in Crosser Cloud. Note that only single Node credentials can be used with the Windows service installer. Contact support@crosser.io if you want to use global registration keys with a Windows service installation.

At the end of the installation you will be asked to type run to start the service. If you don’t do this the service will just be installed and you will then have to open the Services app to start the service.

3: Proxies

If your server sits behind a proxy and the proxy configuration is not managed by Windows you need to set an environment variable to tell the Node how to reach the proxy. Choose one of the two options below, depending on if your proxy uses HTTP or HTTPS. You need to set this before starting the Crosser service:

Node version 2.6+

In PowerShell:

$env:http_proxy = 'user:pw@192.168.102.10:1180'

$env:https_proxy = 'user:pw@192.168.102.10:1180'

See the Environment Settings page for more proxy settings.

Node versions <2.6

In PowerShell:

$env:httpProxy = 'user:pw@192.168.102.10:1180'

$env:httpsProxy = 'user:pw@192.168.102.10:1180'

4: Python setup (optional)

If you want to use the Python Bridge module, Python 3.x must be installed on your machine. In addition you need to configure the path to the Python interpreter in the appsettings.json file, which can be found in the Host\data folder in the same directory where you installed the Node. In the ExternalPrograms section modify the path to your Python executable.

If you are not sure about the path to your executable, you can use the following command from your Windows Command Line or Powershell:

PS C:\Users\myuser> python -c 'import os, sys; print(os.path.dirname(sys.executable))'


C:\Program Files\Python311

Your appsettings.json file should then look something like this:


{

  "EdgeNodeConfiguration": {

    "SERVER_CONFIGURATION_VERSION": 2.9,

    "LogLevel": "Information",

    "ExternalPrograms": {

      "Python3": "C:/Program Files/Python311/python.exe"

    }

  }

}

Alternatively you can add the path to the Python executable as a an environment variable:

$env:python3Path = 'C:/Program Files/Python311/python.exe'

You also need to install the Paho MQTT library into your Python setup, e.g:

pip install paho-mqtt==1.6.1

or

conda install -c sci-bots paho-mqtt==1.6.1

5: Ready to go

If no errors were reported your Node is now up and running and connected to Crosser Cloud (check that you have a green checkmark next to the Node on the Nodes or Dashboard pages).

Next, start to build and deploy some flows on your new Node.

Good luck!

Installing a Crosser Node on an Azure IoT Edge device

The Crosser Node is available on the Azure IoT Edge marketplace and can be installed like any other module, search for Crosser and you should find CrosserIoTEdgeStreamingAnalytics.

Prerequisites

  • You have a running IoT Edge device

1: Adding credentials

You have to add the Node credentials (see In Crosser Cloud above) to the module configuration. The Id and Access key are added as environment variables and you just need to copy the values you got from Crosser Cloud into these environment variables.

2: Updating Docker image (optional)

The Docker image on the IoT Edge marketplace may not be the latest version. If you want to use the latest version you have to add the Crosser Docker repository to the list of repositories available for your IoT Edge device. You can do this on the Set Modules page, under Container Registry Credentials, in the Azure portal. See Installing a local Crosser Node using Docker above for information on the Crosser repository.

After adding the repository you need to change the Image URI reference in your deployment configuration. Replace the current Image URI for the CrosserIoTEdgeStreamingAnalytics module to:

docker.crosser.io/crosser/edgeNode:latest


This is all you need to do. Once you update the IoT Edge configuration the device will download the latest Crosser container from our repository and start the Node, which then registers with Crosser Cloud. To confirm successful installation the status for your Node will change to Online (green checkmark) on the Nodes and Dashboard pages in Crosser Cloud.





    • Related Articles

    • Update Node Version

      Update Node version The procedure to update an edge node depends on the installation environment, follow the steps in the apropriate section below. Docker Prerequisites You have a node running a docker image There is a new version of the node ...
    • Monitoring the Crosser Node

      Introduction Once you have your first flows deployed, you might think about how to integrate the Crosser Node and Flows into your existing monitoring solution. In this article we describe what options you have and how to utilize provided interfaces ...
    • Crosser Node 2.5.2

      Crosser Node 2.5.2 December 7, 2021 Upgraded software to use .NET 6.0 .NET 6.0 is an LTS release, previously .NET 5.0 was used. In general the upgrade is around improved performance and you can read all about it here Recommendations Using Environment ...
    • Crosser Node 2.5.0 - Major update

      Crosser Node 2.5.0 - Major update October 20, 2021 New architecture This new version is primarily an internal architecture change, where flows are now even more separated by running as individual processes. This first version is designed to be ...
    • Node to Node communication

      Introduction When talking about digitalization in the industry, security often comes up as one of the main concerns. Usually production environments are decoupled from other areas to prevent unauthorized actions. To realize this, a common practice is ...