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 monitoring using prometheus-stack #51

Merged
merged 6 commits into from
Feb 23, 2024
Merged

Conversation

gabor-boros
Copy link
Contributor

@gabor-boros gabor-boros commented Nov 27, 2023

Description

This PR adds the prometheus-stack Helm chart as a dependency to monitor the cluster, closing #37 and #38. The stack is crafted by Prometheus.

The default values are disabling Prometheus and Grafana, so if one only needs Prometheus but not Grafana, no extra steps are necessary.

Screenshot 2023-11-27 at 09 41 57

An example configuration for the chart (by the end user) could be

# values.yaml

prometheusstack:
  enabled: true

  grafana:
    enabled: true

    ingress:
      enabled: true
      ingressClassName: nginx
      annotations:
        cert-manager.io/cluster-issuer: "harmony-letsencrypt-global"
        nginx.ingress.kubernetes.io/ssl-redirect: "true"
      hosts:
        - grafana.example.com
      tls:
        - secretName: promstack-ingress-tls
          hosts:
            - grafana.example.com

Testing

  1. Setup a K8s cluster on the provider of your choice
  2. Apply the harmony chart with prometheusstack.enabled = false (not that it is false)
  3. Assign the domain name to the IP address you got
  4. Now, enable Prometheus and Grafana as shown above in the snippet
  5. Apply the changes and wait for propagation
  6. Navigate to grafana.<YOUR DOMAIN> and login with admin/prom-operator
  7. Check that a default chart is loaded, showing metrics of the cluster

OR: navigate to https://grafana.se6017.opencraft.hosting and continue from step 6.

Default Grafana password

Admin password is not pre-generated, because it is not picked up by the grafana pod yet -- this is a bug on their end. For more information, visit: prometheus-community/helm-charts#3679

Author notes

This PR introduces clusterDomain which is a new Harmony chart-specific setting. At the moment, we use it for the NOTES.txt and echo's ingress. However, this could be used later with other templates in the chart.

Why not using the {{ .Values.clusterDomain }} or {{ tpl (.Values.clusterDomain | toYaml) . }} in the values.yaml? Simply put, we can't. It won't be parsed.

@openedx-webhooks
Copy link

Thanks for the pull request, @gabor-boros! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 27, 2023
@gabor-boros gabor-boros self-assigned this Nov 27, 2023
@gabor-boros gabor-boros added waiting for eng review PR is ready for review. Review and merge it, or suggest changes. core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Nov 27, 2023
@itsjeyd
Copy link

itsjeyd commented Dec 7, 2023

@gabor-boros I'm assuming you'll coordinate with other CCs/maintainers about getting a review, but let me know if I can help with that in any way.

@jfavellar90
Copy link
Contributor

@gabor-boros could you please rebase your changes? Please let me know to jump right into the review :)

@gabor-boros
Copy link
Contributor Author

@jfavellar90 The PR is rebased now. You can progress with the review 😊

@gabor-boros gabor-boros merged commit 2a0f6b2 into main Feb 23, 2024
2 checks passed
@openedx-webhooks
Copy link

@gabor-boros 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@gabor-boros gabor-boros deleted the gabor/feat-add-promstack branch February 23, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U waiting for eng review PR is ready for review. Review and merge it, or suggest changes.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants