cloudagent

command module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2022 License: MIT Imports: 8 Imported by: 0

README

Cloud Agent

license Go Report Card build Coverage

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
  1. Use Homebrew to install cloudagent:

    brew tap pPrecel/tap
    brew install cloudagent
    
  2. Create a configuration file () in the ${HOME}/.cloudagent.conf.yaml location.

  3. Start the cloudagent service:

    brew services start cloudagent
    
Local development
  1. Verify and build the program:

    make verify
    make build
    
  2. Create a configuration file (see also) in the ${HOME}/.cloudagent.conf.yaml location.

  3. 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.

  4. Check if the program works by getting its logs:

    tail /tmp/cloudagent.stdout
    
  5. After waiting ~60 seconds for the first iteration of the watcher you can get the cluster state:

    cloudagent state
    

Un-installation

  1. 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) '
```

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
internal
gcp
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL