Skip to content

A service to store and provide historical data for K8S clusters using the Yunikorn scheduler

License

Notifications You must be signed in to change notification settings

gr-oss-devops/yunikorn-history-server

 
 

Repository files navigation

Yunikorn History Server (YHS)

GoReport Widget Latest Release

Yunikorn History Server (YHS) is an ancillary service for K8S Clusters using the Yunikorn Scheduler to persist the state of a Yunikorn-managed cluster to a database, allowing for long-term access to historical data of the cluster's operations (e.g. to view past Applications, resource usage, etc.).

Installation

Quickstart

Use the following make commands to run YHS for a quick test. These commands will install all the necessary dependencies in kind.

Prerequisites

Make sure you have the following dependencies installed:

  • Docker - containerization platform.
  • kind - tool for running local Kubernetes clusters using Docker container "nodes".
  • Go v1.22+ programming language used to build the Yunikorn History Server.
Setup local cluster and install dependencies:

start all dependencies - if you are using kind as your K8S cluster manager:

make kind-all

If you want to use minikube for your cluster:

env CLUSTER_MGR=minikube make minikube-all

start the Yunikorn History Server:

make run

Architecture

The Yunikorn History Server (YHS) is a standalone service that enhances the capabilities of the Yunikorn Scheduler by providing long-term persistence of cluster operational data. It achieves this by listening for events from the Yunikorn Scheduler and persisting them to a database.

YHS is composed of three main components:

  1. Event Collector: This component is responsible for listening to events stream API from the Yunikorn Scheduler
    and persisting them to the database. It ensures that all significant operations performed by the scheduler are recorded for future analysis.

  2. REST API: This component serves as the interface for retrieving historical data. It provides endpoints that return data about past applications, resource usage, and other operational metrics. Also provides querying capabilities to filter and retrieve specific data.

  3. Web Frontend: This component enhances the existing Yunikorn Web interface by providing additional features that utilize the historical data stored by YHS. It is loaded on the application page of Yunikorn Web. More details on the web component is available here.

By integrating these components, YHS provides a comprehensive view of the historical operations of a Yunikorn-managed cluster, enabling detailed analysis and insights.

Contributing

We welcome and appreciate your contributions!

General

Report issues, request features, and ask questions using GitHub Issues.

Code Contributions

If you'd like to contribute code, please follow these guidelines:

Open an Issue: Before starting work, ensure there is a relevant issue that your contribution addresses. If none exists, consider creating one to discuss the proposed changes or features.

Fork the Repository: Create your own fork of the repository to make your changes.

Make Your Changes: Implement your changes in your fork, adhering to the project's coding standards and best practices.

Run Tests: Ensure that all tests pass and that your code does not introduce any new issues. All CI checks must pass before submitting your code. Refer to the Testing section for more information.

Submit a Pull Request: Open a pull request to the main repository. Please reference the issue your PR addresses in the description. Clearly explain the changes you’ve made and why they are necessary.

Review Process: Your pull request will be reviewed by the maintainers. Be prepared to make additional changes based on feedback. We usually require at least two maintainers to approve the PR before merging.

Thank you for contributing to our project! Your efforts help us improve and grow the project together ❤️

Testing

Please test contributions thoroughly before requesting reviews. Add and change appropriate unit and integration tests to ensure your changes are covered by automated tests and appear to be correct.

Check Linting

make lint

Run tests

Run tests using kind for cluster manager:

make tests

Run tests using minikube for cluster manager:

env CLUSTER_MGR=minikube make tests

should all succeed without error.

License

See the LICENSE file for licensing information.

About

A service to store and provide historical data for K8S clusters using the Yunikorn scheduler

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 69.7%
  • TypeScript 17.8%
  • Makefile 6.6%
  • HTML 1.6%
  • JavaScript 1.6%
  • Shell 1.0%
  • Other 1.7%