2
2
3
3
This repo has the jsonnet for deploying Cortex and the related monitoring in Kubernetes.
4
4
5
+ ---
6
+ ** NOTE**
7
+
8
+ If you are more familiar with helm you should use the [ helm chart] ( https://cortexproject.github.io/cortex-helm-chart/ ) for cortex
9
+
10
+ ---
11
+
5
12
To generate the YAMLs for deploying Cortex:
6
13
7
14
1 . Make sure you have tanka and jb installed:
@@ -10,25 +17,19 @@ To generate the YAMLs for deploying Cortex:
10
17
11
18
``` console
12
19
$ # make sure to be outside of GOPATH or a go.mod project
13
- $ GO111MODULE=on go get github.com/grafana/tanka/cmd/tk
14
- $ GO111MODULE=on go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
20
+ $ GO111MODULE=on go install github.com/grafana/tanka/cmd/tk@v0.21.0
21
+ $ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0
15
22
```
16
23
17
- 1. Initialise the Tanka, and install the Cortex and Kubernetes Jsonnet libraries.
24
+ 1. Initialise the Tanka repo, install the Cortex and Kubernetes Jsonnet libraries.
18
25
19
26
```console
20
27
$ mkdir <name> && cd <name>
21
- $ tk init --k8s=false
22
- $ # The k8s-alpha library supports Kubernetes versions 1.14+
23
- $ jb install github.com/jsonnet-libs/k8s-alpha/1.18
24
- $ cat <<EOF > lib/k.libsonnet
25
- (import "github.com/jsonnet-libs/k8s-alpha/1.18/main.libsonnet")
26
- + (import "github.com/jsonnet-libs/k8s-alpha/1.18/extensions/kausal-shim.libsonnet")
27
- EOF
28
- $ jb install github.com/grafana/cortex-jsonnet/cortex@main
28
+ $ tk init --k8s=1.21 # this includes github.com/jsonnet-libs/k8s-libsonnet/1.21@main
29
+ $ jb install github.com/cortexproject/cortex-jsonnet/cortex@main
29
30
```
30
31
31
- 1. Use the example monitoring .jsonnet.example:
32
+ 1. Use the example cortex-manifests .jsonnet.example:
32
33
33
34
```console
34
35
$ cp vendor/cortex/cortex-manifests.jsonnet.example environments/default/main.jsonnet
@@ -58,13 +59,11 @@ To generate the YAMLs for deploying Cortex:
58
59
To generate the Grafana dashboards and Prometheus alerts for Cortex:
59
60
60
61
```console
61
- $ GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool
62
- $ GO111MODULE=on go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
63
- $ git clone https://github.com/grafana /cortex-jsonnet
62
+ $ GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@2ff523ea63d1cdeee2a10e01d1d48d20adcc7030
63
+ $ GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0
64
+ $ git clone https://github.com/cortexproject /cortex-jsonnet
64
65
$ cd cortex-jsonnet
65
66
$ make build-mixin
66
67
```
67
68
68
69
This will leave all the alerts and dashboards in cortex-mixin/cortex-mixin.zip (or cortex-mixin/out).
69
-
70
- If you get an error like ` cannot use cli.StringSliceFlag literal (type cli.StringSliceFlag) as type cli.Flag in slice literal ` when installing [ mixtool] ( https://github.com/monitoring-mixins/mixtool/issues/27 ) , make sure you set ` GO111MODULE=on ` before ` go get ` .
0 commit comments