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

Configure loki #144

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Configure loki #144

wants to merge 10 commits into from

Conversation

nbenmoody
Copy link
Collaborator

@nbenmoody nbenmoody commented Jan 15, 2025

Description

This PR collects up work required to install and configure a Loki server on a new Droplet. Given that so much peripheral work was needed amongst these scripts, since the new Droplet for Loki is being created using the new terraform provisioning process, there are a lot of changes across these scripts along with the Loki configuration.

Related Issues

Changes Made

  • I created a new role to handle all the tasks required for ssh keys and hardening, to replace the original harden role.
  • I added a draft playbook/inventory/role for Loki installation and configuration.
  • I deprecated the old new-do-droplet playbook.

Additional Notes

This installs and configures the Loki server itself, but integration with our existing Grafana instance is another step (to be carried out manually, for now). This also does not configure the agents that will push logs to Loki, which will come as a next PR here.

Copy link
Member

@mplorentz mplorentz left a comment

Choose a reason for hiding this comment

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

LGTM so far.

@@ -0,0 +1,17 @@
all:
vars:
do_spaces_bucket_name: verse-loki-storage
Copy link
Member

Choose a reason for hiding this comment

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

is this a bucket for persistent storage of application data? Is that different from a DO volume?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's correct! By using a Spaces Bucket, instead of a DO Volume (which is attached to a Droplet), we can change where/how we are hosting Loki in the future without losing our storage, since they are decoupled.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, you are thinking ahead to a post-droplet world, gotcha!

register: output

- name: Check that Loki is running
ansible.builtin.assert:
Copy link
Member

Choose a reason for hiding this comment

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

cool

@nbenmoody nbenmoody requested a review from mplorentz January 18, 2025 16:04
@nbenmoody
Copy link
Collaborator Author

@mplorentz - This PR is now ready for full review. The Loki server has been configured using it, and is standing up at loki.planetary.tools, and integrated as a datasource in Grafana now.

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.

2 participants