codenotary / immudb

immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history
https://immudb.io
Other
8.54k stars 341 forks source link

immuadmin client #103

Closed ghost closed 4 years ago

padurean commented 4 years ago

Initially only the statistics and status commands will be implemented. Other commands will be added after full user management is implemented in the immudb server.

vchain-us-mgmt commented 4 years ago

The full list of features for immuadmin is the following:

vchain-us-mgmt commented 4 years ago

Please add the "uptime" metric to the list

vchain-us-mgmt commented 4 years ago

Here's a proposal for the immuadmin commands.

The general structure is: >immuadmin [Options] COMMAND [ARG...]

Options: -h, --help (returns the help menu) -v, --version (returns the version of immuadmin)

Commands:

immuadmin login (log in to an immudb instance) immuadmin logout (log out from an immudb instance) immuadmin status (returns the status of the immudb process) immuadmin stats (Display immudb resource usage statistics) immuadmin version (Show the immudb version information) immuadmin set [options] ARG options: --immuadmin-password (Change the immuadmin password) immuadmin install COMMAND [options] ARG commands: service (Install immuadmin as a service) options: --local (by default the command tries to download the binary online) immuadmin uninstall COMMAND [options] ARG (this command must return a "Are you sure you want to uninstall immudb? [Y/N] and also requires to type in the immuadmin password again) commands: service (Install immuadmin as a service) options: --remove-files (clean up from all immudb files) immuadmin user [option] options: --create (create username or UID (format: <name|uid>)) --delete (create username or UID (format: <name|uid>)) --set-permissions read/readwrite (set permissions for username or UID (format: <name|uid>)) immuadmin backup [option] --file (path and name of the backup file) immuadmin restore [option] --file (path and name of the backup file) immuadmin start (start immudb server) immuadmin restart [option] (restart immudb server) options: -t, --time (seconds to wait before stopping it) immuadmin stop [option] (stop immudb server) options: -t, --time (seconds to wait before stopping it)

vchain-us-mgmt commented 4 years ago

The graphical view of the stats looks good, except for the two ovals in the middle. Let’s get rid of the ovals and just show them as histograms like HTOP.

padurean commented 4 years ago

@vchain-us-mgmt Ok, i will show them using evolving line charts, like the other metrics. In case you want them differently, one can see what options are available here: https://github.com/gizak/termui

vchain-us-mgmt commented 4 years ago

some of the commands in https://docs.google.com/spreadsheets/d/14oMtqfml2nVVDKaq-6j8R8baQNFQDuTt5ijfFocmwro/edit#gid=0 have not been implemented yet. They are highlighted in red.

padurean commented 4 years ago

@vchain-us-mgmt immuadmin version is already implemented. And also the other ones (install, start, stop etc. services)

padurean commented 4 years ago

Closing this. I've added a separate issue for the "cold" backup/restore feature.