This Platform Update Agent handles system updates on edge nodes, coordinating with the Maintenance Manager and INBM components.
To develop Platform Update Agent, the following prerequisites are required:
The required Go version for the agents is outlined here.
Run the make puabuild command to build the platform update agent binary. The compiled binary can be found in the build/artifacts directory.
Example:
$ cd platform-update-agent/
$ make ptabuild
$ ls build/artifacts/
platform-update-agentRun the make package command to build the platform update agent Debian package. The package can be found in the build/artifacts directory.
Example:
$ cd platform-update-agent/
$ make package
$ ls build/artifacts/
package platform-update-agent_<VERSION>_amd64.buildinfo platform-update-agent_<VERSION>_amd64.deb
platform-update-agent_<VERSION>_amd64.build platform-update-agent_<VERSION>_amd64.changesRun the make tarball command to generate a tarball of the platform update agent code. The tarball can be found in the build/artifacts directory.
Example
$ cd platform-update-agent/
$ make tarball
$ ls build/artifacts/
platform-update-agent-<VERSION> platform-update-agent-<VERSION>.tar.gzTo run the platform update agent binary after compiling:
./build/artifacts/platform-update-agent -config configs/platform-update-agent.yaml
The platform Update agent Debian package can be installed using apt:
sudo apt install -y ./build/artifacts/platform-update-agent_<VERSION>_amd64.debTo uninstall the platform update agent, use apt:
sudo apt-get purge -y platform-update-agent-
Status:
sudo systemctl status platform-update-agent -
Start:
sudo systemctl start platform-update-agent -
Stop:
sudo systemctl stop platform-update-agent
To view logs:
sudo journalctl -u platform-update-agent -f
-
Build platform update 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