This script applies remote binary update files to the specified devices
Contents of Package
This scripts is composed of 2 python files:
ApiClient.py
BinaryUpdateScript.py
ApiClient.py can be used to interface with the Edge Node’s API but will do nothing if run directly.
BinaryUpdateScript.py must be run in the same folder with ApiClient.
Usage
This script will apply supplied binary updates to the described devices. The script can be run from the command line as follows after navigating to its folder:
python BinaryUpdateScript.py
Or, if on a system with both python 2 and 3 installed:
python3 BinaryUpdateScript.py
It will create a subfolder “Binary” when first run. If a csv list of devices is placed in that folder, along with the MQTT or eACM folders containing binary updates (including a bin and lib folder), the next time the script is run it will apply those binaries to the listed devices.
Binary Formatting
The update script is looking for folders named “MQTT” or “eACM”
It will transfer these folders to the remote device then install the contents of “lib” and “bin”
CSV Formatting
The CSV file’s top row must include the following headers:
Edge Device IP,OS username,OS password
Each column's meaning is detailed below
Edge Device IP | The IP address or url the edge device; this is the IP we will attempt to contact. Unless otherwise specified, it will be assumped an IP or url is of the format, Eg “192.168.0.10” will be read as “http://192.168.0.10:8080”. If a different port is expected, or the node is configured for https, that must be included, eg “https://192.168.0.10:8181”. Each Edge Device IP must be unique within the CSV. |
OS username | The operating system username |
OS password | The operating system password |
Output
The script will log the progresss of its update application; due to the complexity of applying a binary remotely it is advised that each device be confirmed manually.
Logs
This script will generate its logs in BinaryScript.log. It can be checked for further details if an error appears in the Complete report.