Skip to content

feat(docs): add cache sections to gitlab docker kubernetes executors #792

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Fral738
Copy link
Collaborator

@Fral738 Fral738 commented Apr 22, 2025

No description provided.

@Fral738 Fral738 force-pushed the feat/docs/add-cache-section-to-gitlab branch from 0cfed7d to fb1b21f Compare April 22, 2025 10:19
@Fral738 Fral738 changed the title Feat/docs/add cache section to gitlab feat(docs): add cache sections to gitlab docker kubernetes executors Apr 22, 2025
@Fral738 Fral738 requested a review from alexey-igrychev April 22, 2025 10:20
@Fral738 Fral738 force-pushed the feat/docs/add-cache-section-to-gitlab branch from 4f60511 to 640471a Compare April 22, 2025 10:49
@@ -28,7 +28,40 @@ On the GitLab Runner host, open its `config.toml` configuration file and add the
volumes = ["/home/build/.werf"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This volume is also related to caching and requires running werf host cleanup.
Let’s stick to a single approach that uses caching — users can decide which parts to disable if needed.
It would also be helpful to add a comment to each volume for clarity.

"/home/ubuntu/.local/share/containers:/home/build/.local/share/containers",
# werf cache
"/home/ubuntu/.werf:/home/build/.werf"
]
```
Copy link
Member

@ilya-lesikov ilya-lesikov Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda confused. Initially this file was an instruction for any kind of GitLab Runner. Now it's only for GitLab Runner in Docker. Is GitLab Runner in Docker really a requirement? Note that Executor is a different thing, you can have GitLab Runner on a bare OS, but with Docker Executor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally, the documentation seemed to support both scenarios:

  1. GitLab Runner installed directly on the host OS
  2. GitLab Runner running inside a Docker container

However, the cache configuration provided didn't actually work in either case.

I'm now updating the documentation to include a working cache configuration, but the setup differs depending on how GitLab Runner itself is deployed (not just the executor type).

Should I provide instructions for both cases, or do we want to support only one of them going forward?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much it differs? Can we just say "go to GitLab docs to install GitLab Runner the way you want", then explain extra steps needed for different types of the GitLab Runners? Maybe we can even explain it in a generic way, like there was instructions on what to add to config.toml without specifying how to update the config.toml (depends on how the Runner installed).

Copy link
Collaborator Author

@Fral738 Fral738 May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary:
We'll use named Docker volumes to mount cache directories in the GitLab Runner configuration. This approach works consistently regardless of how the Runner itself is deployed — whether it's running directly on the host or inside a Docker container. It also avoids relying on $HOME or UID-specific paths, making the setup more robust and portable.

As a result, the documentation can stay generic: we’ll point users to the [official GitLab docs](https://docs.gitlab.com/runner/install/) for installation and registration steps, and only highlight the specific additions needed in config.toml to support caching and other features.

Copy link
Member

@ilya-lesikov ilya-lesikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

Signed-off-by: Evgeniy Frolov <[email protected]>
"/home/ubuntu/.local/share/containers:/home/build/.local/share/containers",
# werf cache
"/home/ubuntu/.werf:/home/build/.werf"
]
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much it differs? Can we just say "go to GitLab docs to install GitLab Runner the way you want", then explain extra steps needed for different types of the GitLab Runners? Maybe we can even explain it in a generic way, like there was instructions on what to add to config.toml without specifying how to update the config.toml (depends on how the Runner installed).

Signed-off-by: Evgeniy Frolov <[email protected]>
@Fral738 Fral738 marked this pull request as draft May 5, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants