Basic Installation

Requirements

  • The hardware device must be connected to the internet.
  • Access to DNS and, optionally, NTP
  • Required outbound ports: 443 (https, wss)
  • Optional outbound ports: 1883 (mqtt), 8883 (mqtts)
  • Optional inbound ports: 8080, 8888 (REST API via http)

Install OS: Ubuntu Server

We support running the Edge Compute Platform on Ubuntu Server LTS (64-bit) for both the arm64 and amd64 CPU architectures. Note that 2 GB or more of RAM is recommended.

Flashing the downloaded OS image to an SD card or a USB driver can be done using balenaEtcher.

Install K3s on 64-bit Linux

The Edge Compute Platform uses K3s, a lightweight Kubernetes. A 64-bit Linux OS is required for running K3s.

You can use the installation script available at https://get.k3s.io to install K3s as a service on systemd and openrc based systems.

You can also run the following command:

curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
Note: This command needs to be run from the shell (terminal, command line) of the OS.

If desired, the installation can be customised using installation options listed in the K3s documentation.

This will install a single-node cluster with one master and one worker.

The k3s service is automatically started after installation.

Other utilities installed are:
  • kubectl
  • crictl
  • k3s-killall.sh
  • k3s-uninstall.sh

Management Service

The Management Service is responsible for the orchestration and management of the Edge Compute Platform by connecting to Altair IoT Studio using MQTT.

Before installing the ECP Management Service, a new Asset needs to be created in Altair IoT Studio. This will generate the unique configuration file needed for the install of the Management Service.

Access the Altair IoT Studio Platform

Open the Altair IoT Studio platform to enable the communication with the Edge Device.

Create a new Asset in the Fleets. This Asset represents the Device in which you could install Edge Applications.

  1. To create a new Asset, click Edge Ops > Fleet Management and click + New Asset at the top right corner.
  2. In the screen that appears, fill in the fields, read the conditions and mark the boxes as required. Click Next.
    The web page shows two commands that enables you to install the Management app on your Devices.
    • The first command installs the credentials you need to install and run Edge applications.
    • The second one installs the Edge Compute Platform Management Service that manages the installation and uninstallation of the apps.
    Figure 1.


    When you run this command in your Device, the Altair IoT Studio and the Edge Compute Platform Management Service communicate with each other and when the installation and the communication are finished, it will display the following image.
    Figure 2.


  3. Click Next.
    You will see that the installation is finished and displays the device status, such as the CPU and Memory Usage and the Deployment Stats.
    Figure 3.


Important Notes when Installing on Raspberry Pi

Before installing K3s on Ubuntu 18.04 on a Raspberry Pi, the file /boot/firmware/nobtcmd.txt needs to be edited (or /boot/firmware/btcmd.txt if BlueTooth is enabled) by adding cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory to the end of the line (that is, not on a new line).

On Ubuntu 20.04 or Raspberry Pi OS the file to edit is /boot/firmware/cmdline.txt.

After editing and saving the file, reboot the Raspberry Pi for the changes to take effect.

On Ubuntu 20.10 and newer, the linux-modules-extra-raspi package needs to be installed.

It is strongly advised to turn off swap to enable K3s to manage memory more efficiently.

Connection Issues

If your connection is not getting established, look at the logs for the Management Service to find out what the issue is. To do this, complete the following:

  1. Retrieve list of pods in the ecp namespace running: kubectl -n ecp get pods
  2. Use the name of the "ase-core-management-XXXXX" pods to view logs by using: kubectl -n ecp logs -f pods/<pod-name>
  3. If it shows a wrong status, you can delete the pod and see if the new one that spins up will work: kubectl -n ecp delete pods/<pod-name>