Page MenuHomePhabricator

[o11y,logging,infra] Deploy Loki to store Toolforge tool log data
Closed, ResolvedPublic

Description

Log Toolforge tool output to a Loki instance.

Related Objects

StatusSubtypeAssignedTask
Resolved Bstorm
Resolved GTirloni
Resolved Bstorm
Resolved Bstorm
DeclinedNone
Opentaavi
ResolvedFeaturetaavi
OpenNone
OpenNone
Resolvedtaavi
Resolvedtaavi
OpenFeatureRaymond_Ndibe
Resolvedtaavi
OpenNone
OpenFeatureNone
Resolvedtaavi
Resolvedtaavi
ResolvedAndrew
Resolveddcaro
ResolvedNone
ResolvedAndrew

Event Timeline

I believe
https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/tree/T386480?ref_type=heads
and
https://gitlab.wikimedia.org/repos/cloud/toolforge/lima-kilo/-/tree/T386480?ref_type=heads

Will get loki installed in lima-kilo. @aborrero @dcaro @Andrew @Raymond_Ndibe opinions?

I fussed a little with the git clone in roles/k8s/tasks/toolforge-deploy_components.yaml to pull T386480 as it isn't merged yet, so I don't really have a full test of the patch. Is there a way to do a true test of a patch like this that I'm not realizing?

Thanks!

I fussed a little with the git clone in roles/k8s/tasks/toolforge-deploy_components.yaml to pull T386480 as it isn't merged yet, so I don't really have a full test of the patch. Is there a way to do a true test of a patch like this that I'm not realizing?

Depends on your definition of true test :)

For a full lima-kilo rebuild with the new code, you can pass the value lima_kilo_toolforge_deploy_repo.ref (defined under lima-klio roles/k8s/defaults/main.yaml), either editing the file or passing --extra-vars lima_kilo_toolforge_deploy_repo.ref=new/value when running start-devenv.sh.

If you just want to try the toolforge-deploy part of it you can apply the patch on the clone inside lima-kilo (under ~/toolforge-deploy) and run the deploy script ~/toolforge-deploy/deploy.sh by hand.

If you want to test also the lima-kilo changes without rebuilding, you can re-run ansible from within lima-kilo with toolforge_ansible_run.sh -t k8s (or fulling without params)

Will get loki installed in lima-kilo. @aborrero @dcaro @Andrew @Raymond_Ndibe opinions?

The patches look ok to me (have not tested them yet, testing something else...), they have no extra config for loki yet right?

The patches look ok to me (have not tested them yet, testing something else...), they have no extra config for loki yet right?

Correct this is installing a stock loki. Do we think we should merge these and continue from here or take a different approach?

Do we think we should merge these and continue from here or take a different approach?

It should be ok, we could not install loki by default too and avoid people that don't need it yet from getting it installed, depends on how soon you expect to start integrating it with the rest of toolforge.

dcaro renamed this task from loki into lima-kilo to [o11y,logging,infra] loki into lima-kilo.Feb 19 2025, 8:51 AM
dcaro triaged this task as High priority.
dcaro edited projects, added Toolforge (Toolforge iteration 17); removed Toolforge.
dcaro moved this task from Next Up to In Progress on the Toolforge (Toolforge iteration 17) board.

As I consider it more I guess it doesn't make much of a difference if it is merged now, as about the biggest "risk" of not merging is that I eventually push a toolforge-deploy_components.yaml that is set to pull T386480. So perhaps it is better to wait until we decide more exactly what we want before merging.

dcaro moved this task from In Progress to Next Up on the Toolforge (Toolforge iteration 18) board.
taavi renamed this task from [o11y,logging,infra] loki into lima-kilo to [o11y,logging,infra] Deploy Loki to store Toolforge log data.May 23 2025, 2:32 PM
taavi removed projects: User-aborrero, Epic.
taavi removed a subscriber: rook.
taavi subscribed.

Tentatively claiming.

Change #1154802 had a related patch set uploaded (by Majavah; author: Majavah):

[cloud/wmcs-cookbooks@main] toolforge: Add cookbook to mirror Loki-related images

https://gerrit.wikimedia.org/r/1154802

Change #1154802 merged by jenkins-bot:

[cloud/wmcs-cookbooks@main] toolforge: Add cookbook to mirror Loki-related images

https://gerrit.wikimedia.org/r/1154802

taavi lowered the priority of this task from High to Medium.Jun 13 2025, 9:31 AM

Change #1163729 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/puppet@production] P:toolforge::prometheus: Add scrape rules for Loki/Alloy

https://gerrit.wikimedia.org/r/1163729

taavi renamed this task from [o11y,logging,infra] Deploy Loki to store Toolforge log data to [o11y,logging,infra] Deploy Loki to store Toolforge tool log data.Jul 1 2025, 12:16 PM
taavi updated the task description. (Show Details)

Change #1163729 merged by Majavah:

[operations/puppet@production] P:toolforge::prometheus: Add scrape rules for Loki/Alloy

https://gerrit.wikimedia.org/r/1163729