Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(ksonnet): include ksonnet-lib #1042

Merged
merged 11 commits into from
Sep 24, 2019
Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions production/ksonnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ In your config repo, if you don't yet have the directory structure of Tanka set
# create a directory (any name works)
$ mkdir config && cd config/
$ tk init
$ tk env add loki --namespace=loki
$ tk env add environments/loki --namespace=loki
$ tk env set environments/loki --server=https://$k8s_master_node_ip:6443
daixiang0 marked this conversation as resolved.
Show resolved Hide resolved
# Ksonnet kubernetes libraries
$ jb install github.com/ksonnet/ksonnet-lib/ksonnet.beta.3/k.libsonnet
$ jb install github.com/ksonnet/ksonnet-lib/ksonnet.beta.3/k8s.libsonnet
```

## Deploying Promtail to your cluster.
Expand All @@ -27,11 +31,10 @@ Grab the promtail module using jb:
$ jb install github.com/grafana/loki/production/ksonnet/promtail
```

Replace the contents of `environments/loki/main.jsonnet` with:
Replace the contents of `loki/main.jsonnet` with:
daixiang0 marked this conversation as resolved.
Show resolved Hide resolved
```jsonnet
local promtail = import 'promtail/promtail.libsonnet';


promtail + {
_config+:: {
namespace: 'loki',
Expand All @@ -54,17 +57,15 @@ promtail + {
```
Notice that `container_root_path` is your own data root for docker daemon, use `docker info | grep "Root Dir"` to get it.

Then do `ks show loki` to see the manifests that'll be deployed to your cluster.
Apply them using `ks apply loki`.
Now use `tk show environments/loki` to see the yaml, and `tk apply environments/loki` to apply it to the cluster.

## Deploying Loki to your cluster.

If you want to further also deploy the server to the cluster, then run the following to install the module:

```
jb install github.com/grafana/loki/production/ksonnet/loki
$ jb install github.com/grafana/loki/production/ksonnet/loki
```

Be sure to replace the username, password and the relevant htpasswd contents.
Replace the contents of `environments/loki/main.jsonnet` with:

Expand Down