Configure Edge View with CLI

Introduction

Edge View is an operational troubleshooting feature which can be used as a separate application or within ZEDEDA Cloud. It allows you to remotely access your edge devices through a terminal, as if you were directly logged into them, enabling you to do hands-on maintenance and troubleshooting.

This article explains how to enable Edge View for a project, and for an edge node, as well as how to download the run-script.

Prerequisites

This is a series of articles. There are different paths to configuring Edge View, so you can follow them in the order below, but it is not necessary to do so.

  1. Edge View Overview
  2. Configure Edge View using the ZEDEDA GUI
  3. Use the ZEDEDA CLI to Configure Edge View - You are here!
  4. Configure Edge View (Advanced Method)
     

Use Edge View: ZCLI

For your reference, the LF Edge wiki has a full list edge view commands.

By default, the Edge View configuration for projects and edge nodes is “edgeviewAllow: false”, which means Edge View will be turned off by default.

Check the status of Edge View for a project

In a ZCLI session, run the following commands:

  1. Log in to the ZCLI.
  2. Check the status of Edge View for your project:
zcli project show PROJECT_NAME --edgeview

Enable Edge View for a project

  1. Create a local file in the directory of your choice with the following name:
vi enable-edgeview.json
  1. Add the following JSON content to the file and save. Note that you can save by pressing "Esc" and then typing ":wq" , which stands for "write and quit".

{
  "type": "POLICY_TYPE_EDGEVIEW",
  "edgeviewPolicy": {
      "edgeviewAllow": true
  }
}
  1. Add your new configuration to your project.
zcli project update PROJECT_NAME --policy-config=edgeview:enable-edgeview.json
  1. Verify that Edge View is now enabled for your project.
zcli project show PROJECT_NAME --edgeview

Enable Edge View for an Edge Node

In your terminal, run the following commands:

  1. Check the Edge View configuration of your edge node and look for information confirming that you have a fully populated and valid config file.
zcli edge-node show EDGE_NODE_NAME --edgeview
  1. Enable Edge View.
zcli edge-node start-edgeview EDGE_NODE_NAME
  1. Verify that Edge View is enabled on your edge node.
zcli edge-node show EDGE_NODE_NAME --edgeview

Download the run-script

The Edge View run-script can be downloaded to a local directory of your choice using the ZCLI.

Note: You can also find it in your edge node’s root directory.

To download the script automatically, you need to mount a local directory onto your ZCLI session. Then, when you enable Edge View through the ZCLI, a copy of the script will be copied into your mounted directory.

The run script will use the following naming convention:

run.EDGE_NODE_NAME.SESSION_ID.edgeview.sh

To automatically receive a local copy of the script, follow these steps:

  1. Use the following command to start your ZCLI session.
docker run -it zededa/zcli:latest
  1. Enable Edge View on your project or edge node through the ZCLI.
  2. Find the run script in your local directory.

Terminate a session

Run the following command:

zcli edge-node stop-edgeview EDGE_NODE_NAME

Next Steps

This is a series of articles. There are different paths to configuring Edge View, so you can follow them in the order below, but it is not necessary to do so.

  1. Edge View Overview
  2. Configure Edge View using the ZEDEDA GUI
  3. Use the ZEDEDA CLI to Configure Edge View - You are here!
  4. Configure Edge View (Advanced Method)


After you’ve completed the series, you might be interested in the following articles. 

Was this article helpful?
0 out of 0 found this helpful