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

Implement Promtail as a new core service #426

Merged
merged 9 commits into from
Aug 1, 2023
Merged

Conversation

DavidePrincipi
Copy link
Member

@DavidePrincipi DavidePrincipi commented Jul 28, 2023

This PR merges the ns8-promtail rootfull core module into the core codebase.

  • The Systemd unit promtail.service is enabled and started by the node agent in create-cluster and join-node actions.
  • Existing rootfull service is stopped and disabled during the core update
  • The install script pulls all core images (not only Rclone)
  • Fixed node and cluster environment handling during join-node

See https://trello.com/c/asPlFBiY/310-core-p1-log-relaunched-collecting-viewing

@DavidePrincipi DavidePrincipi self-assigned this Jul 28, 2023
@DavidePrincipi DavidePrincipi force-pushed the promtail-merge branch 2 times, most recently from 3451a7e to 091147e Compare July 31, 2023 11:06
Merge ns8-promtail module into the core code.
We cannot rely on local Redis replica to discover the modules installed
on the local node, for two important reasons:

1. the cluster/module_node relation is not still updated when
   node/add-module runs. The information is missing completely;

2. even if we fix the above point and we push the information in the
   master Redis instance at the right time, there is no guarantee that
   it is replicated when node/add-modules starts `generate-promtail-config`

As consequence, the list of local modules is obtained by looking at
their state/ directory with filesystem-only operations. Redis is not
involved in this discovery process.
Merge the environment NODE_ID with existing values, do truncate the
file!
- Do not extract .gitignore file
- Assume state/ dirs are created when the image is extracted
@DavidePrincipi DavidePrincipi merged commit 9536cf3 into main Aug 1, 2023
2 checks passed
@DavidePrincipi DavidePrincipi deleted the promtail-merge branch August 1, 2023 15:02
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