From b0042d087a3a787f9a2d30e8da3e51999a2cf48d Mon Sep 17 00:00:00 2001 From: Ed Welch Date: Mon, 26 Oct 2020 12:32:03 -0400 Subject: [PATCH] Update helm and jsonnet to new release (#2809) * helm and ksonnet to use boltdb-shipper * updating image versions and chart versions * update the chart deps * updating reference to new version * fix helm config for boltdb-shipper --- docs/sources/clients/aws/ec2/_index.md | 2 +- docs/sources/clients/aws/ecs/_index.md | 2 +- docs/sources/clients/promtail/installation.md | 2 +- docs/sources/installation/docker.md | 18 ++++++++--------- docs/sources/operations/loki-canary.md | 2 +- production/docker-compose.yaml | 4 ++-- production/helm/fluent-bit/Chart.yaml | 4 ++-- production/helm/loki-stack/Chart.yaml | 4 ++-- production/helm/loki-stack/requirements.yaml | 6 +++--- production/helm/loki/Chart.yaml | 4 ++-- production/helm/loki/values.yaml | 20 ++++++++++++------- production/helm/promtail/Chart.yaml | 4 ++-- production/helm/promtail/values.yaml | 2 +- .../ksonnet/loki-canary/config.libsonnet | 2 +- production/ksonnet/loki/config.libsonnet | 10 +++++----- production/ksonnet/loki/images.libsonnet | 2 +- production/ksonnet/promtail/config.libsonnet | 2 +- 17 files changed, 48 insertions(+), 42 deletions(-) diff --git a/docs/sources/clients/aws/ec2/_index.md b/docs/sources/clients/aws/ec2/_index.md index bf0d415184..24bbadb8af 100644 --- a/docs/sources/clients/aws/ec2/_index.md +++ b/docs/sources/clients/aws/ec2/_index.md @@ -91,7 +91,7 @@ Next we'll download, install and give executable right to [Promtail](../../promt ```bash mkdir /opt/promtail && cd /opt/promtail -curl -O -L "https://github.com/grafana/loki/releases/download/v1.6.0/promtail-linux-amd64.zip" +curl -O -L "https://github.com/grafana/loki/releases/download/v2.0.0/promtail-linux-amd64.zip" unzip "promtail-linux-amd64.zip" chmod a+x "promtail-linux-amd64" ``` diff --git a/docs/sources/clients/aws/ecs/_index.md b/docs/sources/clients/aws/ecs/_index.md index c1d2e2ddf3..370a1c72fa 100644 --- a/docs/sources/clients/aws/ecs/_index.md +++ b/docs/sources/clients/aws/ecs/_index.md @@ -98,7 +98,7 @@ curl https://raw.githubusercontent.com/grafana/loki/master/docs/sources/clients/ ```json { "essential": true, - "image": "grafana/fluent-bit-plugin-loki:1.6.0-amd64", + "image": "grafana/fluent-bit-plugin-loki:2.0.0-amd64", "name": "log_router", "firelensConfiguration": { "type": "fluentbit", diff --git a/docs/sources/clients/promtail/installation.md b/docs/sources/clients/promtail/installation.md index 7f2baf93e0..ae291b2be8 100644 --- a/docs/sources/clients/promtail/installation.md +++ b/docs/sources/clients/promtail/installation.md @@ -15,7 +15,7 @@ Every release includes binaries for Promtail which can be found on the ```bash # modify tag to most recent version -docker pull grafana/promtail:1.6.0 +docker pull grafana/promtail:2.0.0 ``` ## Helm diff --git a/docs/sources/installation/docker.md b/docs/sources/installation/docker.md index 4a45e01681..dc5d655862 100644 --- a/docs/sources/installation/docker.md +++ b/docs/sources/installation/docker.md @@ -18,10 +18,10 @@ For production, we recommend installing with Tanka or Helm. Copy and paste the commands below into your command line. ```bash -wget https://raw.githubusercontent.com/grafana/loki/v1.6.0/cmd/loki/loki-local-config.yaml -O loki-config.yaml -docker run -v $(pwd):/mnt/config -p 3100:3100 grafana/loki:1.6.0 -config.file=/mnt/config/loki-config.yaml -wget https://raw.githubusercontent.com/grafana/loki/v1.6.0/cmd/promtail/promtail-docker-config.yaml -O promtail-config.yaml -docker run -v $(pwd):/mnt/config -v /var/log:/var/log grafana/promtail:1.6.0 -config.file=/mnt/config/promtail-config.yaml +wget https://raw.githubusercontent.com/grafana/loki/v2.0.0/cmd/loki/loki-local-config.yaml -O loki-config.yaml +docker run -v $(pwd):/mnt/config -p 3100:3100 grafana/loki:2.0.0 -config.file=/mnt/config/loki-config.yaml +wget https://raw.githubusercontent.com/grafana/loki/v2.0.0/cmd/promtail/promtail-docker-config.yaml -O promtail-config.yaml +docker run -v $(pwd):/mnt/config -v /var/log:/var/log grafana/promtail:2.0.0 -config.file=/mnt/config/promtail-config.yaml ``` When finished, `loki-config.yaml` and `promtail-config.yaml` are downloaded in the directory you chose. Docker containers are running Loki and Promtail using those config files. @@ -36,10 +36,10 @@ Copy and paste the commands below into your terminal. Note that you will need to ```bash cd "" -wget https://raw.githubusercontent.com/grafana/loki/v1.6.0/cmd/loki/loki-local-config.yaml -O loki-config.yaml -docker run -v :/mnt/config -p 3100:3100 grafana/loki:1.6.0 --config.file=/mnt/config/loki-config.yaml -wget https://raw.githubusercontent.com/grafana/loki/v1.6.0/cmd/promtail/promtail-docker-config.yaml -O promtail-config.yaml -docker run -v :/mnt/config -v /var/log:/var/log grafana/promtail:1.6.0 --config.file=/mnt/config/promtail-config.yaml +wget https://raw.githubusercontent.com/grafana/loki/v2.0.0/cmd/loki/loki-local-config.yaml -O loki-config.yaml +docker run -v :/mnt/config -p 3100:3100 grafana/loki:2.0.0 --config.file=/mnt/config/loki-config.yaml +wget https://raw.githubusercontent.com/grafana/loki/v2.0.0/cmd/promtail/promtail-docker-config.yaml -O promtail-config.yaml +docker run -v :/mnt/config -v /var/log:/var/log grafana/promtail:2.0.0 --config.file=/mnt/config/promtail-config.yaml ``` When finished, `loki-config.yaml` and `promtail-config.yaml` are downloaded in the directory you chose. Docker containers are running Loki and Promtail using those config files. @@ -51,6 +51,6 @@ Navigate to http://localhost:3100/metrics to view the output. Run the following commands in your command line. They work for Windows or Linux systems. ```bash -wget https://raw.githubusercontent.com/grafana/loki/v1.6.0/production/docker-compose.yaml -O docker-compose.yaml +wget https://raw.githubusercontent.com/grafana/loki/v2.0.0/production/docker-compose.yaml -O docker-compose.yaml docker-compose -f docker-compose.yaml up ``` diff --git a/docs/sources/operations/loki-canary.md b/docs/sources/operations/loki-canary.md index 8f79b9c29f..bca1c4b19f 100644 --- a/docs/sources/operations/loki-canary.md +++ b/docs/sources/operations/loki-canary.md @@ -116,7 +116,7 @@ Loki Canary is also provided as a Docker container image: ```bash # change tag to the most recent release -$ docker pull grafana/loki-canary:1.6.0 +$ docker pull grafana/loki-canary:2.0.0 ``` ### Kubernetes diff --git a/production/docker-compose.yaml b/production/docker-compose.yaml index 1773d94aac..710a7cf76d 100644 --- a/production/docker-compose.yaml +++ b/production/docker-compose.yaml @@ -5,7 +5,7 @@ networks: services: loki: - image: grafana/loki:1.6.0 + image: grafana/loki:2.0.0 ports: - "3100:3100" command: -config.file=/etc/loki/local-config.yaml @@ -13,7 +13,7 @@ services: - loki promtail: - image: grafana/promtail:1.6.0 + image: grafana/promtail:2.0.0 volumes: - /var/log:/var/log command: -config.file=/etc/promtail/config.yml diff --git a/production/helm/fluent-bit/Chart.yaml b/production/helm/fluent-bit/Chart.yaml index 0a3fcd8e57..03f1bd1595 100644 --- a/production/helm/fluent-bit/Chart.yaml +++ b/production/helm/fluent-bit/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: "v1" name: fluent-bit -version: 0.3.2 -appVersion: v1.6.0 +version: 2.0.0 +appVersion: v2.0.0 kubeVersion: "^1.10.0-0" description: "Uses fluent-bit Loki go plugin for gathering logs and sending them to Loki" home: https://grafana.com/loki diff --git a/production/helm/loki-stack/Chart.yaml b/production/helm/loki-stack/Chart.yaml index 188e23e234..a210965461 100644 --- a/production/helm/loki-stack/Chart.yaml +++ b/production/helm/loki-stack/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: "v1" name: loki-stack -version: 0.41.2 -appVersion: v1.6.0 +version: 2.0.0 +appVersion: v2.0.0 kubeVersion: "^1.10.0-0" description: "Loki: like Prometheus, but for logs." home: https://grafana.com/loki diff --git a/production/helm/loki-stack/requirements.yaml b/production/helm/loki-stack/requirements.yaml index 8f9c9ef3d7..423ed50d41 100644 --- a/production/helm/loki-stack/requirements.yaml +++ b/production/helm/loki-stack/requirements.yaml @@ -2,15 +2,15 @@ dependencies: - name: "loki" condition: loki.enabled repository: "file://../loki" - version: "^0.31.1" + version: "^2.0.0" - name: "promtail" condition: promtail.enabled repository: "file://../promtail" - version: "^0.25.1" + version: "^2.0.0" - name: "fluent-bit" condition: fluent-bit.enabled repository: "file://../fluent-bit" - version: "^0.3.1" + version: "^2.0.0" - name: "grafana" condition: grafana.enabled version: "~5.7.0" diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 024f4fe375..6806bd9699 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: "v1" name: loki -version: 0.31.1 -appVersion: v1.6.0 +version: 2.0.0 +appVersion: v2.0.0 kubeVersion: "^1.10.0-0" description: "Loki: like Prometheus, but for logs." home: https://grafana.com/loki diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 3b6806eaed..7e60032400 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -1,6 +1,6 @@ image: repository: grafana/loki - tag: 1.6.0 + tag: 2.0.0 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -71,18 +71,21 @@ config: reject_old_samples_max_age: 168h schema_config: configs: - - from: 2018-04-15 - store: boltdb + - from: 2020-10-24 + store: boltdb-shipper object_store: filesystem - schema: v9 + schema: v11 index: prefix: index_ - period: 168h + period: 24h server: http_listen_port: 3100 storage_config: - boltdb: - directory: /data/loki/index + boltdb_shipper: + active_index_directory: /data/loki/boltdb-shipper-active + cache_location: /data/loki/boltdb-shipper-cache + cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space + shared_store: filesystem filesystem: directory: /data/loki/chunks chunk_store_config: @@ -90,6 +93,9 @@ config: table_manager: retention_deletes_enabled: false retention_period: 0s + compactor: + working_directory: /data/loki/boltdb-shipper-compactor + shared_store: filesystem ## Additional Loki container arguments, e.g. log level (debug, info, warn, error) extraArgs: {} diff --git a/production/helm/promtail/Chart.yaml b/production/helm/promtail/Chart.yaml index b75a2e5a39..18fc6fb4a7 100644 --- a/production/helm/promtail/Chart.yaml +++ b/production/helm/promtail/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: "v1" name: promtail -version: 0.25.1 -appVersion: v1.6.0 +version: 2.0.0 +appVersion: v2.0.0 kubeVersion: "^1.10.0-0" description: "Responsible for gathering logs and sending them to Loki" home: https://grafana.com/loki diff --git a/production/helm/promtail/values.yaml b/production/helm/promtail/values.yaml index 20933b2b5b..08840e5d0f 100644 --- a/production/helm/promtail/values.yaml +++ b/production/helm/promtail/values.yaml @@ -17,7 +17,7 @@ initContainer: image: repository: grafana/promtail - tag: 1.6.0 + tag: 2.0.0 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. diff --git a/production/ksonnet/loki-canary/config.libsonnet b/production/ksonnet/loki-canary/config.libsonnet index 31f74c597f..5783b8c7fe 100644 --- a/production/ksonnet/loki-canary/config.libsonnet +++ b/production/ksonnet/loki-canary/config.libsonnet @@ -1,5 +1,5 @@ { _images+:: { - loki_canary: 'grafana/loki-canary:1.6.0', + loki_canary: 'grafana/loki-canary:v2.0.0', }, } diff --git a/production/ksonnet/loki/config.libsonnet b/production/ksonnet/loki/config.libsonnet index ee6efafa66..21c8069d86 100644 --- a/production/ksonnet/loki/config.libsonnet +++ b/production/ksonnet/loki/config.libsonnet @@ -10,7 +10,7 @@ grpc_server_max_msg_size: 100 << 20, // 100MB // flag for tuning things when boltdb-shipper is current or upcoming index type. - using_boltdb_shipper: false, + using_boltdb_shipper: true, // flags for running ingesters/queriers as a statefulset instead of deployment type. stateful_ingesters: false, @@ -48,7 +48,7 @@ ], table_prefix: $._config.namespace, - index_period_hours: 168, // 1 week + index_period_hours: 24, // 1 day ruler_enabled: false, @@ -283,11 +283,11 @@ max_look_back_period: 0, }, - // Default schema config is bigtable/gcs, this will need to be overridden for other stores + // Default schema config is boltdb-shipper/gcs, this will need to be overridden for other stores schema_config: { configs: [{ - from: '2018-04-15', - store: 'bigtable', + from: '2020-10-24', + store: 'boltdb-shipper', object_store: 'gcs', schema: 'v11', index: { diff --git a/production/ksonnet/loki/images.libsonnet b/production/ksonnet/loki/images.libsonnet index 26328d4d26..67a695ff43 100644 --- a/production/ksonnet/loki/images.libsonnet +++ b/production/ksonnet/loki/images.libsonnet @@ -4,7 +4,7 @@ memcached: 'memcached:1.5.17-alpine', memcachedExporter: 'prom/memcached-exporter:v0.6.0', - loki: 'grafana/loki:1.6.0', + loki: 'grafana/loki:2.0.0', distributor: self.loki, ingester: self.loki, diff --git a/production/ksonnet/promtail/config.libsonnet b/production/ksonnet/promtail/config.libsonnet index 471204719e..71ed39ce4b 100644 --- a/production/ksonnet/promtail/config.libsonnet +++ b/production/ksonnet/promtail/config.libsonnet @@ -1,6 +1,6 @@ { _images+:: { - promtail: 'grafana/promtail:1.6.0', + promtail: 'grafana/promtail:v2.0.0', }, _config+:: {