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

feat: integrate dockerised prometheus and grafana #3432

Merged
merged 8 commits into from
May 31, 2021

Conversation

burnerlee
Copy link
Contributor

this PR adds dockerised Prometheus and Grafana to evalai. The Prometheus server starts at 9090, and the grafana server at 3000. The password for admin user on Grafana is evalai. Prometheus has been added as a data source on grafana

@codecov-commenter
Copy link

codecov-commenter commented May 26, 2021

Codecov Report

Merging #3432 (651eded) into master (96968d6) will decrease coverage by 0.49%.
The diff coverage is 34.50%.

@@            Coverage Diff             @@
##           master    #3432      +/-   ##
==========================================
- Coverage   72.93%   72.44%   -0.50%     
==========================================
  Files          83       20      -63     
  Lines        5368     3175    -2193     
==========================================
- Hits         3915     2300    -1615     
+ Misses       1453      875     -578     
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 65.17% <33.22%> (-8.52%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 95.74% <50.00%> (+1.06%) ⬆️
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 30 more
Impacted Files Coverage Δ
frontend/src/js/controllers/authCtrl.js 53.91% <6.38%> (-12.95%) ⬇️
frontend/src/js/controllers/profileCtrl.js 79.76% <20.00%> (-13.10%) ⬇️
frontend/src/js/controllers/permissionCtrl.js 36.36% <22.22%> (-63.64%) ⬇️
frontend/src/js/controllers/challengeCtrl.js 65.17% <33.22%> (-8.52%) ⬇️
frontend/src/js/controllers/updateProfileCtrl.js 82.55% <44.44%> (-10.30%) ⬇️
frontend/src/js/controllers/challengeListCtrl.js 95.74% <50.00%> (+1.06%) ⬆️
...ntend/src/js/controllers/challengeHostTeamsCtrl.js 70.50% <66.66%> (-1.18%) ⬇️
frontend/src/js/controllers/teamsCtrl.js 71.17% <75.00%> (ø)
frontend/src/js/controllers/ChallengeInviteCtrl.js 100.00% <100.00%> (ø)
frontend/src/js/controllers/SubmissionFilesCtrl.js 95.45% <100.00%> (ø)
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 510b7aa...651eded. Read the comment docs.

@burnerlee burnerlee force-pushed the monitoring-dev branch 3 times, most recently from 4fdad2d to 2a8f7b0 Compare May 26, 2021 15:38
image: grafana/grafana:latest
user: "1000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=evalai
Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee move this to a docker.env file for grafana. We can't check in the secrets in the repository

.gitignore Outdated
@@ -67,3 +67,5 @@ ssl/
out/
.idea_modules/

#monitoring-setup
Copy link
Member

Choose a reason for hiding this comment

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

Please add a space after #

@@ -0,0 +1,8 @@
global:
scrape_interval: 5s
Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee we can increase this to 30s

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
rev: 21.5b1
Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee you can remove this change from the PR

.gitignore Outdated
@@ -67,3 +67,5 @@ ssl/
out/
.idea_modules/

#monitoring-setup
prometheus/prometheus_db/
Copy link
Member

Choose a reason for hiding this comment

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

Please add grafana_db in gitignore too.

@@ -32,3 +32,5 @@ EKS_NODEGROUP_ROLE_ARN=x
C_FORCE_ROOT=true
ENVIRONMENT=dev
SERVICE_DNS=localhost

GF_SECURITY_ADMIN_PASSWORD=evalai
Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee can you also add environment variables to configure username

.gitignore Outdated
@@ -67,3 +67,7 @@ ssl/
out/
.idea_modules/

# Monitoring-Setup
prometheus/prometheus_db/*
!prometheus/prometheus_db/.gitkeep
Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee the .gitkeep files are not being ignored. Please fix that too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Ram81 I committed these files to push the grafana/grafana_db, prometheus/prometheus_db folders, as these directories are currently empty, i need to keep a gitkeep file in them and commit that file

Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee we don't need to check in the folders if there is nothing in that folder. And you can remove .gitkeep from promethues folder as we already have the config file in that folder.

.gitignore Outdated
@@ -67,3 +67,7 @@ ssl/
out/
.idea_modules/

# Monitoring-Setup
Copy link
Member

Choose a reason for hiding this comment

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

remove -

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

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

@burnerlee let's create a single monitoring folder and move all grfana and prometheus config files in that folder. Please make the required changes to the docker setup

@@ -32,3 +32,6 @@ EKS_NODEGROUP_ROLE_ARN=x
C_FORCE_ROOT=true
ENVIRONMENT=dev
SERVICE_DNS=localhost

GF_SECURITY_ADMIN_USER=evalai
GF_SECURITY_ADMIN_PASSWORD=evalaiai
Copy link
Member

Choose a reason for hiding this comment

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

@burnerlee can we change the username to admin and password to password for dev

Copy link
Member

@Ram81 Ram81 left a comment

Choose a reason for hiding this comment

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

LGTM. @RishabhJain2018 can you review the PR

Copy link
Member

@RishabhJain2018 RishabhJain2018 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!

@RishabhJain2018 RishabhJain2018 merged commit 313e399 into Cloud-CV:master May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants