Cloud Agent
The simple and easy-to-use program is designed to watch user activity and possible orphan clusters for Cloud Providers:
- Gardener
- GCP (work in progress)
This application is created with a view to using it as the tmux status. To fulfill this criterion the procedure of getting resources from the gardener is separated and is in the second service which serves the UNIX socket that is used by the first one. This architecture allows not to block the main tmux process during calling the right gardener endpoint.
Installation
Github Release
Visit the releases page to download one of the pre-built binaries for your platform.
Homebrew
-
Use Homebrew to install cloudagent
:
brew tap pPrecel/tap
brew install cloudagent
-
Create a configuration file () in the ${HOME}/.cloudagent.conf.yaml
location.
-
Start the cloudagent
service:
brew services start cloudagent
Local development
-
Verify and build the program:
make verify
make build
-
Create a configuration file (see also) in the ${HOME}/.cloudagent.conf.yaml
location.
-
Add the program to PATH and install it as a system agent:
make ln-to-path
make install-agent
NOTE: for local development or need to get more information from the agent you can pass more arguments to the make install-agent
command like: other_flags=--agentVerbose
.
-
Check if the program works by getting its logs:
tail /tmp/cloudagent.stdout
-
After waiting ~60 seconds for the first iteration of the watcher you can get the cluster state:
cloudagent state
Un-installation
-
Remove the application from the path and remove system agent:
make rm-from-path
make uninstall-agent
Integration with tmux
To add this application to tmux put line below in the ~/.tmux.conf
file:
```text
set -ag status-right ' #(cloudagent state --createdBy <OWNER_NAME> -o text) '
```