<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ScienceMesh – Documentation</title><link>/docs/</link><description>Recent content in Documentation on ScienceMesh</description><generator>Hugo -- gohugo.io</generator><atom:link href="/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: Running multiple storage providers</title><link>/docs/technical-documentation/iop/iop-optional-configs/multiple-storage-providers/providers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/technical-documentation/iop/iop-optional-configs/multiple-storage-providers/providers/</guid><description>
&lt;p>This guide describes the procedure for running two instances of revad as two types of storage providers connected to the gateway:&lt;/p>
&lt;ul>
&lt;li>&lt;code>storageprovider-home&lt;/code> will handle the resources on the user&amp;rsquo;s home directory.&lt;/li>
&lt;li>&lt;code>storageprovider-reva&lt;/code> which will be used to resolve references to shared files and folders from &lt;code>MyShares&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>For shared storage and consistency amongst all the pods involved, we need to mount a shared Persistent Volume (PV) between these two providers and the gateway.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> In case you choose to auto-provision the PV with the Persistent Volume Claim (PVC) generation built in the revad chart, you need to make sure:&lt;/p>
&lt;ul>
&lt;li>Just the gateway will generate the PVC manifest.&lt;/li>
&lt;li>The two storage providers can reuse it via their &lt;code>storageprovider-&amp;lt;type&amp;gt;.persistentVolume.existingClaim&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Refer to &lt;a href="https://developer.sciencemesh.io/docs/iop/deployment/kubernetes/#enabling-and-configuring-persistency">enabling persistency&lt;/a> on the docs for details about the options available for the storage configuration.&lt;/p>
&lt;p>Note that, in future IOP upgrades, the &lt;code>persistentVolume.existingClaim&lt;/code> option may be used for the gateway as well, to prevent provisioning a new PVC and discarding existing data.&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>If upgrading from an older version of the IOP, we&amp;rsquo;ll also need to supply the most recent version of the &lt;a href="https://github.com/cs3org/reva/tree/master/examples/ocm-partners">&lt;code>ocm-partners&lt;/code>&lt;/a> JSON file. To override the previous version, simply using the &lt;code>--set-file&lt;/code> flag with &lt;code>helm upgrade&lt;/code> will do.&lt;/li>
&lt;/ul>
&lt;h2 id="configuring-a-multi-provider-iop-deployment">Configuring a multi-provider IOP deployment&lt;/h2>
&lt;p>We are going to take the &lt;a href="https://github.com/cs3org/reva/tree/master/examples/storage-references">&amp;lsquo;Storage References&amp;rsquo; example&lt;/a> as reference for the different bits and pieces of this deployment layout:&lt;/p>
&lt;pre>&lt;code> +---------+ +----+
| | | |
| M----------------------------&amp;gt;+ |
reva--+-&amp;gt;G | | |
| | | +--------H--------+ | |
| | | | | | |
| | +----&amp;gt;G /reva M----&amp;gt;+ |
| | | | | | |
| | | +------local------+ | |
| | | | |
| | | | |
V | | +--------H--------+ | |
curl----&amp;gt;H | | | | |
| +----&amp;gt;G /home M----&amp;gt;+ |
| | | | | |
+---------+ +----localhome----+ +----+
GATEWAY STORAGE PROVIDERS SHARED
VOLUME
M: Mountpoint H: HTTP exposed service
G: gRPC exposed service
&lt;/code>&lt;/pre>&lt;p>As it can be seen in the &lt;code>gateway.toml&lt;/code> file, the &lt;code>gateway&lt;/code> needs to be provided with some additional settings to determine where to store the different user data:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-toml" data-lang="toml">&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">gateway&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">datagateway&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;lt;hostname&amp;gt;/iop/datagateway&amp;#34;&lt;/span>
&lt;span style="color:#000">commit_share_to_storage_grant&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span>
&lt;span style="color:#000">commit_share_to_storage_ref&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">storageregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">storageregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">drivers&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">static&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">home_provider&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/home&amp;#34;&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">storageregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">drivers&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">static&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">rules&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#4e9a06">&amp;#34;/home&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#a40000">{&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;address&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;iop-storageprovider-home:17000&amp;#34;&lt;/span>&lt;span style="color:#a40000">}&lt;/span>
&lt;span style="color:#4e9a06">&amp;#34;/reva&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#a40000">{&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;address&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;iop-storageprovider-reva:18000&amp;#34;&lt;/span>&lt;span style="color:#a40000">}&lt;/span>
&lt;span style="color:#4e9a06">&amp;#34;123e4567-e89b-12d3-a456-426655440000&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#a40000">{&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;address&amp;#34;&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;iop-storageprovider-reva:18000&amp;#34;&lt;/span>&lt;span style="color:#a40000">}&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;details>
&lt;summary>&lt;b>See the rest of the gateway-enabled services&lt;/b>&lt;/summary>
&lt;code class="language-toml" data-lang="toml">
&lt;pre>&lt;code> [grpc.services.authprovider]
[grpc.services.authregistry]
[grpc.services.userprovider]
[grpc.services.usershareprovider]
[grpc.services.groupprovider]
[grpc.services.publicshareprovider]
[grpc.services.ocmcore]
[grpc.services.ocmshareprovider]
[grpc.services.ocminvitemanager]
[grpc.services.ocmproviderauthorizer]
[http.services.datagateway]
[http.services.prometheus]
[http.services.ocmd]
[http.services.ocdav]
[http.services.ocs]
&lt;/code>&lt;/pre>
&lt;/code>
&lt;/details>
&lt;/br>
&lt;p>The two additional storage providers are shipped as part of the default IOP Chart and based on &lt;a href="https://reva.link/">REVA&lt;/a> as the gateway does. Their configuration will be almost identical, with an exceptional difference: the use of either &lt;code>local&lt;/code> or &lt;code>localhome&lt;/code> as the &lt;code>storageprovider&lt;/code> (and &lt;code>dataprovider&lt;/code>) driver. Apart from that:&lt;/p>
&lt;ul>
&lt;li>They both need to be enabled in helm with the &lt;code>storageprovider-&amp;lt;type&amp;gt;.enabled&lt;/code> boolean flag, to be installed as part of the release.&lt;/li>
&lt;li>The two will need to &lt;strong>enable persistency and mount the shared volume&lt;/strong>, either the one provisioned by the &lt;code>gateway&lt;/code> chart or a pre-existing one on the cluster. We can assume its name is &lt;code>iop-gateway&lt;/code> in both cases.&lt;/li>
&lt;li>They need to expose both gRPC and HTTP services, for which we will use different port ranges for clarity.&lt;/li>
&lt;/ul>
&lt;h3 id="the-home-storage-provider-configuration">The &lt;code>/home&lt;/code> storage provider configuration&lt;/h3>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">cat &lt;span style="color:#4e9a06">&amp;lt;&amp;lt; EOF &amp;gt; home-sp.yaml
&lt;/span>&lt;span style="color:#4e9a06">storageprovider-home:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> service:
&lt;/span>&lt;span style="color:#4e9a06"> grpc:
&lt;/span>&lt;span style="color:#4e9a06"> port: 17000
&lt;/span>&lt;span style="color:#4e9a06"> http:
&lt;/span>&lt;span style="color:#4e9a06"> port: 17001
&lt;/span>&lt;span style="color:#4e9a06"> persistentVolume:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> existingClaim: iop-gateway
&lt;/span>&lt;span style="color:#4e9a06"> configFiles:
&lt;/span>&lt;span style="color:#4e9a06"> revad.toml: |
&lt;/span>&lt;span style="color:#4e9a06"> [grpc]
&lt;/span>&lt;span style="color:#4e9a06"> address = &amp;#34;0.0.0.0:17000&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">
&lt;/span>&lt;span style="color:#4e9a06"> [grpc.services.storageprovider]
&lt;/span>&lt;span style="color:#4e9a06"> driver = &amp;#34;localhome&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> mount_path = &amp;#34;/home&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> mount_id = &amp;#34;123e4567-e89b-12d3-a456-426655440000&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> data_server_url = &amp;#34;http://iop-storageprovider-home:17001/data&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">
&lt;/span>&lt;span style="color:#4e9a06"> [http]
&lt;/span>&lt;span style="color:#4e9a06"> address = &amp;#34;0.0.0.0:17001&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">
&lt;/span>&lt;span style="color:#4e9a06"> [http.services.dataprovider]
&lt;/span>&lt;span style="color:#4e9a06"> driver = &amp;#34;localhome&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">EOF&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="the-reva-storage-provider-configuration">The &lt;code>/reva&lt;/code> storage provider configuration&lt;/h3>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">cat &lt;span style="color:#4e9a06">&amp;lt;&amp;lt; EOF &amp;gt; reva-sp.yaml
&lt;/span>&lt;span style="color:#4e9a06">storageprovider-reva:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> service:
&lt;/span>&lt;span style="color:#4e9a06"> grpc:
&lt;/span>&lt;span style="color:#4e9a06"> port: 18000
&lt;/span>&lt;span style="color:#4e9a06"> http:
&lt;/span>&lt;span style="color:#4e9a06"> port: 18001
&lt;/span>&lt;span style="color:#4e9a06"> persistentVolume:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> existingClaim: iop-gateway
&lt;/span>&lt;span style="color:#4e9a06"> configFiles:
&lt;/span>&lt;span style="color:#4e9a06"> revad.toml: |
&lt;/span>&lt;span style="color:#4e9a06"> [grpc]
&lt;/span>&lt;span style="color:#4e9a06"> address = &amp;#34;0.0.0.0:18000&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">
&lt;/span>&lt;span style="color:#4e9a06"> [grpc.services.storageprovider]
&lt;/span>&lt;span style="color:#4e9a06"> driver = &amp;#34;local&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> mount_path = &amp;#34;/reva&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> mount_id = &amp;#34;123e4567-e89b-12d3-a456-426655440000&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> data_server_url = &amp;#34;http://iop-storageprovider-reva:18001/data&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">
&lt;/span>&lt;span style="color:#4e9a06"> [http]
&lt;/span>&lt;span style="color:#4e9a06"> address = &amp;#34;0.0.0.0:18001&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">
&lt;/span>&lt;span style="color:#4e9a06"> [http.services.dataprovider]
&lt;/span>&lt;span style="color:#4e9a06"> driver = &amp;#34;local&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06">EOF&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>After these two are defined, we have all the ingredients to bring the release up to date.&lt;/p>
&lt;h2 id="installing-the-iop-release">Installing the IOP release&lt;/h2>
&lt;p>Simply run:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm upgrade -i iop sciencemesh/iop &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> --set gateway.persistentVolume.enabled&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#204a87">true&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> --set-file gateway.configFiles.revad&lt;span style="color:#4e9a06">\\&lt;/span>.toml&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>revad.toml &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> --set-file gateway.configFiles.users&lt;span style="color:#4e9a06">\\&lt;/span>.json&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>users-cern.json &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> -f home-sp.yaml -f reva-sp.yaml
&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> if deploying the IOP for the first time, you&amp;rsquo;ll also need some ingress resource config to enable external access to your cluster services. Check the &lt;a href="https://developer.sciencemesh.io/docs/iop/deployment/kubernetes/#configuring-an-iop-deployment">&amp;lsquo;configuring the IOP&amp;rsquo;&lt;/a> section on this manual for instructions on how to do it.&lt;/p>
&lt;/blockquote></description></item><item><title>Docs: Deploying and configuring the WOPI Server with Collabora Code</title><link>/docs/technical-documentation/iop/iop-optional-configs/collabora-wopi-server/wopiserver/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/technical-documentation/iop/iop-optional-configs/collabora-wopi-server/wopiserver/</guid><description>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>This tutorial focuses on enabling the &lt;a href="https://github.com/cs3org/wopiserver">&lt;code>WOPI Server&lt;/code>&lt;/a> as part of an &lt;strong>existing IOP deployment&lt;/strong>. For detailed instructions on how to achieve the latter, &lt;a href="https://developer.sciencemesh.io/docs/iop/deployment/kubernetes">refer to the Kubernetes section of this documentation&lt;/a>.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> Verify you have the &lt;code>sciencemesh/iop&lt;/code> chart sources on version &lt;code>0.0.3&lt;/code> or greater:&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm repo update
Hang tight &lt;span style="color:#204a87;font-weight:bold">while&lt;/span> we grab the latest from your chart repositories...
...Successfully got an update from the &lt;span style="color:#4e9a06">&amp;#34;sciencemesh&amp;#34;&lt;/span> chart repository
Update Complete. ⎈ Happy Helming!⎈
helm search repo sciencemesh/iop
NAME CHART VERSION APP VERSION DESCRIPTION
sciencemesh/iop 0.0.3 0.0.1 ScienceMesh IOP is the reference Federated Scie...
&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>If you expose your cluster behind a reverse proxy, make sure it&amp;rsquo;s configured to &lt;strong>accept websocket connections&lt;/strong> as they&amp;rsquo;re required to run Collabora Code. Detailed instructions for different proxies can be found on the project documentation for &lt;a href="https://www.collaboraoffice.com/code/nginx-reverse-proxy">&lt;strong>nginx&lt;/strong>&lt;/a> and &lt;a href="https://www.collaboraoffice.com/code/apache-reverse-proxy">&lt;strong>Apache&lt;/strong>&lt;/a>.&lt;/li>
&lt;/ul>
&lt;h2 id="optional-deploying-a-collabora-code-instance-on-your-cluster">(Optional) Deploying a Collabora Code instance on your cluster&lt;/h2>
&lt;p>To demonstrate how an office-online application provider can integrate with the IOP through the WOPI protocol, we need an actual provider we can connect to. If you don&amp;rsquo;t have such application at hand, don&amp;rsquo;t worry. You can use a self-contained &lt;a href="https://www.collaboraoffice.com/code/">Collabora Code&lt;/a> installation on Kubernetes instead.&lt;/p>
&lt;p>This is provided by the &lt;code>sciencemesh/meshapps&lt;/code> chart - which relies on the official Helm chart for &lt;a href="https://hub.helm.sh/charts/stable/collabora-code">&lt;code>stable/collabora-code&lt;/code>&lt;/a> and can be used to deploy everything on our cluster in a very simple way.&lt;/p>
&lt;p>First, we need to update our helm sources and look for the latest version of the &lt;code>sciencemesh/meshapps&lt;/code> Helm chart:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm search repo sciencemesh/meshapps
NAME CHART VERSION APP VERSION DESCRIPTION
sciencemesh/meshapps 0.0.1 0.0.1 Umbrella-repository of apps supported by the IOP and its adapters
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, we need to create a minimal YAML file holding the custom &lt;code>collabora-code&lt;/code> deployment values:&lt;/p>
&lt;ul>
&lt;li>&lt;code>collabora.domain&lt;/code> which points to the &lt;code>wopiserver&lt;/code> url. Since we&amp;rsquo;re running it all on the same cluster, we can use the service &lt;a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#services">DNS record&lt;/a> for this.&lt;/li>
&lt;li>&lt;code>collabora.server_name&lt;/code> will be used to generate the public URLs to be passed to the users.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> notice we need to slash-escape periods for this value: &lt;code>&amp;lt;hostname\.domain\.tld&amp;gt;&lt;/code>.&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>The &lt;code>collabora-code.ingress.paths&lt;/code> need to be configured according to the &lt;a href="https://www.collaboraoffice.com/code/apache-reverse-proxy/">Collabora Code reverse-proxy documentation&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>Putting it all together, we will end up with something similar to:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">cat &lt;span style="color:#4e9a06">&amp;lt;&amp;lt; EOF &amp;gt; collabora.yaml
&lt;/span>&lt;span style="color:#4e9a06">collabora-code:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> image:
&lt;/span>&lt;span style="color:#4e9a06"> tag: latest
&lt;/span>&lt;span style="color:#4e9a06"> collabora:
&lt;/span>&lt;span style="color:#4e9a06"> domain: iop-wopiserver\|hostname\\.domain\\.tld
&lt;/span>&lt;span style="color:#4e9a06"> server_name: &amp;lt;hostname\.domain\.tld&amp;gt;
&lt;/span>&lt;span style="color:#4e9a06"> ingress:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> annotations:
&lt;/span>&lt;span style="color:#4e9a06"> kubernetes.io/ingress.class: nginx
&lt;/span>&lt;span style="color:#4e9a06"> nginx.ingress.kubernetes.io/ssl-redirect: &amp;#34;true&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> hosts:
&lt;/span>&lt;span style="color:#4e9a06"> - &amp;lt;hostname.domain.tld&amp;gt;
&lt;/span>&lt;span style="color:#4e9a06"> paths:
&lt;/span>&lt;span style="color:#4e9a06"> - /loleaflet
&lt;/span>&lt;span style="color:#4e9a06"> - /hosting/discovery
&lt;/span>&lt;span style="color:#4e9a06"> - /hosting/capabilities
&lt;/span>&lt;span style="color:#4e9a06"> - /lool
&lt;/span>&lt;span style="color:#4e9a06"> - /lool/adminws
&lt;/span>&lt;span style="color:#4e9a06"> - /lool/(.*)/ws$
&lt;/span>&lt;span style="color:#4e9a06">EOF&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>And now, to deploy it on the cluster, we just need to install the chart as follows:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm upgrade -i meshapps sciencemesh/meshapps -f collabora.yaml
&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="configure-reva-to-integrate-with-the-wopi-server">Configure REVA to integrate with the WOPI Server&lt;/h2>
&lt;p>For the WOPI Server to be able to work together with Reva, two additional services need to be configured in the gRPC gateway:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://reva.link/docs/config/grpc/services/appprovider/">&lt;code>appprovider&lt;/code>&lt;/a>.&lt;/li>
&lt;li>&lt;a href="https://reva.link/docs/config/grpc/services/appregistry/">&lt;code>appregistry&lt;/code>&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>Here is an example of some parameters that need to be set in the reva daemon. They include the WOPI Server location inside the cluster as well as some static rules to match different MIME types to be opened with it:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-toml" data-lang="toml">&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">http&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appprovider&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">insecure&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#8f5902;font-style:italic"># if you need to disable SSL verification&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">gateway&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">appregistrysvc&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;iop-gateway:19000&amp;#34;&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appprovider&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">driver&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;wopi&amp;#34;&lt;/span>
&lt;span style="color:#000">app_provider_url&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;iop-gateway:19001&amp;#34;&lt;/span>
&lt;span style="color:#000">mime_types&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;application/vnd.oasis.opendocument.text&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oasis.opendocument.spreadsheet&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oasis.opendocument.presentation&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;text/rtf&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appprovider&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">drivers&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">wopi&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">iop_secret&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;REVA_IOPSECRET&amp;#34;&lt;/span> &lt;span style="color:#8f5902;font-style:italic"># must match the `/etc/wopi/iopsecret` deployed in the wopiserver image&lt;/span>
&lt;span style="color:#000">wopi_url&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://your_wopi_server:port&amp;#34;&lt;/span>
&lt;span style="color:#000">app_name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Collabora&amp;#34;&lt;/span>
&lt;span style="color:#000">app_url&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://your_collabora_server&amp;#34;&lt;/span>
&lt;span style="color:#000">insecure_connections&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#8f5902;font-style:italic"># if you need to disable SSL verification&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">driver&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;static&amp;#34;&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">drivers&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">static&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">mime_types&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#000;font-weight:bold">[&lt;/span>
&lt;span style="color:#a40000">{&lt;/span> &lt;span style="color:#000">mime_type&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oasis.opendocument.text&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">extension&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;odt&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Open document&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">description&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;OpenDocument text&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">default_app&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Collabora&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">allow_creation&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#a40000">}&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;span style="color:#a40000">{&lt;/span> &lt;span style="color:#000">mime_type&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oasis.opendocument.spreadsheet&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">extension&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;ods&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Open spreadsheet&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">description&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;OpenDocument spreadsheet&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">default_app&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Collabora&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">allow_creation&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#a40000">}&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;span style="color:#a40000">{&lt;/span> &lt;span style="color:#000">mime_type&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oasis.opendocument.presentation&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">extension&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;odp&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Open slides&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">description&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;OpenDocument presentation&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">default_app&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Collabora&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">allow_creation&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#a40000">}&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Lastly, a shared secret must also be provided in Reva with one of the available options:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Environment variable&lt;/th>
&lt;th>Config file&lt;/th>
&lt;th>Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>REVA_APPPROVIDER_IOPSECRET&lt;/code>&lt;/td>
&lt;td>&lt;code>grpc.services.appprovider.iopsecret&lt;/code>&lt;/td>
&lt;td>Shared secret used to connect REVA with the WOPI Server.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>This setting can be shared amongst the two deployments by either:&lt;/p>
&lt;ul>
&lt;li>Defining one and passing it as value for the &lt;code>--set wopiserver.config.iopsecret&lt;/code> and &lt;code>--set gateway.env.REVA_APPPROVIDER_IOPSECRET&lt;/code> flags.&lt;/li>
&lt;li>Or provisioned by the WOPI Server chart as a Secret and consumed by REVA by passing:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="color:#204a87;font-weight:bold">extraEnv&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>REVA_APPPROVIDER_IOPSECRET&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">valueFrom&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">secretKeyRef&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">name&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>iop-wopiserver-secrets&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">key&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>iopsecret&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="enabling-wopiserver-on-the-iop-deployment">Enabling wopiserver on the IOP deployment&lt;/h2>
&lt;p>For convenience, wopiserver ships as a separate chart from Reva but it comes bundled on the IOP. It can be explicitly enabled via feature flag.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> the wopiserver chart has been developed with a simplified ingress configuration (i.e. single &lt;code>host&lt;/code> and &lt;code>path&lt;/code>) to ease the deployment. If you need to expose multiple hosts/paths, please open a &lt;a href="https://github.com/cs3org/charts/issues/new">feature request on cs3org/charts&lt;/a> to support this feature.&lt;/p>
&lt;/blockquote>
&lt;p>The most important settings you&amp;rsquo;ll need to provide are the &lt;code>wopiserver.config.appProviders.codeurl&lt;/code> and &lt;code>wopiserver.config.cs3.revahost&lt;/code>: the endpoints for Collabora Code and Reva, respectively. &lt;a href="https://github.com/cs3org/wopiserver/blob/master/wopiserver.conf">Additional values&lt;/a> can also be configured.&lt;/p>
&lt;p>If Code was deployed inside the cluster following the steps on the previous section, this configuration will connect all the required services together:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">cat &lt;span style="color:#4e9a06">&amp;lt;&amp;lt; EOF &amp;gt; wopiserver.yaml
&lt;/span>&lt;span style="color:#4e9a06">wopiserver:
&lt;/span>&lt;span style="color:#4e9a06"> config:
&lt;/span>&lt;span style="color:#4e9a06"> appProviders:
&lt;/span>&lt;span style="color:#4e9a06"> codeurl: http://meshapps-collabora-code:9980
&lt;/span>&lt;span style="color:#4e9a06"> cs3:
&lt;/span>&lt;span style="color:#4e9a06"> revahost: iop-revad:19000
&lt;/span>&lt;span style="color:#4e9a06"> ingress:
&lt;/span>&lt;span style="color:#4e9a06"> enabled: true
&lt;/span>&lt;span style="color:#4e9a06"> annotations:
&lt;/span>&lt;span style="color:#4e9a06"> kubernetes.io/ingress.class: nginx
&lt;/span>&lt;span style="color:#4e9a06"> nginx.ingress.kubernetes.io/ssl-redirect: &amp;#34;true&amp;#34;
&lt;/span>&lt;span style="color:#4e9a06"> hostname: &amp;lt;hostname&amp;gt;
&lt;/span>&lt;span style="color:#4e9a06"> path: /wopi
&lt;/span>&lt;span style="color:#4e9a06">EOF&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Last, we just need to install/upgrade the IOP stack by passing this custom configuration as well as the &lt;code>wopiserver.enable&lt;/code> flag.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> If it is the first time deploying the IOP, you should also provide &lt;a href="https://developer.sciencemesh.io/docs/iop/deployment/kubernetes/#configuring-an-iop-deployment">the custom configuration for Reva&lt;/a> in addition to the one for the WOPI Server. Otherwise, you will need to use helm&amp;rsquo;s &lt;code>--reuse-values&lt;/code> to keep your previous config.&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm upgrade -i iop sciencemesh/iop &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> --set wopiserver.enabled&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#204a87">true&lt;/span> &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> -f wopiserver.yaml &lt;span style="color:#4e9a06">\
&lt;/span>&lt;span style="color:#4e9a06">&lt;/span> --reuse-values
&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="testing-the-integration-with-the-open-in-app-sub-command">Testing the integration with the &lt;code>open-in-app&lt;/code> sub-command&lt;/h2>
&lt;p>Reva&amp;rsquo;s &lt;code>open-in-app&lt;/code> subcomand allows an authenticated user to generate a URL pointing to the application provider that will open the file for viewing/editing (depending on the &lt;code>-viewmode&lt;/code> flag).&lt;/p>
&lt;p>Behind the scenes, Reva will ask the WOPI server to generate a unique token and URI to access the file through the CS3 APIs. The WOPI Server will determine what is the right application to open such file (based on the available &lt;code>wopiserver.config.appProviders&lt;/code> config) and abstract all the implementation details from the user (e.g. save operations, file locking, etc.).&lt;/p>
&lt;p>The upload-open workflow can be all carried out from the &lt;code>reva&lt;/code> cli:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">reva upload sciencemesh.odt /home/sciencemesh.odt
Local file size: &lt;span style="color:#0000cf;font-weight:bold">11176&lt;/span> bytes
Data server: https://&amp;lt;hostname.domain.tld&amp;gt;/iop/datagateway
Allowed checksums: &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>type:RESOURCE_CHECKSUM_TYPE_MD5 priority:100 type:RESOURCE_CHECKSUM_TYPE_UNSET priority:1000 &lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
Checksum selected: RESOURCE_CHECKSUM_TYPE_MD5
Local XS: RESOURCE_CHECKSUM_TYPE_MD5:21751696b491472501ffa1ec6cc3021d
10.91 KiB / 10.91 KiB &lt;span style="color:#ce5c00;font-weight:bold">[======================================================================================================================]&lt;/span> 100.00% 0s
File uploaded: 123e4567-e89b-12d3-a456-426655440000:fileid-&amp;lt;user&amp;gt;%2Fsciencemesh.odt &lt;span style="color:#0000cf;font-weight:bold">11176&lt;/span> /home/sciencemesh.odt
reva open-in-app -viewmode write /home/sciencemesh.odt
App provider url: https://&amp;lt;hostname.domain.tld&amp;gt;/loleaflet/ed4f732/loleaflet.html?permission&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>edit&lt;span style="color:#000;font-weight:bold">&amp;amp;&lt;/span>&lt;span style="color:#000">WOPISrc&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>https%3A%2F%2F&amp;lt;hostname.domain.tld&amp;gt;%2Fwopi%2Ffiles%2F123e4567-e89b-12d3-a456-426655440000-3380161333240892090&lt;span style="color:#000;font-weight:bold">&amp;amp;&lt;/span>&lt;span style="color:#000">access_token&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&amp;lt;token&amp;gt;
&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="collaborative-editing-workflows">Collaborative editing workflows&lt;/h3>
&lt;p>Effectively, a site running the WOPI Server configured and enabled together with the IOP as described above, can share files (via the &lt;a href="https://reva.link/docs/tutorials/share-tutorial/">OCM Share&lt;/a> mechanism) with a second user. Even if the recipient site does not have a WOPI Server deployed. This mechanism relies on Reva&amp;rsquo;s capacity to forward the requests to &lt;code>open-in-app&lt;/code> from the receiving site to the original grantor&amp;rsquo;s.&lt;/p>
&lt;p>If the originating site is also connected to a WOPI-compatible application, that supports the file&amp;rsquo;s MIME type and &lt;strong>has also collaborative-editing capabilities&lt;/strong> (like e.g. Collabora Code), the document can be opened by both users at the same time. In this session, users are able to see each other&amp;rsquo;s contributions and changes and save their progress on the original document, living on the original storage backend - no matter what it is.&lt;/p></description></item><item><title>Docs: CodiMD</title><link>/docs/technical-documentation/iop/iop-optional-configs/codimd/codimd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/technical-documentation/iop/iop-optional-configs/codimd/codimd/</guid><description>
&lt;p>CodiMD is not built upon the WOPI Protocol (as it happens with &lt;a href="../../iop/deployment/wopiserver">Collabora Code&lt;/a>), yet the CS3 WOPI Server includes a &amp;ldquo;bridge&amp;rdquo; extension that can be configured to support CodiMD.&lt;/p>
&lt;h2 id="configuring-the-wopi-server-for-codimd">Configuring the WOPI Server for CodiMD&lt;/h2>
&lt;p>A small configuration patch needs to be applied to an IOP deployment to enable the WOPI Server to interact with CodiMD:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="color:#204a87;font-weight:bold">wopiserver&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">config&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">codimd&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">enabled&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">inturl&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>http&lt;span style="color:#000;font-weight:bold">:&lt;/span>//meshapps-codimd&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Refer to the &lt;a href="https://artifacthub.io/packages/helm/cs3org/wopiserver">chart&amp;rsquo;s documentation&lt;/a> for a complete reference of all the configuration options available. Once ready, the release can be patched with the following command:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm upgrade -i iop sciencemesh/iop --reuse-values -f wopiserver.yaml
&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="deploying-codimd-through-the-sciencemeshmeshapps-chart">Deploying CodiMD through the &lt;code>sciencemesh/meshapps&lt;/code> chart&lt;/h2>
&lt;p>To deploy the application, the &lt;code>sciencemesh/meshapps&lt;/code> umbrella chart already provides a handful of defaults for a lightweight and &amp;ldquo;&lt;em>stateless&lt;/em>&amp;rdquo; CodiMD installation:&lt;/p>
&lt;ul>
&lt;li>Based on a patched &lt;code>codimd&lt;/code> container image (&lt;code>gitlab-registry.cern.ch/authoring/notes/codimd:cernbox-integration&lt;/code>) with some extra features to enable this workflow.&lt;/li>
&lt;/ul>
&lt;p>The only key aspects left for the user to configure are:&lt;/p>
&lt;ul>
&lt;li>A combination of &lt;code>CMD_URL_PATH&lt;/code> and an ingress rewrite annotation to strip the base URL (&lt;code>/codimd&lt;/code>) from external requests.&lt;/li>
&lt;li>A &lt;code>postgresql.postgresqlPassword&lt;/code> to protect the database that will be used as a temporary cache for the notes.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> alternatively, MariaDB can be used instead of PostgreSQL when deploying CodiMD. Refer to &lt;a href="https://artifacthub.io/packages/helm/codimd/codimd#deploy-an-internal-database-parameters">the chart&amp;rsquo;s parameters&lt;/a> for all the options available.&lt;/p>
&lt;/blockquote>
&lt;p>Here&amp;rsquo;s an example &lt;code>codimd.yaml&lt;/code> combining all these:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="color:#204a87;font-weight:bold">codimd&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">enabled&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">codimd&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">connection&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">domain&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&amp;lt;hostname.domain.tld&lt;span style="color:#8f5902;font-style:italic">&amp;gt;
&lt;/span>&lt;span style="color:#8f5902;font-style:italic"> protocolUseSSL: true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">extraEnvironmentVariables&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">CMD_URL_PATH&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>codimd&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">postgresql&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">postgresqlPassword&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&amp;lt;password&lt;span style="color:#8f5902;font-style:italic">&amp;gt;
&lt;/span>&lt;span style="color:#8f5902;font-style:italic"> ingress:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">annotations&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">kubernetes.io/ingress.class&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>nginx&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">nginx.ingress.kubernetes.io/rewrite-target&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>/$&lt;span style="color:#0000cf;font-weight:bold">2&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">nginx.ingress.kubernetes.io/ssl-redirect&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#4e9a06">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">enabled&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">true&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#204a87;font-weight:bold">hosts&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- &lt;span style="color:#204a87;font-weight:bold">host&lt;/span>&lt;span style="color:#000;font-weight:bold">:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&amp;lt;hostname.domain.tld&lt;span style="color:#8f5902;font-style:italic">&amp;gt;
&lt;/span>&lt;span style="color:#8f5902;font-style:italic"> paths:&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>- /codimd(/|$)(.&lt;span style="color:#8f5902;font-style:italic">*)&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline">
&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After this file is defined, it&amp;rsquo;s just a matter of upgrading the chart while reusing any previous values, as follows:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-bash" data-lang="bash">helm upgrade -i meshapps sciencemesh/meshapps --reuse-values -f codimd.yaml
&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="registering-the-mime-types-and-custom-file-extensions-on-your-storage-provider">Registering the MIME-types and custom file extensions on your Storage Provider&lt;/h3>
&lt;p>There are three extra steps left for the IOP to integrate with this application. These will require modifying the Revad configuration to identify the files that will be opened by CodiMD:&lt;/p>
&lt;div class="highlight">&lt;pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4">&lt;code class="language-toml" data-lang="toml">&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appprovider&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">driver&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;wopi&amp;#34;&lt;/span>
&lt;span style="color:#000">app_provider_url&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;iop-gateway:19001&amp;#34;&lt;/span>
&lt;span style="color:#000">mime_types&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;text/markdown&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/compressed-markdown&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;text/plain&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;text/html&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appprovider&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">drivers&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">wopi&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">iop_secret&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;REVA_IOPSECRET&amp;#34;&lt;/span> &lt;span style="color:#8f5902;font-style:italic"># must match the `/etc/wopi/iopsecret` deployed in the wopiserver image&lt;/span>
&lt;span style="color:#000">wopi_url&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://your_wopi_server:port&amp;#34;&lt;/span>
&lt;span style="color:#000">app_name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;CodiMD&amp;#34;&lt;/span>
&lt;span style="color:#000">app_url&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;https://your_codimd_server&amp;#34;&lt;/span>
&lt;span style="color:#000">insecure_connections&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#8f5902;font-style:italic"># if you need to disable SSL verification&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">driver&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;static&amp;#34;&lt;/span>
&lt;span style="color:#000;font-weight:bold">[&lt;/span>&lt;span style="color:#000">grpc&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">services&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">appregistry&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">drivers&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">static&lt;/span>&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;span style="color:#000">mime_types&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#000;font-weight:bold">[&lt;/span>
&lt;span style="color:#a40000">{&lt;/span> &lt;span style="color:#000">mime_type&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;text/markdown&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">extension&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;md&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Markdown file&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">description&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Markdown text&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">default_app&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;CodiMD&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">allow_creation&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#a40000">}&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;span style="color:#a40000">{&lt;/span> &lt;span style="color:#000">mime_type&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/compressed-markdown&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">extension&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;zmd&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">name&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;CodiMD file&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">description&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Compressed Markdown with images&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">default_app&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;CodiMD&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span> &lt;span style="color:#000">allow_creation&lt;/span> &lt;span style="color:#000;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87;font-weight:bold">true&lt;/span> &lt;span style="color:#a40000">}&lt;/span>&lt;span style="color:#000;font-weight:bold">,&lt;/span>
&lt;span style="color:#000;font-weight:bold">...&lt;/span>
&lt;span style="color:#000;font-weight:bold">]&lt;/span>
&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that CodiMD supports a custom MIME type named &lt;code>application/compressed-markdown&lt;/code>, but currently the support of custom MIME types is not functioning in Reva. Once fixed, it will be supported as well.&lt;/p></description></item><item><title>Docs: ScienceMesh-Nextcloud Admin Documentation</title><link>/docs/obsolete/nextcloud/admin/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/obsolete/nextcloud/admin/</guid><description>
&lt;h1 id="admin-documentation">Admin Documentation&lt;/h1>
&lt;p>Configure &lt;code>iopUrl&lt;/code> to point to your revad instance. You can check this value in your Nextcloud database:&lt;/p>
&lt;pre>&lt;code> select * from oc_appconfig where appid='sciencemesh';
&lt;/code>&lt;/pre>&lt;p>Make sure that &lt;code>revaSharedSecret&lt;/code> in there matches the &lt;code>shared_secret&lt;/code> entry in the following sections of your revad.toml file:&lt;/p>
&lt;ul>
&lt;li>&lt;code>[grpc.services.storageprovider.drivers.nextcloud]&lt;/code>&lt;/li>
&lt;li>&lt;code>[grpc.services.authprovider.auth_managers.nextcloud]&lt;/code>&lt;/li>
&lt;li>&lt;code>[grpc.services.userprovider.drivers.nextcloud]&lt;/code>&lt;/li>
&lt;li>&lt;code>[grpc.services.ocmcore.drivers.nextcloud]&lt;/code>&lt;/li>
&lt;li>&lt;code>[grpc.services.ocmshareprovider.drivers.nextcloud]&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="registration-flow-api">Registration flow API&lt;/h2>
&lt;p>You can set some manually estimated statistics data in the admin interface of the Nextcloud app.
You can follow the &lt;a href="https://developer.sciencemesh.io/docs/how-to-join-sciencemesh/">join instructions&lt;/a> to add your site to the ScienceMesh directory.
Once that is complete, other sites will update their approved providers whitelists.&lt;/p></description></item><item><title>Docs: ScienceMesh-Nextcloud Developer Documentation</title><link>/docs/obsolete/nextcloud/developer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/obsolete/nextcloud/developer/</guid><description>
&lt;h1 id="developer-documentation">Developer Documentation&lt;/h1>
&lt;p>The &amp;lsquo;sciencemesh&amp;rsquo; app for Nextcloud adds API endpoints so that Nextcloud
can serve as a user backend, a shares backend, and a storage backend for revad.&lt;/p>
&lt;h2 id="api-architecture">API Architecture&lt;/h2>
&lt;p>&lt;em>This chapter of the developer documentation was the deliverable for work package 2b of the sciencemesh-nextcloud project&lt;/em>&lt;/p>
&lt;h3 id="invitation-flow-api">Invitation flow API&lt;/h3>
&lt;p>Nextcloud already supports OCM out of the box, but not the invitation-first flow that is used on the ScienceMesh.
There are three systems involved:&lt;/p>
&lt;ul>
&lt;li>&lt;em>nextcloud-sender&lt;/em> (Nextcloud server of the sender)&lt;/li>
&lt;li>&lt;em>revad-sender&lt;/em> (IOP server of the sender)&lt;/li>
&lt;li>&lt;em>receiver&lt;/em> (the receiver&amp;rsquo;s system; opaque for this part of the flow)&lt;/li>
&lt;/ul>
&lt;h3 id="obtaining-the-invite-token-from-nextcloud-gui">Obtaining the invite token (from Nextcloud GUI)&lt;/h3>
&lt;p>Step-by-step, this is how it works for the sender if the sending user uses the Nextcloud GUI to generate the invite token:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>The sending user uses the GUI of &lt;em>nextcloud-sender&lt;/em> to request the generation of an invite token.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>This results in a REST call from &lt;em>nextcloud-sender&lt;/em> to &lt;em>revad-sender&lt;/em>:&lt;/p>
&lt;ul>
&lt;li>Method: POST&lt;/li>
&lt;li>Content Type: JSON&lt;/li>
&lt;li>URL: https://revad-sender/ocm/invitation/generate&lt;/li>
&lt;li>Request Body: empty&lt;/li>
&lt;li>Authentication: http basic auth, with the sending user&amp;rsquo;s actual username, but with &lt;code>&amp;lt;loopback-secret&amp;gt;&lt;/code> as the password (this is because the server-side PHP code does not know the user&amp;rsquo;s real password)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Inside revad, this http request triggers a grpc request, including the username and loopback secret&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The &lt;code>&amp;lt;loopback-secret&amp;gt;&lt;/code> is checked by reva&amp;rsquo;s Nextcloud-based auth backend (note that both the loopback secret and the user&amp;rsquo;s actual password will grant access)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The invite token is generated by reva&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The token is returned from the grpc call within &lt;em>revad-sender&lt;/em>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The token is returned from the rest call back to &lt;em>nextcloud-sender&lt;/em>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The token is displayed in the GUI, for the sending user to copy and relay out-of-band to the receiving user.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="obtaining-the-invite-token-from-reva-cli">Obtaining the invite token (from Reva CLI)&lt;/h3>
&lt;p>Step-by-step, this is how it works for the sender if the sending user uses the Reva CLI to generate the invite token:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>The sending user uses the CLI client of &lt;em>revad-sender&lt;/em> to request the generation of an invite token.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The reva CLI tool sends a grpc request, including the &lt;code>&amp;lt;clientID&amp;gt;&lt;/code> and &lt;code>&amp;lt;clientSecret&amp;gt;&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>This results in a REST call from &lt;em>sending-revad&lt;/em> to &lt;em>sending-nextcloud&lt;/em>:&lt;/p>
&lt;ul>
&lt;li>Method: POST&lt;/li>
&lt;li>Content Type: JSON&lt;/li>
&lt;li>URL: https://nextcloud-sender/index.php/apps/sciencemesh/api/auth/Authenticate&lt;/li>
&lt;li>Request Body: e.g. &amp;lsquo;{&amp;ldquo;clientID&amp;rdquo;:&amp;ldquo;einstein&amp;rdquo;,&amp;ldquo;clientSecret&amp;rdquo;:&amp;ldquo;relativity&amp;rdquo;}&amp;rsquo;&lt;/li>
&lt;li>X-Reva-Secret header: &lt;code>&amp;lt;shared-secret&amp;gt;&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>The &lt;code>&amp;lt;clientID&amp;gt;&lt;/code> and &lt;code>&amp;lt;clientSecret&amp;gt;&lt;/code> are checked by reva&amp;rsquo;s Nextcloud-based auth backend (note that both the loopback secret and the user&amp;rsquo;s actual password will grant access)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>A JSON-serialized CS3 User object is returned.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The token is generated by &lt;em>revad-sender&lt;/em>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The token is returned from the grpc call&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The token is displayed in the CLI tool, for the sending user to copy and relay out-of-band to the receiving user.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="accepting-the-invite-token">Accepting the invite token&lt;/h3>
&lt;p>Step-by-step, this is how it works for the receiver:
There are again three systems involved:&lt;/p>
&lt;ul>
&lt;li>&lt;em>sender&lt;/em> (the sender&amp;rsquo;s system; opaque for this part of the flow)&lt;/li>
&lt;li>&lt;em>revad-receiver&lt;/em> (IOP server of the receiver)&lt;/li>
&lt;li>&lt;em>nextcloud-receiver&lt;/em> (Nextcloud server of the receiver)&lt;/li>
&lt;/ul>
&lt;p>The receiving user either pastes the token into the Nextcloud GUI, or into reva-cli. Authentication works the same way
as on the sending side:&lt;/p>
&lt;ul>
&lt;li>If coming through the Nextcloud GUI, the Nextcloud-based user manager verifies username + loopback secret&lt;/li>
&lt;li>If coming through the Reva CLI, the Nextcloud-based user manager verifies username + user password&lt;/li>
&lt;/ul>
&lt;p>A REST call for &amp;lsquo;forward OCM invite&amp;rsquo; is made from &lt;em>revad-receiver&lt;/em> to &lt;em>nextcloud-receiver&lt;/em>. Note that the &amp;lsquo;forward&amp;rsquo; here may feel like a bit of a misnomer, but it probably refers
to the fact that all the receiving revad effectively does is take the token from the message body and launch an almost identical request to it. So it really is a case of &amp;ldquo;forwarding the message&amp;rdquo;:&lt;/p>
&lt;p>&lt;em>receiving-user&lt;/em>&lt;/p>
&lt;p>-(&amp;ldquo;Forward this invite acceptance notice!&amp;quot;)-&amp;gt;&lt;/p>
&lt;p>&lt;em>receiving-revad&lt;/em>&lt;/p>
&lt;p>-(&amp;ldquo;Here is an invite acceptance notice!&amp;quot;)-&amp;gt;&lt;/p>
&lt;p>&lt;em>sending-revad&lt;/em>&lt;/p>
&lt;p>A REST call for &amp;lsquo;accept OCM invite&amp;rsquo; made from &lt;em>nextcloud-receiver&lt;/em> to &lt;em>sender&lt;/em>. Note that this again feels like a misnomer because &lt;em>sending-revad&lt;/em> is not ordered to accept the invite, it is just
receiving the information that the receiver has done so.&lt;/p>
&lt;h3 id="creating-the-share-sender-side-from-nextcloud-gui">Creating the share (sender-side, from Nextcloud GUI)&lt;/h3>
&lt;p>When the sending user looks for a recipient to share a resource with, and starts typing the recipient identifier, the autocomplete function gathers search results from a number of share providers,
one of which will be ScienceMesh.
The ScienceMesh share provider compares the characters typed so far to names of users who accepted the sender&amp;rsquo;s invite, and provides an autocomplete result.
If the user clicks this, a rest call to https://revad-sender/ocm/send will be made
For authentication, the username and &lt;code>loopback-secret&lt;/code> will be sent by Nextcloud, and they will loop back to Nextcloud in a user authentication request.&lt;/p>
&lt;h3 id="creating-the-share-sender-side-from-reva-cli">Creating the share (sender-side, from Reva CLI)&lt;/h3>
&lt;p>The sender can also call &lt;code>ocm-share-create&lt;/code> in the Reva CLI using their username and password.
This would then similarly result in a call to the OCM Core share provider service, and the OCM share manager driver, which results in:&lt;/p>
&lt;ul>
&lt;li>a rest call to &lt;em>nextcloud-sender&lt;/em> (this time authenticated with username and the user&amp;rsquo;s actual password), to store the sent share on the sender side.&lt;/li>
&lt;/ul>
&lt;h3 id="creating-the-share-sender-side-common-part">Creating the share (sender-side, common part)&lt;/h3>
&lt;p>After that, in both cases, it will trigger a call to the CreateOCMShare method of the OCM share provider
service, and the OCM share manager driver, which results in:&lt;/p>
&lt;ul>
&lt;li>an &lt;code>addSentShare&lt;/code> rest call to &lt;em>nextcloud-sender&lt;/em> (authenticated this time with &lt;code>X-Reva-Secret&lt;/code>), to store the sent share on the sender side&lt;/li>
&lt;li>an OCM /shares POST to &lt;em>nextcloud-receiver&lt;/em> (unauthenticated except for the client IP check)&lt;/li>
&lt;/ul>
&lt;h3 id="creating-the-share-receiver-side">Creating the share (receiver-side)&lt;/h3>
&lt;p>When the OCM /shares POST comes in, it triggers a call to the CreateOCMCoreShare method (not &amp;ldquo;CreateOCMShare method&amp;rdquo;) of the OCM Core service (not &amp;ldquo;OCM share provider service&amp;rdquo;),
which also triggers Share function of the OCM share manager driver. So the code paths sound very similar but are subtly different:&lt;/p>
&lt;ul>
&lt;li>on the sending side it is the &lt;em>CreateOCMShare&lt;/em> method of the &lt;em>OCM share provider&lt;/em> service that triggers the Share method of the OCM share manager driver&lt;/li>
&lt;li>on the receiving side it is the &lt;em>CreateOCMCoreShare&lt;/em> method of the &lt;em>OCM Core provider&lt;/em> service that triggers the Share method of the OCM share manager driver&lt;/li>
&lt;/ul>
&lt;p>The Share method of the OCM share manager driver figures out whether the share was generated locally, and if not, concludes that it must be on the receiving side.
Then, an &lt;code>addReceivedShare&lt;/code> rest call is made to &lt;em>nextcloud-sender&lt;/em> (authenticated with &lt;code>X-Reva-Secret&lt;/code>), to store the sent share on the sender side.&lt;/p>
&lt;h2 id="file-sharing-api">File sharing API&lt;/h2>
&lt;p>In a future version we will also implement data transfer shares that trigger an rclone job, but for now,
all received shares just result in a webdav mount on the receiver side.&lt;/p>
&lt;p>So when the receiver accesses the resource that was shared with them, the data is actually fetched from the source in real-time.&lt;/p>
&lt;h3 id="accessing-the-received-share-file">Accessing the received share file&lt;/h3>
&lt;p>When the receiver access the resource through their Nextcloud GUI, the &lt;em>receiving-nextcloud&lt;/em> will see in its database that the given path is a webdav mount.
It will do a webdav request to &lt;em>sending-revad&lt;/em>.
This will lead to &lt;code>GetMD&lt;/code> and &lt;code>InitiateDownload&lt;/code> calls to &lt;em>sending-nextcloud&lt;/em>.
The file contents are delivered along the following path:&lt;/p>
&lt;pre>&lt;code> sending-nextcloud -&amp;gt; sending-revad -&amp;gt; receiving-nextcloud -&amp;gt; webbrowser
&lt;/code>&lt;/pre>&lt;p>Similarly, the receiver can access the resource through their Nextcloud WebDAV interface, from their Nextcloud Mobile app, through their Reva CLI or their revad&amp;rsquo;s WebDAV interface.&lt;/p>
&lt;h2 id="registration-flow-api">Registration flow API&lt;/h2>
&lt;p>The registration for ScienceMesh is currently still quite a manual process. See the &lt;a href="./admin.md">admin guide&lt;/a>.&lt;/p></description></item><item><title>Docs: ScienceMesh-Nextcloud Installation Documentation</title><link>/docs/obsolete/nextcloud/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/obsolete/nextcloud/installation/</guid><description>
&lt;h1 id="installation-guide">Installation Guide&lt;/h1>
&lt;p>The ScienceMesh-Nextcloud connection helps sites who run Nextcloud as their enterprise file sync and share system to join the ScienceMesh.&lt;/p>
&lt;p>There are number of things you will need to do get this working for your site:&lt;/p>
&lt;h2 id="enable-dynamic-share-providers-in-nextcloud">Enable dynamic share providers in Nextcloud&lt;/h2>
&lt;p>Apply the &lt;a href="https://github.com/pondersource/server/tree/dynamic-shareproviders">dynamic-shareproviders&lt;/a> branch to your Nextcloud installation.
This is necessary for Nextcloud to recognize shares of type the &amp;lsquo;ScienceMesh&amp;rsquo;.&lt;/p>
&lt;h2 id="install-revad-edge">Install Revad Edge&lt;/h2>
&lt;p>See also &lt;a href="https://github.com/cs3org/reva:">https://github.com/cs3org/reva:&lt;/a>&lt;/p>
&lt;pre>&lt;code> git clone https://github.com/cs3org/reva
cd reva
git checkout edge
make deps
make build
&lt;/code>&lt;/pre>&lt;h2 id="configure-revad">Configure revad&lt;/h2>
&lt;p>Something like &lt;code>./mesh.toml&lt;/code>. This will probably require some experimentation. You can contact @michielbdejong in &lt;a href="https://gitter.im/cs3org/REVA">https://gitter.im/cs3org/REVA&lt;/a> for help.&lt;/p>
&lt;h2 id="install-the-sciencemesh-app">Install the ScienceMesh app&lt;/h2>
&lt;p>In your Nextcloud apps folder, run:&lt;/p>
&lt;pre>&lt;code> git clone https://github.com/pondersource/nc-sciencemesh sciencemesh
&lt;/code>&lt;/pre>&lt;p>Enable the app in the Nextcloud admin dashboard.
This will cause a few necessary database tables to be created.&lt;/p>
&lt;h2 id="first-use">First use&lt;/h2>
&lt;p>From there on, follow the &lt;a href="./admin.md">admin guide&lt;/a>.&lt;/p></description></item><item><title>Docs: ScienceMesh-Nextcloud User Documentation</title><link>/docs/obsolete/nextcloud/user/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/obsolete/nextcloud/user/</guid><description>
&lt;h1 id="user-documentation">User Documentation&lt;/h1>
&lt;p>The ScienceMesh app gives a GUI where the user can generate and paste OCM invitations.
You can get to it by clicking the ScienceMesh icon at the top bar of the Nextcloud GUI.&lt;/p>
&lt;p>The app GUI only shows the sending and receiving of ScienceMesh invites. The actual sharing
of a document or folder, and the receiving of a shared document or folder, works the same way
as for sending and receiving other share types in Nextcloud.&lt;/p>
&lt;p>When searching for a collaborator to share with, remote ScienceMesh users who
accepted your invitation will show up.&lt;/p>
&lt;!--- TODO: add some screenshots here. --->
&lt;p>If you have any questions about how to share a folder or document across ScienceMesh through Nextcloud,
or you received a ScienceMesh invite from a remote colleague and don&amp;rsquo;t see how to accept the invite and
receive the share, please ask &lt;code>@michielbdejong&lt;/code> in &lt;a href="https://gitter.im/cs3org/REVA">Gitter chat&lt;/a> for help.&lt;/p></description></item></channel></rss>