-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit just move everything over
Signed-off-by: Goutham Veeramachaneni <[email protected]>
- Loading branch information
0 parents
commit 3ff1d4c
Showing
29 changed files
with
2,392 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Jsonnet for Cortex | ||
|
||
This repo has the jsonnet for deploying cortex and the related monitoring in Kubernetes. | ||
|
||
To generate the YAMLs for deploying Cortex: | ||
|
||
1. Make sure you have tanka and jb installed: | ||
|
||
``` | ||
$ go get -u github.com/grafana/tanka/cmd/tk | ||
$ go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb | ||
``` | ||
|
||
2. Initialise the application and download the cortex jsonnet lib. | ||
|
||
``` | ||
$ tk init | ||
``` | ||
|
||
3. Install the cortex jsonnet. | ||
|
||
``` | ||
$ jb install github.com/ksonnet/ksonnet-lib/ksonnet.beta.3 | ||
$ cp vendor/ksonnet.beta.3/*.libsonnet lib | ||
$ jb install https://github.com/grafana/cortex-jsonnet/cortex | ||
``` | ||
|
||
3. Use the example monitoring.jsonnet.example: | ||
|
||
``` | ||
$ mv vendor/cortex/cortex-manifests.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 generate the dashboards and alerts for Cortex: | ||
|
||
``` | ||
$ cd cortex-mixin | ||
$ jb install | ||
$ jsonnet -S alerts.jsonnet | ||
$ jsonnet -J vendor -S dashboards.jsonnet | ||
$ jsonnet -J vendor -S recording_rules.jsonnet | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
std.manifestYamlDoc((import 'mixin.libsonnet').prometheus_alerts) |
Oops, something went wrong.