Closed bmpotter closed 4 years ago
For now I added the script to the tools directory in the open-horizon git repo, but that was just so I could save it in GitHub.
https://github.com/t-fine/examples/blob/gather-script/tools/edgeDeviceFiles.sh
Requirements:
cloudctl login ...
command (also checked in first function)--------------- Knowledge Center Doc Changes -------------------
https://www-03preprod.ibm.com/support/knowledgecenter/SSFKVV_3.2.1/devices/installing/install.html
Gather the necessary information and files
The script in this section only needs to be executed once for each edge node device type, but must be performed on an x86 host (Linux, macOS, or Windows). If your edge device is a different architecture (for example arm or arm64), then run the script in this section on an x86 host and copy the resulting tar file to your edge device.
Alternatively, you can install kubectl using your package manager. For more information about installing kubectl with your package manager, see Install and set up kubectl (LINK: https://kubernetes.io/docs/tasks/tools/install-kubectl/ ).
After cloudctl is installed, ask your IBM cluster administrator for the URL for the cluster, username, and password. Export these values as environment variables:
export CLUSTER_URL=<cluster-url>
export USER=<username>
export PW=<password>
Download the latest version of the edgeDeviceFiles.sh
:
curl -O https://raw.githubusercontent.com/open-horizon/examples/master/tools/edgeDeviceFiles.sh && \
chmod +x edgeDeviceFiles.sh
Run the script to gather the necessary files to register an edge node with the edgeDeviceFiles.sh
script.
<edge-device-type>
values: 32-bit-ARM , 64-bit-ARM , x86_64-Linux , macOS
-t
: create an agentInstallFiles-<edge-device-type>.tar.gz
file containing all gathered files. If this flag is not set, the gathered files will be placed in the current directory.-k
: create a new $USER-API-Key. If this flag is not set, the existing api keys will be checked for $USER-API-Key and creation will be skipped if one exists.-d <distribution>
: when installing on 64-bit-ARM or x86_64-Linux: you can specify -d xenial
for the older version of Ubuntu, instead of the default bionic
. The -d
flag is ignored with all other ./edgeDeviceFiles.sh <edge-device-type> -t
This might be related to https://github.ibm.com/Edge-Fabric/docs/issues/228
Tested/used this multiple times and it worked like a champ!
agent-install.sh
from the anax repo and make it executable.Not sure yet where this script should live.