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
- The Ubuntu Server LTS (64-bit) download can be found at Download Ubuntu Server
- The version for ARM-based server systems can be found at Ubuntu Server for ARM.
- For Raspberry Pi 4 it is recommended to install Raspberry Pi OS (64-bit, no desktop) to enable
dedicated Raspberry Pi hardware access, however, Ubuntu Server can be used
when this access is not needed; the downloads for Ubuntu Server can be found
at Ubuntu Server for Raspberry Pi. Make sure to
select the 64-bit version.Note: A tutorial for installing Ubuntu Server on Raspberry Pi is also available.
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 -
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.
- 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.
- To create a new Asset, click + New Asset at the top right corner. and click
-
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.
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. -
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.
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:
- Retrieve list of pods in the ecp namespace running:
kubectl -n ecp get pods
- Use the name of the "ase-core-management-XXXXX" pods to view logs by using:
kubectl -n ecp logs -f pods/<pod-name>
- 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>