From ec6e2b19de165bd2266d4e7e81b599684c833b75 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Thu, 26 Oct 2023 15:00:16 +0200 Subject: [PATCH] docs: add more details for user management (#490) Explain: - adding a user - show what the `demouser` is allowed to do - enable new command for demouser --- docker/README.md | 36 ++++++++++++++++++++++++++++++++++-- docs/docs/index.md | 8 ++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index 8f28e9775..3d9c185f3 100644 --- a/docker/README.md +++ b/docker/README.md @@ -22,6 +22,31 @@ curl http://127.0.0.1:8088/api/v3/version On startup, some GRASS GIS locations are created by default but they are still empty. How to get some geodata to start processing, see in [Testing GRASS GIS inside a container](#grass-gis) below. +## Adding a user + +Adding the standard demouser: + +``` +actinia-user create -u demouser -g user -w "gu3st!pa55w0rd" -r user +``` + +Show what the demouser is allowed to do: + +``` +curl http://127.0.0.1:8088/api/v3/users/demouser +``` + +Enable new command for demouser: You first need to enter the running docker image, then `update_add` the command: + +``` +docker ps + +# use ID of running actinia docker image (example) +docker exec -it 9cf4b370b220 sh + +actinia-user update_add -u demouser -m r.import +``` + ## Installation with most recent GRASS GIS version @@ -85,8 +110,13 @@ python3 setup.py install sh /src/start.sh ``` -Now you have a running actinia instance locally. -For debugging or if you need to start the wsgi server regularly during development, you don't need to repeat all steps from inside the start.sh file. Instead, run the server with only one worker: +Now you have a running actinia instance locally! Check with + +``` +curl http://127.0.0.1:8088/api/v3/version +``` + +For debugging or if you need to start the wsgi server regularly during development, you don't need to repeat all steps from inside the `start.sh` file. Instead, run the server with only one worker: ``` python3 setup.py install @@ -156,6 +186,8 @@ grass /actinia_core/grassdb/nc_spm_08/PERMANENT --exec v.random output=myrandom grass /actinia_core/grassdb/nc_spm_08/PERMANENT --exec v.info -g myrandom ``` +# Testing GRASS GIS through actinia's REST API + You now have some data which you can access through actinia. To get information via API, start actinia with gunicorn and run diff --git a/docs/docs/index.md b/docs/docs/index.md index fdf9268a7..e1062112f 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,5 +1,13 @@ # Actinia - The GRASS GIS REST API + + + Fork Me On GitHub + + + + + **Actinia** is an open source REST API for scalable, distributed, high performance processing of geographical data that uses GRASS GIS for computational tasks.