Skip to content

Commit 978fe49

Browse files
authored
Updated instructions to use tanka with this repo (#3)
Signed-off-by: Friedrich Gonzalez <[email protected]>
1 parent 7c8d81b commit 978fe49

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## master / unreleased
44

5+
* [CHANGE] Updated readme to use this repo with tanka
6+
57
## 1.11.0 / 2021-12-30
68

79
* [CHANGE] Store gateway: set `-blocks-storage.bucket-store.index-cache.memcached.max-get-multi-concurrency`,

README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

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

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+
512
To generate the YAMLs for deploying Cortex:
613

714
1. Make sure you have tanka and jb installed:
@@ -10,25 +17,19 @@ To generate the YAMLs for deploying Cortex:
1017

1118
```console
1219
$ # 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
1522
```
1623

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.
1825

1926
```console
2027
$ 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
2930
```
3031

31-
1. Use the example monitoring.jsonnet.example:
32+
1. Use the example cortex-manifests.jsonnet.example:
3233

3334
```console
3435
$ cp vendor/cortex/cortex-manifests.jsonnet.example environments/default/main.jsonnet
@@ -58,13 +59,11 @@ To generate the YAMLs for deploying Cortex:
5859
To generate the Grafana dashboards and Prometheus alerts for Cortex:
5960

6061
```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
6465
$ cd cortex-jsonnet
6566
$ make build-mixin
6667
```
6768

6869
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

Comments
 (0)