From 9ba18937a14f0e21b3b35d89bd7d5b81f1aa87dd Mon Sep 17 00:00:00 2001 From: Johannes Rosenberger Date: Wed, 20 Apr 2022 12:58:11 +0200 Subject: [PATCH] [libreoffice] update installation instructions for udocker and CODE (#1196) * [libreoffice] update udocker install instructions they changed upstream fixes https://github.com/Uberspace/lab/issues/1178 * [libreoffice] update installation instruction fixes https://github.com/Uberspace/lab/issues/1192 container changed upstream, e.g. admin console URL, and docker container libreoffice/online seems to be abandoned for the time being * [libreoffice] allow changing the wopi host setting The init script of the collabora CODE docker only uses the documented 'domain' environment variable if the 'storage.wopi.host[0]' is set to 'localhost' in the config file '/etc/coolwsd/coolwsd.xml'. This means, if we had set 'domain=foo' on one start, we cannot change it later. Therefore, we now set the wopi host by setting the commandline option --o:storage.wopi.host[0] via 'extra_params'. This always takes precedence over the value in the config file. * [libreoffice] enhance formatting and values of service config * [libreoffice] fix tar name in udocker install --- source/guide_libreoffice.rst | 103 ++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 50 deletions(-) diff --git a/source/guide_libreoffice.rst b/source/guide_libreoffice.rst index d3c5f0d7..622ab811 100644 --- a/source/guide_libreoffice.rst +++ b/source/guide_libreoffice.rst @@ -63,33 +63,50 @@ Licensing information about containers on Dockerhub in general is available in S Prerequisites ============= -`LibreOffice Online`_ is only an editor. To store the files and provide access -to them you must have WOPI host or a WebDAV server running. +`LibreOffice Online`_ is only an editor, and it is meant to be integrated into +other web applications. To store the files and provide web access +to them you must have a WOPI host running. For example, :lab:`Nextcloud ` with the Collabora app and :lab:`Seafile ` Professional Edition integrate LibreOffice Online via WOPI. A list of integrations can be found at the `CODE`_ website. -For this guide, WebDAV was not tested. It is assumed that you use a WOPI host accessible at ``cloud.example.org``. Setup the domain where your office installation will be accessible. .. include:: includes/web-domain-list.rst -Then, install the latest stable version of `udocker`_: +Then, look for the latest version number of `udocker`_ on the +`github page `_. +Here, we assume that the version is 1.3.1. :: - [isabell@stardust ~]$ curl https://raw.githubusercontent.com/indigo-dc/udocker/master/udocker.py > $HOME/bin/udocker + [isabell@stardust ~]$ curl -L https://github.com/indigo-dc/udocker/releases/download/v1.3.1/udocker-1.3.1.tar.gz > udocker.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed - 100 338k 100 338k 0 0 522k 0 --:--:-- --:--:-- --:--:-- 521k + 100 657 100 657 0 0 1294 0 --:--:-- --:--:-- --:--:-- 1293 + 100 75791 100 75791 0 0 64650 0 0:00:01 0:00:01 --:--:-- 64650 + [isabell@stardust ~]$ tar zxvf udocker.tar.gz + [isabell@stardust ~]$ + +Then, create a wrapper script ``$HOME/bin/udocker`` with the following content: + +.. code-block:: sh + + #!/bin/sh + + exec $HOME/udocker/udocker "$@" + +Make the wrapper executable and finish the `udocker`_ installation by running + +:: + [isabell@stardust ~]$ chmod 0740 $HOME/bin/udocker [isabell@stardust ~]$ udocker install - Info: setup repo: /home/isabell/.udocker - Info: udocker command line interface 1.1.4 - Info: searching for udockertools 1.1.4 - Info: installing udockertools 1.1.4 + Info: udocker command line interface 1.3.1 + Info: searching for udockertools 1.2.8 + Info: installing udockertools 1.2.8 Info: installation of udockertools successful [isabell@stardust ~]$ @@ -98,35 +115,13 @@ This installs the binaries and libraries needed by udocker into ``$HOME/.udocker Installation ============ -There are three officially endorsed docker distributions of LibreOffice: - - * `LibreOffice Online`_, by `The Document Foundation - `_ is the basis for all three. There - is no official stable build, but an unstable docker image - `libreoffice/online `_. - * `Collabora Office Development Edition `_ (CODE) is a more - active development version of LibreOffice Online by Collabora_ - provided as docker image `collabora/code - `_. - * `LibreOffice Powered by CIB`_ is a commercially supported distribution with - the stable docker image `cibsoftware/libreoffice-online - `_. It is not - covered in this guide, as there is no reliable licensing information - available for it. - -On first sight, the main differences are the sizes of the docker images -and slightly different default configurations and look-and-feels. However, the new -*notebookbar* (ribbon-styled) design `introduced in CODE 6.4 -`_ does not -yet work correctly in the `libreoffice/online`_ docker image at the time of -writing (2021-02-16). - -In the following, LibreOffice refers to both `LibreOffice Online`_ and `CODE`_. -A listing of the ways to get LibreOffice Online is available on the -`official download page `_ by The Document Foundation. - -Assume you chose `collabora/code`_. Pull the image from dockerhub and create -a container: +The only maintained docker distribution with reliable licensing information +is currently `Collabora Office Development Edition `_ (CODE) +by Collabora_ (2022-02-04; see the project `status page +`_). + +To install, pull the `CODE docker image `_ +from dockerhub and create a container: :: @@ -160,7 +155,7 @@ First, configure `udocker`_ to use `fakechroot`_ instead of `proot`_: By default, `udocker`_ uses `proot`_ to fake `chroot`_. However, `proot`_ does not support real multithreading and leads to a noticeable lag when editing documents. An overview of the execution modes of udocker can be found in the - `udocker manual `_. + `udocker manual `_. Configure webserver ------------------- @@ -185,14 +180,15 @@ embedding only in websites served from the same domain and port. Configuration file ------------------ -There is a configuration file ``$HOME/.udocker/containers/collabora-code/ROOT/etc/loolwsd/loolwsd.xml``, +There is a configuration file ``$HOME/.udocker/containers/collabora-code/ROOT/etc/coolwsd/coolwsd.xml``, which contains also explanations of the configuration options. But since some options cannot be set there, in this guide configuration is done via the commandline. Documentation about the commandline and environment options is available in the `docker setup instructions -`_ by Collabora. +`_ +by Collabora. Setup daemon ------------ @@ -218,19 +214,24 @@ Open the file and insert the following content: ,username="admin" ,password="" ,extra_params="" - command=bash -c '\ + command=bash -c ' %(ENV_HOME)s/bin/udocker run \ --user="$(jq -r .container_config.User \ < %(ENV_HOME)s/.udocker/containers/"$container"/container.json)" \ --env=DONT_GEN_SSL_CERT=1 \ --workdir=/ \ - --env=domain="$(echo "$fileserver" | sed "s/\./\\\\./g")" \ --env=username="$username" --env=password="$password" \ --env=dictionaries="$dictionaries" \ - --env="extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:security.capabilities=false $extra_params" \ - "$container" \ + --env="extra_params= + --o:ssl.enable=false + --o:ssl.termination=true + --o:security.capabilities=false + --o:storage.wopi.host[0]=$(echo "$fileserver" | sed "s/\./\\\\\\./g") + $extra_params + " \ + "$container" ' - startsecs=45 + startsecs=30 autorestart=yes stopasgroup=yes killasgroup=yes @@ -270,7 +271,7 @@ Run on the command line: If you get an ``OK`` the service is running and can be accessed. -Now you can navigate to https://isabell.uber.space/loleaflet/dist/admin/admin.html +Now you can navigate to https://isabell.uber.space/browser/dist/admin/admin.html to try out the admin console. You can also configure your file host at ``cloud.example.org`` to use your libreoffice installation. @@ -328,6 +329,9 @@ Watch the :manual_anchor:`logs `: port.* Sometimes the old instance doesn't shut down correctly, especially if aborted while starting. Kill it in ``htop``. +* If you have problems installing udocker, have a look at the official + `installation manual `_. + Other trouble? `Mail the author `_, post under an existing issue or create an `issue on GitHub `_. @@ -371,13 +375,12 @@ If everything is fine, you can delete the old container: .. _Collabora Online: https://www.collaboraoffice.com/collabora-online/ .. _Docker Terms of Service: https://www.docker.com/legal/docker-terms-service .. _fakechroot: https://github.com/dex4er/fakechroot/wiki -.. _Libreoffice powered by CIB: https://libreoffice.cib.de/ .. _LOOL: https://www.libreoffice.org/download/libreoffice-online/ .. _proot: https://proot-me.github.io/ .. _udocker: https://github.com/indigo-dc/udocker/ ---- -Tested with LibreOffice Online 2020-09-08, CODE 6.4.6.2, udocker 1.1.4, on Uberspace 7.9.0, connected to a Nextcloud 19.0.7 with the app Collabora Online 3.7.14. +Tested with CODE 21.11.1.4.1, udocker 1.3.1, on Uberspace 7.12.0, connected to a Nextcloud 23.0.0 with the app Collabora Online 5.0.1. .. author_list::