glaukos

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

README

glaukos

Glaukos is a service that produces metrics about the XMiDT cluster as a whole.

Build Status codecov.io Go Report Card Apache V2 License Quality Gate Status GitHub release

Summary

Glaukos is a service that provides metrics on the XMiDT cluster as a whole. Currently, codex provides device-specific data, but glaukos will generate prometheus metrics that will give information on the entire cluster, such as the boot-time of CPE devices and other metadata information.

Table of Contents

Code of Conduct

This project and everyone participating in it are governed by the XMiDT Code Of Conduct. By participating, you agree to this Code.

Details

Glaukos parses metadata fields from incoming device-status events from caduceus and generates metrics from those. It also queries the codex database and performs calculations to generate metrics regarding the boot-time of various devices.

Build

Source

In order to build from source, you need a working 1.x Go environment. Find more information on the Go website.

Then, clone the repository and build using make:

git clone git@github.com:xmidt-org/glaukos.git
cd hecate
make build
Makefile

The Makefile has the following options you may find helpful:

  • make build: builds the glaukos binary
  • make docker: fetches all dependencies from source and builds a glaukos docker image
  • make test: runs unit tests with coverage for glaukos
  • make clean: deletes previously-built binaries and object files
Docker

The docker image can be built either with the Makefile or by running a docker command. Either option requires first getting the source code.

See Makefile on specifics of how to build the image that way.

If you'd like to build it without make, follow these instructions based on your use case:

  • Local testing
go mod vendor
docker build -t glaukos:local -f deploy/Dockerfile .

This allows you to test local changes to a dependency. For example, you can build a glaukos image with the changes to an upcoming changes to webpa-common by using the replace directive in your go.mod file like so:

replace github.com/xmidt-org/webpa-common v1.10.2 => ../webpa-common

Note: if you omit go mod vendor, your build will fail as the path ../webpa-common does not exist on the builder container.

  • Building a specific version
git checkout v0.5.1
docker build -t glaukos:v0.5.1 -f deploy/Dockerfile .

Contributing

Refer to CONTRIBUTING.md.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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