diff --git a/changelog/unreleased/add-tutorial.md b/changelog/unreleased/add-tutorial.md new file mode 100644 index 0000000000..28766dccc3 --- /dev/null +++ b/changelog/unreleased/add-tutorial.md @@ -0,0 +1,5 @@ +Enhancement: Add tutorial for deploying WOPI and Reva locally + +Add a new tutorial on how to run Reva and Wopiserver together locally + +https://github.com/cs3org/reva/pull/922 \ No newline at end of file diff --git a/docs/content/en/docs/tutorials/accept-invite-tutorial.md b/docs/content/en/docs/tutorials/accept-invite-tutorial.md index e9992277cd..2bf3534e79 100644 --- a/docs/content/en/docs/tutorials/accept-invite-tutorial.md +++ b/docs/content/en/docs/tutorials/accept-invite-tutorial.md @@ -36,21 +36,9 @@ git clone git@github.com:sciencemesh/accept-invite.git ``` ## 2. Build Reva -Go to your Reva folder +Follow the instructions in https://reva.link/docs/getting-started/install-reva/ for how to build reva. If you will do local +changes in reva, follow the "Build from sources" instructions. -``` -cd reva -``` - -Now you need to build Reva by running the following commands (you need to be in the *reva* folder) - -``` -make deps -``` - -``` -make -``` ## 3. Set up Phoenix Go to your Phoenix folder diff --git a/docs/content/en/docs/tutorials/phoenix-tutorial.md b/docs/content/en/docs/tutorials/phoenix-tutorial.md index 1bf9d65258..8a5b8aa36e 100644 --- a/docs/content/en/docs/tutorials/phoenix-tutorial.md +++ b/docs/content/en/docs/tutorials/phoenix-tutorial.md @@ -31,21 +31,8 @@ git clone https://github.com/cs3org/reva ``` ## 2. Build Reva -Go to your Reva folder - -``` -cd reva -``` - -Now you need to build Reva by running the following commands (you need to be in the *reva* folder) - -``` -make deps -``` - -``` -make -``` +Follow the instructions in https://reva.link/docs/getting-started/install-reva/ for how to build reva. If you will do local +changes in reva, follow the "Build from sources" instructions. ## 3. Set up Phoenix Go to your Phoenix folder diff --git a/docs/content/en/docs/tutorials/share-tutorial.md b/docs/content/en/docs/tutorials/share-tutorial.md index 2ffce31199..7c6f712b0a 100644 --- a/docs/content/en/docs/tutorials/share-tutorial.md +++ b/docs/content/en/docs/tutorials/share-tutorial.md @@ -22,21 +22,8 @@ git clone https://github.com/cs3org/reva ``` ## 2. Build Reva -Go to the reva folder - -``` -cd reva -``` - -We'll now build reva by running the following commands (you need to be in the *reva* folder) - -``` -make deps -``` - -``` -make -``` +Follow the instructions in https://reva.link/docs/getting-started/install-reva/ for how to build reva. If you will do local +changes in reva, follow the "Build from sources" instructions. ## 4. Run Reva Now we need to start two Reva daemons corresponding to two different mesh providers, thus enabling sharing of files between users belonging to these two providers. For our example, we consider the example of CERNBox deployed at localhost:19001 and the CESNET owncloud at localhost:17001. Follow these steps: diff --git a/docs/content/en/docs/tutorials/wopi-tutorial.md b/docs/content/en/docs/tutorials/wopi-tutorial.md new file mode 100644 index 0000000000..f1347f9f14 --- /dev/null +++ b/docs/content/en/docs/tutorials/wopi-tutorial.md @@ -0,0 +1,98 @@ +--- +title: "Use WOPI with Reva" +linkTitle: "Use WOPI with Reva" +weight: 5 +description: > + Connect the cs3 wopiserver with Reva +--- + +This is a guide on how you can run both Reva and wopiserver locally in a dev environment. +The wopiserver will allow you to connect Reva to online editors such as collabora. + +## Prerequisites +If you encounter strange problems, please check which version of the prerequisites you are running, it might be that you need to update/downgrade. For reference ask someone who already has reva and Phoenix running, they will have updated information on the versions. +* golang >= 1.12 +* make/automake +* git >= 2 +* python >=3.7 + +## 1. Clone the wopiserver and Reva repos +Clone the wopiserver repo from https://github.com/cs3org/wopiserver + +``` +git clone https://github.com/cs3org/wopiserver +``` + +Clone the reva repo from https://github.com/cs3org/reva + +``` +git clone https://github.com/cs3org/reva +``` + +## 2. Configure Reva +Add `disable_tus = true` under `[http.services.dataprovider]` and under `[grpc.services.storageprovider]` in the file `ocmd-server-1.toml`. + +## 3. Build Reva +Follow the instructions in https://reva.link/docs/getting-started/install-reva/ for how to build reva. If you will do local +changes in reva, follow the "Build from sources" instructions. + +## 4. Run Reva +Now you need to run Revad (the Reva daemon). Follow these steps +from the *reva* folder: + +``` +cd examples/ocm/ && ../../cmd/revad/revad -c ocmd-server-1.toml & ../../cmd/revad/revad -c ocmd-server-2.toml &. +``` + +The Reva daemon (revad) should now be running. + +## 5. Configure the wopiserver +Follow the instructions in the readme for running the server locally ("Run the WOPI server locally", https://github.com/cs3org/wopiserver). You will need to do come changes in the config file, here is a more relevant example of a wopi config when runnning the server together with reva: + +``` +# +# wopiserver.conf - basic working configuration for a docker image +# + +[general] +storagetype = cs3 +port = 8880 +allowedclients = localhost +oosurl = https://oos.web.cern.ch +codeurl = https://collabora.cern.ch:9980/byoa/collabora +codimdurl = http://cbox-wopidev-01.cern.ch:8000 +tokenvalidity = 86400 + +wopiurl = localhost:8880 +downloadurl = localhost:8880/wopi/cbox/download + +# Logging level. Debug enables the Flask debug mode as well. +# Valid values are: Debug, Info, Warning, Error. +loglevel = Debug + +[security] +usehttps = no + +# location of the secret files. Requires a restart of the +# WOPI server when either the files or their content change. +wopisecretfile = /etc/wopi/wopisecret +iopsecretfile = /etc/wopi/iopsecret + +[cs3] +revahost = localhost:19000 +authtokenvalidity = 3600 + +[io] +# Size used for buffered xroot reads [bytes] +chunksize = 4194304 +``` + +## 6. Run wopiserver +Run according to instructions in the readme ("Run the WOPI server locally", https://github.com/cs3org/wopiserver). + +## 7. Local changes +To try the connection you could for example go to a new reva terminal window and type +`./cmd/reva/reva -insecure login basic` - use einstein and relativity as log in ccredentials +`./cmd/reva/reva -insecure open-file-in-app-provider /home/example.txt read` - this should print out the app provider url in your terminal. + +## 8. Enjoy your new Reva and wopiserver set up!