GithubHelp home page GithubHelp logo

agurenko / vse-sync-collection-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhat-partner-solutions/vse-sync-collection-tools

0.0 0.0 0.0 497 KB

License: Other

Go 99.28% Makefile 0.26% Dockerfile 0.46%

vse-sync-collection-tools's Introduction

synchronization-testsuites

The main purpose of this repo is build the necessary tooling to collect necessary synchronization-related data logs from a running OpenShift cluster. This data will then be leveraged by different analysis tools to determine if the cluster is running within acceptable bounds synchronization-wise.```

The core approach taken is to strongly encourage and enforce separation of concerns between:

  1. Declarative description of the cluster(s) under test
  2. Configuration of a test (e.g. number of repetitions, acceptable thresholds, etc.)
  3. Collectors - methods of collecting indicative information about the cluster
  4. Checks - performed on collected values

Setup

  1. Install Go
  2. Install dependencies with go mod tidy

Development Extras

  1. Install dev binaries: make install-tools. Ensure your $GOBIN is on your $PATH
  2. yamllint
    1. Install yamllint with sudo yum install yamllint
    2. run with yamllint ./
  3. golangci-lint
    1. Install golangci-lint
    2. run with make lint
  4. license-eye
    1. Install license-eye with go install github.com/apache/skywalking-eyes/cmd/license-eye@latest
    2. run with license-eye header check or license-eye header fix
  5. pre-commit
    1. on RHEL, pre-commit requires recompiling python to include optional sqlite modules:
      1. sudo yum install sqlite-devel
      2. See instructions here
    2. install pre-commit with pip3.10 install pre-commit
    3. configure your repository to run pre-commit hooks with pre-commit install
    4. manually run against all files with pre-commit run --all-files or against staged files with pre-commit run.
    5. Otherwise pre-commit will now run automatically when you make a new commit.

Usage

Building binary

Run the following command to build the binary used in the following commands:

go build
NOTE: use the --race flag when developing collectors.

Checking Enviroment

Run the following command (check help string for more details):

./vse-sync-collection-tools env verify --interface="<ptp interface>" --kubeconfig="${KUBECONFIG}"

Running Collectors

Run the following command (check help string for more details):

./vse-sync-collection-tools collect --interface="<ptp interface>" --kubeconfig="${KUBECONFIG}"

Fetching logs

The log subcommand has been removed. Instead we have implimented at collector which is enabled by default. If possible you should use a log aggregator. You can control the collectors running using the --collector flag.

Running tests

TODO: implement tests for all packages

To test the framework components run ginkgo pkg/<packagename>, for example to run the unit tests for the config package use ginkgo pkg/config

Contributing to the repo

See Adding a collector

To Do List

  • unit tests for all of pkg/
  • add more collectors
  • better data persistance options

vse-sync-collection-tools's People

Contributors

nocturnalastro avatar crwr45 avatar jnunyez avatar natifridman avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.