Arkisto-Platform / describo-online

https://describo.github.io
GNU General Public License v3.0
7 stars 2 forks source link

Fully local development setup #25

Closed beepsoft closed 2 years ago

beepsoft commented 2 years ago

While looking for a RO-Crate editor I just found Describo and tried the offline version and it is really impressive, thank you for your efforts!

Now I would like to try experimenting with Describo online and try to set up a local development environment. I have a couple of problems I couldn't find answers to reading through the wiki documentation.

First of all the architecture is not really clear to me: what is a backend and how does it relate to an auth provider and what is the postgresql dependency is used for when there's a backend?

This page states that "Authentication for describo is provided by Okta". But then the opening page also lists "reva configuration" as an authentication provider. And then it turns out that if ownCloud is the backend then ownCloud can be the auth provider as well.

So overall it is not clear what a backend is for, what an auth provider is for and how these can mix and match?

Then when I try to setup a local development environment following

https://github.com/Arkisto-Platform/describo-online/wiki/setting-up-for-development

step 3 is "Register your application with Microsoft" and 4. "Create an Okta organisation and setup your application". From my previous readings these should be optional steps rather than the actaul 3. or 4. steps, right? Moreover I would prefer not to use an external system like OneDrive and Okta if they arenot the actual target of my development.

What would really be helpful is an example with a docker-compose.yaml file, which sets up local dependencies for postgresql/backend/auth (ownCloud?, Minio?) and a configuration for Describo API and UI so that both of these can be run in development mode connecting to the services provided by the docker-compose.yaml.

juriroemer commented 2 years ago

@beepsoft what i've been doing is this:

This gives you a minimal, live editable dev instance without any external auth or storage providers on localhost:9000

beepsoft commented 2 years ago

Thanks @juriroemer!

Unfortunately it doesn't work right away on my M1 Mac (grpc packages are not available for arm https://github.com/grpc/grpc-node/issues/1405), but I will try on an Intel one today.

I also tried running just the api natively on M1, however the paths like "/srv/configuration/development-configuration.json" are all meant to be used inside the docker container. It may worth considering making these path configurable (eg. from env vars) so that the api module can be run in any environment not just the docker container.

juriroemer commented 2 years ago

@beepsoft Hmm, not sure what kind of problems you're having. Did you get the configuration file from Arkisto-Platform/describo-local (not describo online) and rename it?

I'm running this setup on both an amd64 Arch-based EndeavourOS and an arm64 M1 Mac without problems. Haven't seen any grpc warnings or errors, either. Of course Docker might be tricky on M1 (don't know if there finally is a working Docker CLI version tbh), but with the Docker desktop client (has to be running before invoking the docker-compose command!) and docker-compose, both installed via homebrew, this works for me. docker-compose has to be linked into the Docker plugins foldern, though.

beepsoft commented 2 years ago

You are right, I was actually copying the example-configuration.json and not the describo-configuration.json you linked. With that it starts up OK!

I just played a little bit with it, but the UI and functionality seems to be different from the offline Describo version. How are these two related? Do they (will they) share some code or they will be two separate apps?

juriroemer commented 2 years ago

I just played a little bit with it, but the UI and functionality seems to be different from the offline Describo version. How are these two related? Do they (will they) share some code or they will be two separate apps?

I don't know - as far as I know, describo-online is what's actively beeing developed at the moment. I am in the process of creating views and adapting parts of the UI for embedment in sciebo RDS - have a look at the rds components branch (just clone the fork, checkout the branch and run as I explained before), if you want. (wip)

marcolarosa commented 2 years ago

Resolving this as it seems to be sorted. Also, the documentation was updated as well https://github.com/Arkisto-Platform/describo-online/wiki/Localhost-authentication