8000 Server utility script cleanup by 0xdade · Pull Request #373 · natlas/natlas · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Server utility script cleanup #373

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 acc 8000 ount

Merged
merged 4 commits into from
Aug 2, 2020
Merged

Server utility script cleanup #373

merged 4 commits into from
Aug 2, 2020

Conversation

0xdade
Copy link
Member
@0xdade 0xdade commented Jul 31, 2020

No associated issues for this, but useful and standalone updates nonetheless.

Removes the legacy elastic-snapshot.py utility, which was barely functional at best, and actively misleading at worst. I have no intention of supporting elastic snapshotting as part of the application, which requires configuring the elastic cluster and then using that information in the application. There are surely other tools that handle setting up point-in-time or periodic elastic snapshots much better than this script ever did.

Updates add-user.py and add-scope.py to be more proactive about ensuring necessary arguments are provided and don't require an entire (time-costly) app construction just to look at the arguments.

add-user.py no longer modifies existing users, which was, in my opinion, a confusing behavior for a tool named add-user.

add-scope.py now produces json output instead of the simple prints that it used to use. The json output makes more sense to redirect to a file, too. E.g. docker exec -ti natlas-server ./add-scope.py --blacklist /data/test_scope.txt --verbose > test_import.json

The remaining concern I have with the add-scope utility is that it only reads from files which means docker cp will still be necessary to get test_scope.txt into the context of the container (though we should generally always be mounting a persistent directory to /data so maybe that isn't as big a deal).

@0xdade 0xdade added the server affecting natlas-server label Jul 31, 2020
@codeclimate
Copy link
codeclimate bot commented Jul 31, 2020

Code Climate has analyzed commit 490bc8a and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@0xdade 0xdade requested review from ajacques and removed request for ajacques July 31, 2020 21:08
@0xdade 0xdade marked this pull request as draft July 31, 2020 21:18
@0xdade
Copy link
Member Author
0xdade commented Jul 31, 2020

Taking this back to draft actually because now is as good a time as any to turn these into flask cli commands and close out #216

@0xdade 0xdade marked this pull request as ready for review August 1, 2020 04:31
@0xdade 0xdade requested a review from ajacques August 1, 2020 04:31
@0xdade 0xdade added the enhancement New feature or request label Aug 1, 2020
0xdade added 4 commits August 1, 2020 12:04
This script was barely functional, barely useful, and likely to remain neglected. Use existing tools to perform elastic snapshots and/or backups isntead.
This closes #216 and as an extra, adds a couple new commands to the command line utilities.
@0xdade 0xdade merged commit 4bbed7f into natlas:main Aug 2, 2020
@0xdade 0xdade deleted the script_cleanup branch August 2, 2020 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server affecting natlas-server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0