From 5283f5613561a887ef4dd9dd62c4d63e641abd8c Mon Sep 17 00:00:00 2001 From: Gresille & Siffle <39056254+GresilleSiffle@users.noreply.github.com> Date: Thu, 7 Dec 2023 17:18:36 +0100 Subject: [PATCH] [infra] chore: upgrade Loki and stop overwriting /etc/hosts (#1862) --- infra/ansible/inventory.yml | 6 +++--- infra/ansible/roles/base/tasks/main.yml | 10 ++++++---- infra/ansible/roles/base/templates/hosts | 7 ------- infra/ansible/roles/logging/files/loki.yml | 13 +++++++++++++ 4 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 infra/ansible/roles/base/templates/hosts diff --git a/infra/ansible/inventory.yml b/infra/ansible/inventory.yml index 207b860eff..1d12c01ac2 100644 --- a/infra/ansible/inventory.yml +++ b/infra/ansible/inventory.yml @@ -26,7 +26,7 @@ all: django_api_throttle_email: "5/min" chrome_extension_id: iahbndmibajbfljmlaaaikgognekamno - loki_version: "v2.2.1" + loki_version: "v2.9.2" nvm_version: "v0.38.0" npm_lts_version: "hydrogen" # codename for Node.js 18 (LTS) frontend_scheme: http @@ -85,7 +85,7 @@ all: django_api_throttle_email: "5/min" chrome_extension_id: iahbndmibajbfljmlaaaikgognekamno - loki_version: "v2.2.1" + loki_version: "v2.9.2" nvm_version: "v0.38.0" npm_lts_version: "hydrogen" # codename for Node.js 18 (LTS) frontend_scheme: https @@ -155,7 +155,7 @@ all: django_api_throttle_email: "12/min" chrome_extension_id: nidimbejmadpggdgooppinedbggeacla - loki_version: "v2.2.1" + loki_version: "v2.9.2" nvm_version: "v0.38.0" npm_lts_version: "hydrogen" # codename for Node.js 18 (LTS) frontend_scheme: https diff --git a/infra/ansible/roles/base/tasks/main.yml b/infra/ansible/roles/base/tasks/main.yml index bd570283ad..34405efbed 100644 --- a/infra/ansible/roles/base/tasks/main.yml +++ b/infra/ansible/roles/base/tasks/main.yml @@ -2,10 +2,12 @@ hostname: name: "{{machine_name}}" -- name: Copy hosts file - template: - src: hosts - dest: /etc/hosts +- name: Configure hosts file + blockinfile: + path: /etc/hosts + block: | + + 127.0.1.1 {{machine_name}} {{domain_name}} {{api_domain_name}} - name: Install minimal set of packages apt: diff --git a/infra/ansible/roles/base/templates/hosts b/infra/ansible/roles/base/templates/hosts deleted file mode 100644 index 2cb67d9622..0000000000 --- a/infra/ansible/roles/base/templates/hosts +++ /dev/null @@ -1,7 +0,0 @@ -127.0.0.1 localhost -127.0.1.1 {{machine_name}} {{domain_name}} {{api_domain_name}} - -# The following lines are desirable for IPv6 capable hosts -::1 localhost ip6-localhost ip6-loopback -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters diff --git a/infra/ansible/roles/logging/files/loki.yml b/infra/ansible/roles/logging/files/loki.yml index a978f4025f..0eefa19eee 100644 --- a/infra/ansible/roles/logging/files/loki.yml +++ b/infra/ansible/roles/logging/files/loki.yml @@ -14,6 +14,8 @@ ingester: chunk_idle_period: 5m chunk_retain_period: 30s max_transfer_retries: 0 + wal: + enabled: false schema_config: configs: @@ -39,7 +41,18 @@ limits_config: chunk_store_config: max_look_back_period: 0s + chunk_cache_config: + embedded_cache: + enabled: true + max_size_mb: 256 table_manager: retention_deletes_enabled: false retention_period: 0s + +query_range: + results_cache: + cache: + embedded_cache: + enabled: true + max_size_mb: 256