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

Deployment of Loki #2682

Closed
alexandre-allard opened this issue Jul 29, 2020 · 0 comments · Fixed by #2722
Closed

Deployment of Loki #2682

alexandre-allard opened this issue Jul 29, 2020 · 0 comments · Fixed by #2722
Assignees
Labels
complexity:medium Something that requires one or few days to fix kind:enhancement New feature or request topic:log Anything related to log centralization system

Comments

@alexandre-allard
Copy link
Contributor

alexandre-allard commented Jul 29, 2020

Component: salt, charts, log, build

Why this is needed: See #2668

What should be done:

Implementation proposal (strongly recommended):
As we already did for other add-ons (Prometheus, Dex, ...), we can use the charts provided by Loki to ease the generation of Salt formulas, using the charts/renderer.py script:

  helm repo add loki https://grafana.github.io/loki/charts
  helm repo update
  helm fetch -d charts --untar loki/loki
  ./charts/render.py loki --namespace metalk8s-logging \
    charts/loki.yaml charts/loki/ \
    > salt/metalk8s/addons/loki/deployed/charts.sls

Loki helm chart: https://github.com/grafana/loki/tree/master/production/helm

Test plan:
Add simple test to ensure loki is OK during pre-merge by sending a log on Loki API and reading it afterwards.

@alexandre-allard alexandre-allard added kind:enhancement New feature or request topic:log Anything related to log centralization system labels Jul 29, 2020
@alexandre-allard alexandre-allard changed the title Deployment of Loki & Fluent Bit Deployment of Loki Aug 3, 2020
@alexandre-allard alexandre-allard self-assigned this Aug 5, 2020
@alexandre-allard alexandre-allard added the complexity:medium Something that requires one or few days to fix label Aug 5, 2020
alexandre-allard added a commit that referenced this issue Aug 6, 2020
  helm repo add loki https://grafana.github.io/loki/charts
  helm repo update
  helm fetch -d charts --untar loki/loki

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 6, 2020
Add `--remove-manifest KIND NAME` option allowing
to remove some manifests from the resulting chart.
Useful when we want to deploy and manage ourself
some object of an addon (e.g. Loki secret).

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 6, 2020
this file is used to overwrite default values.

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 6, 2020
alexandre-allard added a commit that referenced this issue Aug 6, 2020
  ./charts/render.py loki --namespace metalk8s-logging \
    --remove-manifest Secret loki \
    charts/loki.yaml charts/loki/ \
    > salt/metalk8s/addons/logging/loki/deployed/chart.sls

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 6, 2020
alexandre-allard added a commit that referenced this issue Aug 6, 2020
alexandre-allard added a commit that referenced this issue Aug 6, 2020
For now it only deploys loki, but it'll
also include Fluent Bit installation.

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 6, 2020
alexandre-allard added a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
@TeddyAndrieux TeddyAndrieux self-assigned this Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
this file is used to overwrite default values.

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
  ./charts/render.py loki --namespace metalk8s-logging \
    --remove-manifest Secret loki \
    charts/loki.yaml charts/loki/ \
    > salt/metalk8s/addons/logging/loki/deployed/chart.sls

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
For now it only deploys loki, but it'll
also include Fluent Bit installation.

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 6, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 7, 2020
  helm repo add loki https://grafana.github.io/loki/charts
  helm repo update
  helm fetch -d charts --untar loki/loki

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 10, 2020
For now it only deploys loki, but it'll
also include Fluent Bit installation.

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 10, 2020
This is needed as we put Loki inside logging directory,
so the path is not metalk8s/addons/loki/config/loki.yaml
but metalk8s/addons/logging/loki/config/loki.yaml, so
we need to be able to set the path.

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 10, 2020
Re-render the chart with CSC:

  ./charts/render.py loki \
    --remove-manifest Secret loki \
    --namespace metalk8s-logging \
    --service-config loki metalk8s-loki-config \
    metalk8s/addons/logging/loki/config/loki.yaml \
    charts/loki.yaml charts/loki/ \
    > salt/metalk8s/addons/logging/loki/deployed/chart.sls

Refs: #2682
alexandre-allard pushed a commit that referenced this issue Aug 10, 2020
Add an example file to create a sparseLoopDevice volume for Loki, add
this file in the ISO and also use it for CI and vagrant deployment

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
  helm repo add loki https://grafana.github.io/loki/charts
  helm repo update
  helm fetch -d charts --untar loki/loki

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
Add `--remove-manifest KIND NAME` option allowing
to remove some manifests from the resulting chart.
Useful when we want to deploy and manage ourself
some object of an addon (e.g. Loki secret).

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
this file is used to overwrite default values.

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
TeddyAndrieux added a commit that referenced this issue Aug 11, 2020
Enable persistence from Loki chart
NOTE: That Loki chart does not allow to provide selector to claim
Volume, so any volume using `metalk8s-loki` storageClass can be bound to
the Loki container

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
  ./charts/render.py loki --namespace metalk8s-logging \
    --remove-manifest Secret loki \
    charts/loki.yaml charts/loki/ \
    > salt/metalk8s/addons/logging/loki/deployed/chart.sls

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
For now it only deploys loki, but it'll
also include Fluent Bit installation.

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
This is needed as we put Loki inside logging directory,
so the path is not metalk8s/addons/loki/config/loki.yaml
but metalk8s/addons/logging/loki/config/loki.yaml, so
we need to be able to set the path.

Refs: #2682
TeddyAndrieux pushed a commit that referenced this issue Aug 11, 2020
Re-render the chart with CSC:

  ./charts/render.py loki \
    --remove-manifest Secret loki \
    --namespace metalk8s-logging \
    --service-config loki metalk8s-loki-config \
    metalk8s/addons/logging/loki/config/loki.yaml \
    charts/loki.yaml charts/loki/ \
    > salt/metalk8s/addons/logging/loki/deployed/chart.sls

Refs: #2682
TeddyAndrieux added a commit that referenced this issue Aug 11, 2020
Add an example file to create a sparseLoopDevice volume for Loki, add
this file in the ISO and also use it for CI and vagrant deployment

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 13, 2020
set to 2 weeks which means we can have 3 weeks
of retention at most.

Refs: #2682
Ebaneck pushed a commit that referenced this issue Aug 17, 2020
This is needed as we put Loki inside logging directory,
so the path is not metalk8s/addons/loki/config/loki.yaml
but metalk8s/addons/logging/loki/config/loki.yaml, so
we need to be able to set the path.

Refs: #2682
Ebaneck pushed a commit that referenced this issue Aug 17, 2020
This is needed as we put Loki inside logging directory,
so the path is not metalk8s/addons/loki/config/loki.yaml
but metalk8s/addons/logging/loki/config/loki.yaml, so
we need to be able to set the path.

Refs: #2682
(cherry picked from commit daea4b2)
alexandre-allard added a commit that referenced this issue Aug 20, 2020
This is needed for Fluent Bit to be able to
send every logs to each Loki instance.

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 20, 2020
This is needed for Fluent Bit to be able to
send every logs to each Loki instance.

Refs: #2682
alexandre-allard added a commit that referenced this issue Aug 24, 2020
This is needed for Fluent Bit to be able to
send every logs to each Loki instance.

Refs: #2682
ChengYanJin pushed a commit that referenced this issue Sep 3, 2020
This is needed for Fluent Bit to be able to
send every logs to each Loki instance.

Refs: #2682
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:medium Something that requires one or few days to fix kind:enhancement New feature or request topic:log Anything related to log centralization system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants