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

Documentation Rewrite #982

Merged
merged 72 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a2de08c
docs: create structure of docs overhaul
rfratto Sep 6, 2019
45bab6f
docs: add design docs back in
rfratto Sep 6, 2019
00619ef
docs: add community documentation
rfratto Sep 6, 2019
645762a
docs: add LogQL docs
rfratto Sep 6, 2019
7690e1d
docs: port existing operations documentation
rfratto Sep 9, 2019
d8ae8e8
docs: add new placeholder file for promtail configuration docs
rfratto Sep 9, 2019
0b3dff8
docs: add TOC for operations/storage
rfratto Sep 9, 2019
29c1df3
docs: add Loki API documentation
rfratto Sep 9, 2019
3a04846
docs: port troubleshooting document
rfratto Sep 9, 2019
ae76437
docs: add docker-driver documentation
rfratto Sep 10, 2019
3a3bebe
docs: link to configuration from main docker-driver document
rfratto Sep 10, 2019
dd4f217
docs: update API for new paths
rfratto Sep 10, 2019
67f104b
docs: fix broken links in api.md and remove json marker from examples
rfratto Sep 10, 2019
7720827
docs: incorporate api changes from #1009
rfratto Sep 11, 2019
3e76241
docs: port promtail documentation
rfratto Sep 12, 2019
01c4b72
docs: add TOC to promtail configuration reference
rfratto Sep 12, 2019
0e5a408
docs: fix promtail spelling errors
rfratto Sep 12, 2019
dfa8b6b
docs: add loki configuration reference
rfratto Sep 12, 2019
8b8d7cc
docs: add TOC to configuration
rfratto Sep 12, 2019
f0c9cf1
docs: add loki configuration example
rfratto Sep 13, 2019
938a679
docs: add Loki overview with brief explanation about each component
rfratto Sep 13, 2019
2a08cfa
docs: add comparisons document
rfratto Sep 13, 2019
0e0f526
docs: add info on table manager and update storage/README.md
rfratto Sep 13, 2019
564dcbd
docs: add getting started
rfratto Sep 16, 2019
0821f38
docs: incorporate config yaml changes from #755
rfratto Sep 16, 2019
398f4e1
docs: fix typo in releases url for promtail
rfratto Sep 17, 2019
d4f2e98
docs: add installation instructions
rfratto Sep 17, 2019
dd979d6
docs: add more configuration examples
rfratto Sep 17, 2019
de50e45
docs: add information on fluentd client
rfratto Sep 17, 2019
9cf01a4
docs: PR review feedback
rfratto Sep 17, 2019
7291b2c
docs: add architecture document
rfratto Sep 18, 2019
276bdae
docs: add missing information from old docs
rfratto Sep 18, 2019
f23fd99
`localy` typo
rfratto Sep 18, 2019
c12c929
docs: s/ran/run/g
rfratto Sep 18, 2019
0e6f789
Typo
pstibrany Sep 19, 2019
fe09d98
Typo
pstibrany Sep 19, 2019
e0015b1
Tyop
pstibrany Sep 19, 2019
6961bd9
Typo
pstibrany Sep 19, 2019
1c2d1c3
docs: fixed typo
pstibrany Sep 19, 2019
133796a
docs: PR feedback
rfratto Sep 19, 2019
c7b6b76
docs: @cyriltovena PR feedback
rfratto Sep 19, 2019
00357fe
docs: add more details to promtail url config option
rfratto Sep 20, 2019
b9c45bd
docs: expand promtail's pipelines document with extra detail
rfratto Sep 20, 2019
3fe341f
docs: fixed some spelling
pstibrany Sep 20, 2019
7a447f9
docs: remove reference to Stage interface in pipelines.md
rfratto Sep 20, 2019
012dc06
docs: clarify promtail configuration and scraping
rfratto Sep 20, 2019
5b9226f
docs: attempt #2 at explaining promtail's usage of machine hostname
rfratto Sep 20, 2019
5c0f523
docs: spelling fixes
pstibrany Sep 20, 2019
4034a3e
docs: add reference to promtail custom metrics and fix silly typo
rfratto Sep 20, 2019
bd4b360
docs: cognizant -> aware
rfratto Sep 20, 2019
dc893fa
docs: typo
pstibrany Sep 20, 2019
3bbaf35
docs: typos
pstibrany Sep 20, 2019
9d76dc1
docs: add which components expose which API endpoints in microservice…
rfratto Sep 20, 2019
e946c19
docs: change ksonnet installation to tanka
rfratto Sep 20, 2019
84d97dd
docs: address most @pracucci feedback
rfratto Sep 23, 2019
d3384bb
docs: fix all spelling errors so reviewers don't have to keep finding…
rfratto Sep 23, 2019
d0026d5
docs: incorporate changes to API endpoints made in #1022
rfratto Sep 23, 2019
48f75ef
docs: add missing loki metrics
rfratto Sep 23, 2019
87139c2
docs: add missing promtail metrics
rfratto Sep 23, 2019
fce9154
docs: @pstribrany feedback
rfratto Sep 24, 2019
a733358
docs: more @pracucci feedback
rfratto Sep 24, 2019
723dfde
docs: move metrics into a table
rfratto Sep 24, 2019
43168b9
docs: update push path references to /loki/api/v1/push
rfratto Sep 24, 2019
bb0eb6e
docs: add detail to further explain limitations of monolithic mode
rfratto Sep 24, 2019
b00c91d
docs: add alternative names to modes_of_operation diagram
rfratto Sep 24, 2019
7cc7bfd
docs: add log ordering requirement
rfratto Sep 24, 2019
d00243d
docs: add procedure for updating docs with latest version
rfratto Sep 24, 2019
65254ac
docs: separate out stages documentation into one document per stage
rfratto Sep 24, 2019
5852035
docs: list supported stores in storage documentation
rfratto Sep 25, 2019
13086c5
docs: add info on duplicate log lines in pipelines
rfratto Sep 25, 2019
5cc963e
docs: add line_format as key feature to fluentd
rfratto Sep 25, 2019
9c432f3
docs: hopefully final commit :)
rfratto Sep 25, 2019
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
Prev Previous commit
Next Next commit
docs: add installation instructions
  • Loading branch information
