Skip to content
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

add app provider and app provider registry #2204

Merged
merged 13 commits into from
Sep 3, 2021
Merged

Conversation

wkloucek
Copy link
Contributor

@wkloucek wkloucek commented Jun 23, 2021

Description

Adds the AppProviderRegistry to the storage gateway service and introduces an app provider service. The app provider can be currently connected to the CS3org WOPI server.

This enables us to use the OpenInApp action in oCIS WOPI server: owncloud/ocis-wopiserver#16

Related Issues

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-owncloud-storage-2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-owncloud failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-ocis failed. The build is cancelled...

1 similar comment
@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-ocis failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-ocis failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-owncloud failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-ocis failed. The build is cancelled...

@wkloucek wkloucek changed the title add app provider config add app provider and app provider registry Jul 29, 2021
@wkloucek
Copy link
Contributor Author

REVA updates fix expected failures, therefore CI is failing. Will be taken care of in #2334

@wkloucek wkloucek marked this pull request as ready for review July 29, 2021 11:31
@wkloucek wkloucek requested review from butonic, micbar, refs and ishank011 and removed request for kulmann and pascalwengerter July 29, 2021 11:32
@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiBugDemonstration-ocis failed. The build is cancelled...

@ishank011
Copy link
Contributor

We also need to start the HTTP service in storage/pkg/command/frontend

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-10 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiAccountsHashDifficulty-ocis failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-2 failed. The build is cancelled...

@sonarcloud
Copy link

sonarcloud bot commented Sep 1, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

6.2% 6.2% Coverage
3.7% 3.7% Duplication

@wkloucek
Copy link
Contributor Author

wkloucek commented Sep 1, 2021

@butonic @refs this is now ready and mergeable.

You can start oCIS with following env vars:

export OCIS_URL=https://172.17.0.1:9200
export APP_PROVIDER_DRIVER=wopi
export APP_PROVIDER_WOPI_DRIVER_APP_NAME=Collabora
export APP_PROVIDER_WOPI_DRIVER_APP_URL=https://collabora.owncloud.test
export APP_PROVIDER_WOPI_DRIVER_INSECURE=true
export APP_PROVIDER_WOPI_DRIVER_IOP_SECRET=LoremIpsum123
export APP_PROVIDER_WOPI_DRIVER_WOPI_URL=https://wopiserver.owncloud.test

And then modify deployments/examples/ocis_wopi/config/wopiserver/wopiserver.conf.dist like this:

--- a/deployments/examples/ocis_wopi/config/wopiserver/wopiserver.conf.dist
+++ b/deployments/examples/ocis_wopi/config/wopiserver/wopiserver.conf.dist
@@ -96,7 +96,7 @@ chunksize = 4194304
 
 [cs3]
 # Host and port of the Reva(-like) CS3-compliant GRPC gateway endpoint
-revagateway = ocis:9142
+revagateway = 172.17.0.1:9142
 
 # HTTP (WebDAV) endpoint for uploading files
 #datagateway = http://172.17.0.1:9100

and then do a docker-compose up -d traefik collabora wopiserver in deployments/examples/ocis_wopi.

You need also to have that in your /etc/hosts:

127.0.0.1 wopiserver.owncloud.test
127.0.0.1 collabora.owncloud.test

This means even if your oCIS is running locally, the CS3org WOPI server running inside docker will register to it.

Then you can use the app provider with:

  • curl --insecure https://localhost:9200/app/list | jq
  • curl -k --insecure -X POST 'https://localhost:9200/app/open?file_id=MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTU3OjdlZTA4OGY4LTI4ZDAtNGVlMi1iNzNhLWI3MTk3NjA3OTgyNg==' -u einstein:relativity | jq (the file id must point to an office file)

Copy link
Member

@refs refs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 tried it with Docker and oCIS running locally and works fine.

@wkloucek wkloucek merged commit f3ed9f5 into master Sep 3, 2021
@delete-merged-branch delete-merged-branch bot deleted the add_reva_app_provider branch September 3, 2021 12:34
ownclouders pushed a commit that referenced this pull request Sep 3, 2021
Merge: a07c1e7 acb1875
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Fri Sep 3 14:34:16 2021 +0200

    Merge pull request #2204 from owncloud/add_reva_app_provider

    add app provider and app provider registry
@micbar micbar mentioned this pull request Sep 15, 2021
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants