Node Agent is part of the Edge Manageability Framework. It is responsible to register and authenticate the Edge Node with the Edge Infrastructure Manager service when the Edge Node is first brought up. It is also responsible for creating and refreshing tokens for other agents running on the Edge Node. It reports status of Edge Node to the Edge Infrastructure Manager as it onboards.
It:
- Registers and authenticates Edge Node with Edge Infrastructure Manager service
- Reports status of Edge Node to the Edge Infrastructure Manager as it onboards
- Creates and refreshes tokens for other agents running on the Edge Node
To develop Node Agent, the following prerequisites are required:
The required Go version for the agents is outlined here.
Run the make nabuild command to build the node agent binary. The compiled binary can be found in the build/artifacts directory.
Example:
$ cd node-agent/
$ make nabuild
$ ls build/artifacts/
node-agentRun the make package command to build the node agent Debian package. The package can be found in the build/artifacts directory.
Example
$ cd node-agent/
$ make package
$ ls build/artifacts/
node-agent_<VERSION>_amd64.build node-agent_<VERSION>_amd64.buildinfo node-agent_<VERSION>_amd64.changes node-agent_<VERSION>_amd64.deb packageRun the make tarball command to generate a tarball of the node agent code. The tarball can be found in the build/artifacts directory.
Example
$ cd node-agent/
$ make tarball
$ ls build/artifacts/
node-agent-<VERSION> node-agent-<VERSION>.tar.gzTo run the node agent binary after compiling:
./build/artifacts/node-agent -config configs/node-agent.yaml
The node agent Debian package can be installed using apt:
sudo apt install -y ./build/artifacts/node-agent_<VERSION>_amd64.debTo uninstall the node agent, use apt:
sudo apt-get purge -y node-agent-
Status
sudo systemctl status node-agent -
Start
sudo systemctl start node-agent -
Stop
sudo systemctl stop node-agent
To view logs:
sudo journalctl -u node-agent
-
Build node agent binary and mock binaries:
make build -
Run unit tests:
make test -
Run integration tests:
make integration_test -
Run linters:
make lint -
Get code coverage from unit and intergration tests:
make cover -
Run package test:
make package_test
Apache-2.0