Git Product home page Git Product logo

heimdall's Introduction

Heimdall

Heimdall is a dashboard for operating Flink jobs and deployments. Built-in Flink UI is extremely useful when dealing with a single job, but what if you have 10, 20 or 100 jobs? Heimdall helps to keep track of all your Flink jobs by searching, filtering, sorting and navigating them.

Read more in my blog: Heimdall: Making Operating Flink Deployments a Bit Easier.

Note: currently, Heimdall only supports Flink jobs deployed with Flink Kubernetes Operator.

Quick (and Dirty) Start

kubectl apply -f https://raw.githubusercontent.com/sap1ens/heimdall/main/tools/k8s-operator/service-account.yaml
kubectl run heimdall --image=ghcr.io/sap1ens/heimdall:0.5.0 --port=8080 --overrides='{ "spec": { "serviceAccount": "heimdall-service-account" }  }'
kubectl port-forward heimdall 8080:8080
open http://localhost:8080

Installation

Heimdall is available as a Docker container here. Since only Flink Kubernetes Operator as available at the moment you'd typically deploy Heimdall as a pod or deployment in the same cluster.

Heimdall uses port 8080 and exposes liveness and readiness endpoints at /q/health/live and /q/health/ready.

Job Locators

Job locator (implements FlinkJobLocator interface) is a mechanism for discovering running Flink jobs in Heimdall.

K8sOperatorFlinkJobLocator

Can be enabled with heimdall.joblocator.k8s-operator.enabled config. Currently, enabled by default. It loads flinkdeployment custom resource (CR) created by the Flink Kubernetes Operator.

A service account with read-only access to flinkdeployment CR is required. See tools/k8s-operator/service-account.yaml for an example.

Cache

By default, all data received from a locator is cached in memory for 5 seconds. This can be disabled or configured to use a different interval (see this page).

Configuration

Common

Environment variable Default Description
QUARKUS_HTTP_CORS_ORIGINS http://localhost:5173 Comma separated list of valid origins allowed for CORS. Change to http://localhost:8001 when using kubectl proxy.
HEIMDALL_PATTERNS_DISPLAY_NAME $jobName Pattern for showing Flink job name. Metadata fields (e.g. Kubernetes labels) can be accessed via $metadata.labelName syntax.
HEIMDALL_ENDPOINT_PATH_PATTERNS_FLINK_UI http://localhost/$jobName/ui Pattern for the Flink UI endpoint. $jobName will be substituted. Set to an empty string to disable.
HEIMDALL_ENDPOINT_PATH_PATTERNS_FLINK_API http://localhost/$jobName/api Pattern for the Flink API endpoint. $jobName will be substituted. Set to an empty string to disable.
HEIMDALL_ENDPOINT_PATH_PATTERNS_METRICS http://localhost/$jobName/metrics Pattern for the Metrics endpoint. $jobName will be substituted. Set to an empty string to disable.
HEIMDALL_ENDPOINT_PATH_PATTERNS_LOGS http://localhost/$jobName/logs Pattern for the Logs endpoint. $jobName will be substituted. Set to an empty string to disable.

K8sOperatorFlinkJobLocator

Environment variable Default Description
HEIMDALL_JOBLOCATOR_K8S_OPERATOR_ENABLED true Is this locator enabled?
HEIMDALL_JOBLOCATOR_K8S_OPERATOR_NAMESPACE_TO_WATCH default Kubernetes namespace to use.

Development

This project uses:

  • Java 17 and Quarkus on the back-end.
  • JavaScript and Svelte on the front-end.

Running the application in dev mode

You can run your application in dev mode that enables live coding using:

./gradlew quarkusDev

Packaging and running the application

The application can be packaged using:

./gradlew build

It produces the quarkus-run.jar file in the build/quarkus-app/ directory. Be aware that it’s not an über-jar as the dependencies are copied into the build/quarkus-app/lib/ directory.

The application is now runnable using java -jar build/quarkus-app/quarkus-run.jar.

If you want to build an über-jar, execute the following command:

./gradlew build -Dquarkus.package.type=uber-jar

The application, packaged as an über-jar, is now runnable using java -jar build/*-runner.jar.

Sponsors

This project is sponsored by Goldsky ❤️.

heimdall's People

Contributors

sap1ens avatar

Stargazers

Ahmad Abdolmaleki avatar  avatar Roberto Acevedo avatar Zach Auclair avatar Alex Ehrnschwender avatar Radosław Szmit avatar Manoj Karthick avatar  avatar Hygor Knust avatar  avatar Jensen Yap avatar Hang ZHOU (周行) avatar Ashwin Jayaprakash avatar Simon Zhou avatar André avatar Sai Abishek Bhaskar avatar A.D. avatar Liquid avatar Daniel Palma avatar Karthik avatar Timothy Spann avatar Andreas Jägle avatar Kevin Li avatar Dylan Meissner avatar

Watchers

 avatar  avatar

Forkers

kristoffsc

heimdall's Issues

Message: Not Found

I have tried deploying this as per the documentation, how when the UI loads, I am seeing error : "Cloudn't load data : AxiosError: Request failed with status code 500"
when I check the pod logs seeing : "HTTP Request to /jobs failed, Failure executing GET at : https:///. Message: Not found "

Could you suggest how to go about rectifying this?

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.