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

Add a docker-compose local setup to fully test Mimir #1049

Merged
merged 56 commits into from
Feb 16, 2022

Conversation

pracucci
Copy link
Collaborator

@pracucci pracucci commented Feb 4, 2022

What this PR does:
In this PR I propose to introduce a docker-compose local setup (based on single binary and memberlist) to allow the community to have a quick way to try the latest stable release of Mimir in a HA setup. It also runs Prometheus (used both to scrape Mimir metrics and run recording rules) as well as Grafana with our dashboard provisioned.

The PR includes a tutorial-style README.md guiding the user step-by-step. I've try to follow the Grafana tutorial style, but I haven't used tutorial markdown syntax given for the moment won't be published as a Grafana tutorial.

Which issue(s) this PR fixes:
Fixes #991
Fixes #1024

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@osg-grafana osg-grafana changed the title Docs: add a docker-compose local setup to fully test Mimir Add a docker-compose local setup to fully test Mimir Feb 7, 2022
@osg-grafana
Copy link
Contributor

Removed Docs: from title because this is not user documentation and belongs in a product demo location. Will pull in Julie Dam who leads up content strategy as a whole.

@pracucci
Copy link
Collaborator Author

pracucci commented Feb 7, 2022

Removed Docs: from title because this is not user documentation and belongs in a product demo location. Will pull in Julie Dam who leads up content strategy as a whole.

Well, the plan was to write a documentation page too but it hasn't been written yet (reason why PR is still a draft).

@osg-grafana
Copy link
Contributor

Removed Docs: from title because this is not user documentation and belongs in a product demo location. Will pull in Julie Dam who leads up content strategy as a whole.

Well, the plan was to write a documentation page too but it hasn't been written yet (reason why PR is still a draft).

@KMiller-Grafana, this looks like it is in your court because it relates to configuration. I agree with you that this should not be in the user documentation.

Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

I like how simple the config is.

Copy link
Contributor

@replay replay left a comment

Choose a reason for hiding this comment

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

This looks good to me.

I spun it up on Ubuntu 20.04 and I can successfully access Grafana and query some of the metrics

@pstibrany
Copy link
Member

Shall we add a script that starts all of this (start.sh)? Not everyone may know how to start docker-compose setup from CLI.

@pracucci
Copy link
Collaborator Author

pracucci commented Feb 7, 2022

Shall we add a script that starts all of this (start.sh)? Not everyone may know how to start docker-compose setup from CLI.

I think you've approved too quickly. This will come along with a tutorial I'm going to write. It also miss some config, like Alertmanager sharding.

@pstibrany
Copy link
Member

I think you've approved too quickly. This will come along with a tutorial I'm going to write. It also miss some config, like Alertmanager sharding.

I approved because I'm perfectly fine merging this in the current state and iterating on it over next several PRs.

@osg-grafana osg-grafana self-requested a review February 7, 2022 18:26
Copy link
Contributor

@osg-grafana osg-grafana left a comment

Choose a reason for hiding this comment

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

Please move this to a demo subdirectory and out of docs/sources/.

@GrafanaWriter
Copy link
Contributor

This should publish out of grafana/tutorials after the Mimir launch as the tutorials repo is public.

For now, we should move the file out of the /docs directory to avoid issues with the docs publication pipeline.

I'm happy to work with you on this, @pracucci to make it sparkle. The template for tutorials was created some time ago, but it can be a guide and something I'm open to refining along the way (as long as it doesn't slow us down too much).

Copy link
Contributor

@osg-grafana osg-grafana left a comment

Choose a reason for hiding this comment

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

Unblocking with the assumption that it is moved out of the docs/ directory.

@pracucci pracucci marked this pull request as ready for review February 8, 2022 14:41
@pracucci
Copy link
Collaborator Author

pracucci commented Feb 8, 2022

@GrafanaWriter @osg-grafana I've moved it outside of docs/ and I've written a tutorial. As noted in the PR description, I've try to follow the Grafana tutorial style, but I haven't used tutorial markdown syntax yet given for the moment it won't be published as a Grafana tutorial.

Could I get your review, please?

@pracucci
Copy link
Collaborator Author

pracucci commented Feb 8, 2022

@pstibrany @replay This PR is now ready to review. The tutorial and docker-compose setup includes everything I had in mind when I started working on it. Could you take another look, please?

@osg-grafana osg-grafana added the type/docs Improvements or additions to documentation label Feb 8, 2022
Copy link
Contributor

@GrafanaWriter GrafanaWriter left a comment

Choose a reason for hiding this comment

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

Thanks for writing this, @pracucci, and for adopting/adapting the template. Please let me know of any questions or comments.

tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/README.md Outdated Show resolved Hide resolved
tutorials/play-with-grafana-mimir/rules.yaml Outdated Show resolved Hide resolved
@pracucci
Copy link
Collaborator Author

pracucci commented Feb 9, 2022

Thanks @GrafanaWriter for your review. I've accepted most suggestions and replied to a couple of them. Could you take another look, please?

pracucci and others added 21 commits February 16, 2022 11:26
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Fiona Artiaga <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Fiona Artiaga <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>

Co-authored-by: Jennifer Villa <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
@pracucci
Copy link
Collaborator Author

To avoid that other users experience the same confusion, would it make sense to change the example recording rule to from count:up to sum:up? I can imagine that this is something which could confuse other people too.

Very good point. Changed to sum:up.

I've also accepted all suggestions.

Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
@pracucci
Copy link
Collaborator Author

pracucci commented Feb 16, 2022

I did follow the tutorial one last time and looks good to me. I'm going to merge this PR.

Edit: I will add the integration test of the config in a follow up PR and the diagram to the tutorial once ready.

@pracucci pracucci enabled auto-merge (squash) February 16, 2022 10:46
@pracucci pracucci merged commit a23f392 into main Feb 16, 2022
@pracucci pracucci deleted the 1-command-mimir-setup branch February 16, 2022 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Improvements or additions to documentation
Projects
None yet
6 participants