Writing a system agent
So far, when we have automated operations on a device, we have either done it from an application that executes locally or through a command we run remotely with SSH.
But if we look toward managing a small fleet of machines, it can be more practical to write a service that runs on the device that we connect to via RPCs. Using knowledge of the gRPC services we discussed in previous chapters, we can combine these concepts to allow control of our machines in a more uniform way.
Here are a few things we can use system agents for:
- Installing and running services
- Gathering machine running stats
- Gathering machine inventory information
Some of these are the kinds of things Kubernetes does with its system agents. Others, such as inventory information, can be vital in running a healthy fleet of machines, often overlooked in smaller settings. Even in a Kubernetes environment, there may be advantages to running your own agent for certain tasks...