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: Manage grafana content/assets via terraform #913

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

Conversation

mrnicegyu11
Copy link
Member

@mrnicegyu11 mrnicegyu11 commented Dec 16, 2024

Based-on previous PRS:

What do these changes do?

  • Add: Conveniant access to CI_ENV_FILE to common.Makefile (necessary for handling S3 tf-state in grafana-tf)
  • Remove: grafana-export Makefile target, old python grafana import/export scripts
  • Add: terraform for grafana dashboard management, associated Makefile, jinja2 templating for terraform-grafana to make local deployment with local file provider for terraform state work

Related issue/s

#778

Related PR/s

https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/1170

Checklist

  • I tested and it works

@mrnicegyu11 mrnicegyu11 self-assigned this Dec 16, 2024
@mrnicegyu11 mrnicegyu11 mentioned this pull request Dec 18, 2024
1 task
@mrnicegyu11 mrnicegyu11 changed the title 2024/add/grafana terraform ✨ Add: Manage grafana content/assets via terraform Dec 18, 2024
@mrnicegyu11 mrnicegyu11 marked this pull request as ready for review December 18, 2024 09:06
Copy link
Collaborator

@YuryHrytsuk YuryHrytsuk left a comment

Choose a reason for hiding this comment

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

Thanks.

I wonder what can be done with ci.env file

scripts/common.Makefile Outdated Show resolved Hide resolved
scripts/common.Makefile Outdated Show resolved Hide resolved
scripts/common.Makefile Outdated Show resolved Hide resolved
services/monitoring/grafana/Makefile Outdated Show resolved Hide resolved
services/monitoring/grafana/terraform/dashboards.tf Outdated Show resolved Hide resolved
services/monitoring/grafana/terraform/dashboards.tf Outdated Show resolved Hide resolved
services/monitoring/grafana/Makefile Outdated Show resolved Hide resolved
services/monitoring/grafana/terraform/main.tf.j2 Outdated Show resolved Hide resolved
services/monitoring/grafana/terraform/.gitignore Outdated Show resolved Hide resolved
scripts/common.Makefile Outdated Show resolved Hide resolved
scripts/common.Makefile Outdated Show resolved Hide resolved
scripts/common.Makefile Outdated Show resolved Hide resolved
Copy link
Collaborator

@YuryHrytsuk YuryHrytsuk 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 significant amount of work 🙌

services/monitoring/grafana/Makefile Outdated Show resolved Hide resolved
services/monitoring/grafana/Makefile Show resolved Hide resolved
services/monitoring/grafana/Makefile Show resolved Hide resolved
@@ -0,0 +1,65 @@
.DEFAULT_GOAL := help
REPO_BASE_DIR := $(shell git rev-parse --show-toplevel)
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI:

This will not work if git is not there which happens if we pass ops environments as an CI Artifact (aka without .git folder in root folder)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for letting me know, then I will have to make a special case here as well.

I am starting to wonder if this CI Artifacts approach is sustainable, I had to do a lot of customization for it and I am at this point not sure about the benefits. Is it more than just another hoop to jump through?

Copy link
Member Author

Choose a reason for hiding this comment

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

--> After talking:

  • It works afterall, since this is executed in a gitlab runner that clones the ops-environments repo.
  • I need to refactor the cloning of ops-environments though, since it already happens 3 times.
  • Do we need a github rate-limit token?

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