Git Product home page Git Product logo

cortex-jsonnet's Introduction

Jsonnet for Cortex on Kubernetes

This repo has the jsonnet for deploying Cortex and the related monitoring in Kubernetes.


NOTE

If you are more familiar with helm you should use the helm chart for cortex


To generate the YAMLs for deploying Cortex:

  1. Make sure you have tanka and jb installed:

    Follow the steps at https://tanka.dev/install. If you have go installed locally you can also use:

    $ # make sure to be outside of GOPATH or a go.mod project
    $ GO111MODULE=on go install github.com/grafana/tanka/cmd/[email protected]
    $ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
  2. Initialise the Tanka repo, install the Cortex and Kubernetes Jsonnet libraries.

    $ mkdir <name> && cd <name>
    $ tk init --k8s=1.21 # this includes github.com/jsonnet-libs/k8s-libsonnet/1.21@main
    $ jb install github.com/cortexproject/cortex-jsonnet/cortex@main
  3. Use any of the examples to get a main.jsonnet and adjust as needed

    $ cp vendor/cortex/azure/main.jsonnet.example environments/default/main.jsonnet
    $ cp vendor/cortex/gcs/main.jsonnet.example environments/default/main.jsonnet
    $ cp vendor/cortex/s3/main.jsonnet.example environments/default/main.jsonnet
  4. Check what is in the example:

    $ cat environments/default/main.jsonnet
    ...
  5. Generate the YAML manifests:

    $ tk show environments/default

    To output YAML manifests to ./manifests, run:

    $ tk export manifests environments/default

Monitoring for Cortex

To generate the Grafana dashboards and Prometheus alerts for Cortex:

$ GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@2ff523ea63d1cdeee2a10e01d1d48d20adcc7030
$ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
$ git clone https://github.com/cortexproject/cortex-jsonnet
$ cd cortex-jsonnet
$ make build-mixin

This will leave all the alerts and dashboards in cortex-mixin/cortex-mixin.zip (or cortex-mixin/out).

cortex-jsonnet's People

Contributors

pracucci avatar gotjosh avatar pstibrany avatar tomwilkie avatar jtlisi avatar darrenjaneczek avatar gouthamve avatar stevesg avatar jdbaldry avatar codesome avatar owen-d avatar aknuds1 avatar aallawala avatar joe-elliott avatar cstyan avatar simonswine avatar annanay25 avatar michelhollands avatar amckinley avatar friedrichg avatar jvrplmlmn avatar duologic avatar cyriltovena avatar umamialex avatar sandeepsukhani avatar bboreham avatar sh0rez avatar beorn7 avatar forestsword avatar colega 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.