You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

When the EdgeView is started on the EVE device, the controller may install a script for client to run EdgeView commands on user's laptop. The script may have the filename of 'run.{device-name}.1659561808.edgeview.sh' which 'device-name' is the string for the device enabled with EdgeView session, and the digits are the timestamp in UNIX seconds when the EdgeView started.

The user can locate the script in a directory and run for example:

./run.{device-name}.1659561808.edgeview.sh -inst 1 route

On a Linux host, the EdgeView client script can be:

docker run -it --rm -e EDGEVIEW_CLIENT=1 -h=$(hostname) --network=host -v /tmp/download:/download lfedge/eve-edgeview -token <jwt-token> "$@"

The volume '-v' setting assumes the local laptop has a directory '/tmp/downlad' to be used for files uploading from device to the laptop. This volume option is needed for EdgeView commands 'cp', 'log/copy-logfiles' and 'techsupport'.

The 'jwt-token' is a string generated by the controller when the EdgeView is started.

Docker Port Mapping

On a Mac laptop, it does not support docker run in network in host mode, the port mapping for TCP can be explicitly defined in the script:

docker run -it --rm -e EDGEVIEW_CLIENT=1 -h=$(hostname) -p 9001-9005:9001-9005 -v /tmp/download:/download lfedge/eve-edgeview -token <jwt-token> "$@"

Although in EdgeView multiple instances, a user may run two EdgeView sessions on the same laptop for instance 1 and instance 2. Using explicit range will collide for the ports on laptop. Here is a more general script to set the part mapping range base on user's instance number input:

for var in "$@"
do
if [ ! -z "$gotinst" ]; then
instid=$var
break
fi
if [ "$var" = "-inst" ]; then
gotinst=1
fi
done
portstart=9001
portend=9005
if [ ! -z "$instid" ]; then
if [ "$instid" -lt 1 ] || [ "$instid" -gt 5 ]; then
echo "inst needs to be in the range 1-5"
exit
fi
newid=$(($instid - 1))
multi=$(($newid * 5))
portstart=$((9001 + $multi))
portend=$((9005 + $multi))
fi
PORTMAP="-p $portstart-$portend:$portstart-$portend"
docker run -it --rm -e EDGEVIEW_CLIENT=1 -h=$(hostname) $PORTMAP -v /tmp/download:/download lfedge/eve-edgeview -token <jwt-token> "$@"


  • No labels