Installing IEAM agent on Raspberry Pi VM

Ong Khai Wei
5 min readJan 9, 2021

I was doing some testing on IBM Edge Application Manager (IEAM) version 4.2, one of the deployment pattern is to use IEAM to manage Raspberry Pi, as I didn’t have a physical device with me, therefore I decided to use Raspberry Pi OS as Guest OS on VMWare Fusion. In this context Raspberry Pi would serve as Edge Device, IEAM(Horizon) agent would need to be installed in order to be managed by IEAM.

Steps to perform the setup are as follow:

  1. Download Raspberry Pi image and install as virtual machine.
  2. Basic setup of Raspberry Pi virtual machine for remote SSH and file transfer.
  3. Setup IEAM Hub and Post installation Step.
  4. Transfer over agent installation file into Raspberry Pi virtual machine and perform installation.
  5. Manual installation of IEAM agent (Tips!)
  6. Verify the agent status

Step 1 — Download Raspberry Pi image and install as virtual machine

Raspberry Pi image can be downloaded from here. Please choose Debian Buster with Raspberry Pi Desktop version. There are many tutorials or articles showcased the setup of Raspberry Pi virtual machine. Once it is installed successfully, the desktop view will be available.

Step 2 — Basic setup of Raspberry Pi virtual machine for remote SSH and file transfer

At this moment this Raspberry Pi OS is not able to be remote accessed via SSH. By default SSH is disabled in Raspberry Pi. It is optional to enable it, I chose to enable as it is easier for me to sftp/scp the agent installation file in and remote SSH configured from my base machine. To enable SSH in Raspberry Pi, go to Menu > Preferences > Raspberry Pi Configuration.

In Raspberry Pi Configuration window, navigate to Interfaces tab, select Enable option and click OK button to save the configuration.

Step 3 — Setup IEAM Hub and Post installation Step

As compared to version 4.1, the setup for IEAM is relatively easier with Operator. Please follow the guide to perform the following:

i) Install IEAM https://www.ibm.com/support/knowledgecenter/SSFKVV_4.2/hub/online_installation.html

ii) Post installation (this step is important to fully setup IEAM) https://www.ibm.com/support/knowledgecenter/SSFKVV_4.2/hub/post_install.html

iii) Gather edge node file — this step prepare the agent installation configuration and IEAM agent installer.https://www.ibm.com/support/knowledgecenter/SSFKVV_4.2/hub/gather_files.html

I used this following command to bundle the files to a single tar file to make it easier to transfer to Raspberry Pi.

edgeNodeFiles.sh ALL -t -p edge-packages-4.2.0

Step 4 — Transfer over agent installation file into Raspberry Pi virtual machine and perform installation

Nothing special for this step. Just use sftp or scp to copy the tar file to Raspberry Pi and un-tar it.

Step 5 — Manual installation of IEAM agent

This is where things got tricky. After un-tar the file, following the instruction to install the agent in automated mode, it will turn out error just like below:

Despite correct environment variable setting, it continue to give me the same error. Then I turned to manual installation step, yet I hit another problem with failing to install Docker due to compatibility check as below:

This seem have been known issue in Raspberry Pi community however I am not able to make it work after trying multiple alternatives. Since Raspberry Pi OS is based on Debian, Docker still can be installed using the manual approach from Docker documentation.

Instead of using command in documentation, in this case we can install Horizon CLI and Horizon agent via command line as below:

sudo apt install ./horizon-cli_2.27.0-173_amd64.deb
sudo apt install ./horizon_2.27.0-173_amd64.deb

Now we have IEAM agent installed successfully in Raspberry Pi. However it is still not communication back to IEAM Hub. This is where we will need to set Horizon Organization ID (I used ‘ieam’ in IEAM installation), User Authentication Token to access IEAM, Horizon Exchange URL and so on:

echo "HZN_EXCHANGE_USER_AUTH=xxxx" >> agent-install.cfg
echo "HZN_ORG_ID=ieam" >> agent-install.cfg
more agent-install.cfg
eval export $(cat agent-install.cfg)

Last step is to register the node to test it out.

hzn register -p IBM/pattern-ibm.helloworld

Step 6 — Verify the agent status

Upon node registration, a Horizon agreement will be created between node and hub. Once the agreement is reached, we can use horizon command to verify:

hzn agreement list

To check whether the service of “ibm.helloworld” in running, we can simple check Docker process:

sudo docker ps

IEAM console will reflect the node is up and running with checking of heartbeat.

--

--