-
Notifications
You must be signed in to change notification settings - Fork 13
Created script to delete grafana dashboards #574
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
Conversation
|
@nthomas-redhat @shtripat @GowthamShanmugam Please review. |
upgrades/delete_dashboards.py
Outdated
|
|
||
| username = raw_input("Please enter the grafana admin_username " | ||
| "default-[%s]: " % default_user) or default_user | ||
| password = raw_input("Please enter the grafana admin_password default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to hide this while user enters the password? That would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shtripat yes, it can be hidden, I thought of showing it so that user can cross-verify the default vs what he knows. Should I hide it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with any approach as this is just a tool, but personally I feel it should be hidden. Anyway if wrong password passed, later stage it would fail with error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shtripat Please review, I added command line args
It will work like: python delete_dashboards.py --username=admin --password=pass
If the args are not supplied, it will take from grafana.ini
upgrades/delete_dashboards.py
Outdated
| print "\n Clearing grafana dashboards \n" | ||
| delete_dashboards(server_ip=default_ip, user=username, | ||
| password=password) | ||
| print "\n Complete -- Please start tendrl-monitoring-integration service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And carbon-cache service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shtripat Rest of the steps will be supplied with the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in command line as well we should to restart tendrl-monitoring-integration and carbon-cache and order should be start carbon-cache and then tendrl-monitoring-integration I feel.
@nthomas-redhat what you say?
Otherwise code look good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shtripat We will not stop carbon cache as there is no interference with it. Should we stop carbon-cache ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no interference then its fine
Codecov Report
@@ Coverage Diff @@
## master #574 +/- ##
========================================
Coverage ? 44.1%
========================================
Files ? 41
Lines ? 2351
Branches ? 352
========================================
Hits ? 1037
Misses ? 1261
Partials ? 53
Continue to review full report at Codecov.
|
5387ce6 to
4c4e217
Compare
shtripat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@anmolsachan , i am not seeing the spec file changes here? |
For now let's go with the manual route; later we can think of get that integrated with ansible or rpm scripts itself. @anmolsachan , please raise an issue to track |
62bb3ed to
5949f92
Compare
|
@nthomas-redhat I have made changes according to your suggestion. The script is located at |
shtripat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@nthomas-redhat please check once and do the needful.
Couple of questions:
|
Its setup.py job
This tool gets deployed but no need to use it
If we try to execute the tool it will fail @anmolbabu correct me if wrong here. |
tendrl-bug-id: Tendrl#575 bugzilla: 1631260 Signed-off-by: Anmol Sachan <anmol13694@gmail.com> Making delete_dashboards.py as an executable
5949f92 to
50427c4
Compare
tendrl-bug-id: #575
bugzilla: 1631260
Signed-off-by: Anmol Sachan anmol13694@gmail.com