IEAM 4.2 Agent Installation
This page contains the bash commands to automate the deployment of the IEAM 4.2 agent. As depicted in the figure in below, the script executes the following steps sequentially:
- Publish the sample edge services such as helloworld, cpu2eventstreams, cpu and gps in multi-arch environments.
- Install the IEAM 4.2 agent on the edge node.
- Create an agreement in between IEAM 4.2 agent on the edge node and the agbot on the IEAM.
- Register the edge node with the pattern pattern-ibm.helloworld.
- Deploy the sample helloworld service.
Navigation
Prerequisites
- IEAM 4.2 is already installed and agent installation files are shared and copied in your local home directory.
- Root privileges on the edge node.
- Install the following tools:
Install IEAM 4.2 agent on the edge node
-
Log in to your edge node using
bash
with root privileges. Install docker and run below commands to add a new user and group and switch log in to new user.Note: For edge node only Linux operating system is supported.
useradd -s /bin/bash -m -d /home/ibm-workshop -G sudo ibm-workshop # You are free to choose any user name and group usermod -g users ibm-workshop groupadd docker usermod -a -G docker ibm-workshop passwd ibm-workshop su - ibm-workshop
-
Export all the necessary environment variables.
export HZN_EXCHANGE_USER_AUTH=iamapikey:<api-key-generated-in-ieam-installation> export HZN_EXCHANGE_URL=<ieam-management-hub-ingress>/edge-exchange/v1 # <ieam-management-hub-ingress> is same as CLUSTER_URL, exported in IEAM Installment export HZN_FSS_CSSURL=<ieam-management-hub-ingress>/edge-css/ # <ieam-management-hub-ingress> is same as CLUSTER_URL, exported in IEAM installation export HZN_ORG_ID=sandbox-edge-workshop-ieam-cluster # This should be same organization id you created while Installing IEAM hub
-
Create placeholder directory workspace for edge resources and SFTP the files agent-install.sh and agent-uninstall.sh generated during IEAM 4.2 installation into workspace directory.
mkdir /home/ibm-workshop/workspace cd /home/ibm-workshop/workspace scp <your_home_dir>/workspace /home/ibm-workshop/workspace # <your_home_dir> is in your local system
- Execute shell script
agent-install.sh
as in below. This will:- Publish the sample edge services such as helloworld, cpu2eventstreams, cpu and gps in multi-arch environments.
- Install the IEAM agent and
hzn
CLI. - Create an agreement in between edge agent on the edge node and the agbot on the IEAM.
- Register the edge node with the pattern pattern-ibm.helloworld.
- Deploy the sample helloworld service.
sudo -s -E ./agent-install.sh -i 'css:' -p IBM/pattern-ibm.helloworld -w '*' -T 120
-
Validate the helloworld service container is running in
docker
on the edge node.docker ps
-
(Optional) Uninstall IEAM agent from your edge node that was installed in Step 4.
./agent-uninstall.sh -u $HZN_EXCHANGE_USER_AUTH -d
-
(Optional) Unregister your edge node that was register in Step 4. This will also stop the helloworld service.
hzn unregister -Df