rfratto committed Sep 25, 2019
commit d4f2e9842eea3b902d64cb8ed1692447450fe5b1
4 changes: 4 additions & 0 deletions docs/installation/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Installing Loki

1. [Installing using Ksonnet (recommended)](./ksonnet.md)
2. [Installing through Helm](./helm.md)
3. [Installing locally](./local.md)
107 changes: 107 additions & 0 deletions docs/installation/helm.md
Original file line number Diff line number Diff line change
@@ -1 +1,108 @@
# Installing Loki with Helm

## Prerequisites

Make sure you have Helm [installed](https://helm.sh/docs/using_helm/#installing-helm) and
[deployed](https://helm.sh/docs/using_helm/#installing-tiller) to your cluster. Then add
Loki's chart repository to Helm:

```bash
$ helm repo add loki https://grafana.github.io/loki/charts
```

You can update the chart repository by running:

```bash
$ helm repo update
```

## Deploy Loki to your cluster

### Deploy with default config

```bash
$ helm upgrade --install loki loki/loki-stack
```

### Deploy in a custom namespace

```bash
$ helm upgrade --install loki --namespace=loki loki/loki
```

### Deploy with custom config

```bash
$ helm upgrade --install loki loki/loki --set "key1=val1,key2=val2,..."
```

### Deploy Loki Stack (Loki, Promtail, Grafana, Prometheus)

```bash
$ helm upgrade --install loki loki/loki-stack
```

## Deploy Grafana to your cluster

To install Grafana on your cluster with Helm, use the following command:

```bash
$ helm install stable/grafana -n loki-grafana
```

To get the admin password for the Grafana pod, run the following command:

```bash
$ kubectl get secret --namespace <YOUR-NAMESPACE> loki-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
```

To access the Grafana UI, run the following command:

```bash
$ kubectl port-forward --namespace <YOUR-NAMESPACE> service/loki-grafana 3000:80
```

Navigate to `http://localhost:3000` and login with `admin` and the password
output above. Then follow the [instructions for adding the Loki Data Source](../getting-started/grafana.md), using the URL
`http://loki:3100/` for Loki.

## Run Loki behind HTTPS ingress

If Loki and Promtail are deployed on different clusters you can add an Ingress
in front of Loki. By adding a certificate you create an HTTPS endpoint. For
extra security you can also enable Basic Authentication on the Ingress.

In promtail, set the following values to communicate using HTTPS and basic
authentication:

```yaml
loki:
serviceScheme: https
user: user
password: pass
```

Sample Helm template for Ingress:

```yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: {{ .Values.ingress.class }}
ingress.kubernetes.io/auth-type: "basic"
ingress.kubernetes.io/auth-secret: {{ .Values.ingress.basic.secret }}
name: loki
spec:
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- backend:
serviceName: loki
servicePort: 3100
tls:
- secretName: {{ .Values.ingress.cert }}
hosts:
- {{ .Values.ingress.host }}
```
66 changes: 66 additions & 0 deletions docs/installation/ksonnet.md
Original file line number Diff line number Diff line change
@@ -1 +1,67 @@
# Installing Loki with Ksonnet

## Prerequisites

Make sure you have Ksonnet v0.8.0:

```
$ brew install https://raw.githubusercontent.com/ksonnet/homebrew-tap/82ef24cb7b454d1857db40e38671426c18cd8820/ks.rb
$ brew pin ks
$ ks version
ksonnet version: v0.8.0
jsonnet version: v0.9.5
client-go version: v1.6.8-beta.0+$Format:%h$
```

In your config repo, if you don't have a ksonnet application, make a new one
(copies the credentials from your current kubectl context):

```
$ ks init <application name>
$ cd <application name>
$ ks env add loki --namespace=loki
```

## Deploying

Grab the Loki module using jb:

```bash
$ go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
$ jb init
$ jb install github.com/grafana/loki/production/ksonnet/loki
```

Be sure to replace the username, password and the relevant htpasswd contents.
Making sure to set the value for username, password, and htpasswd properly,
replace the contents of `environments/loki/main.jsonnet` with:

```jsonnet
local gateway = import 'loki/gateway.libsonnet';
local loki = import 'loki/loki.libsonnet';
local promtail = import 'promtail/promtail.libsonnet';

loki + promtail + gateway {
_config+:: {
namespace: 'loki',
htpasswd_contents: 'loki:$apr1$H4yGiGNg$ssl5/NymaGFRUvxIV1Nyr.',

promtail_config: {
scheme: 'http',
hostname: 'gateway.%(namespace)s.svc' % $._config,
username: 'loki',
password: 'password',
container_root_path: '/var/lib/docker',
},

replication_factor: 3,
consul_replicas: 1,
},
}
```

Notice that `container_root_path` is your own data root for the Docker Daemon,
run `docker info | grep "Root Dir"` to get it.

Run `ks show loki` to see the manifests that will be deployed to the cluster and
finally run `ks apply loki` to deploy it.
41 changes: 41 additions & 0 deletions docs/installation/local.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# Installing Loki Locally

## Release Binaries

Every [Loki release](https://github.com/grafana/loki/releases) includes
prebuilt binaries:

```bash
# download a binary (modify app, os, and arch as needed)
# Installs v0.3.0. Go to the releases page for the latest version
$ curl -fSL -o "/usr/local/bin/loki.gz" "https://github.com/grafana/loki/releases/download/v0.3.0/loki_linux_amd64.gz"
$ gunzip "/usr/local/bin/loki.gz"

# make sure it is executable
$ chmod a+x "/usr/local/bin/loki"
```

## Manual Build

### Prerequisites

- Go 1.11 or later
- Make
- Docker (for updating protobuf files and yacc files)

### Building

Clone Loki to `$GOPATH/src/github.com/grafana/loki`:

```bash
$ git clone https://github.com/grafana/loki $(go env GOPATH)/src/github.com/grafana/loki
```

Then change into that directory and run `make loki`:

```bash
$ cd $(go env GOPATH)/src/github.com/grafana/loki
$ make loki

# A file at ./cmd/loki/loki will be created and is the
# final built binary.
```