From 54c007b149cec1d236e84c835969d2581f3e521d Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 17 May 2019 17:44:45 -0400 Subject: [PATCH] Documentation updates Signed-off-by: Roberto Rosario --- docs/chapters/docker.rst | 15 ++++++++++++--- docs/chapters/scaling_up.rst | 12 ++++++++++++ docs/chapters/signatures.rst | 1 + docs/chapters/sources.rst | 5 +++++ docs/index.rst | 2 ++ docs/topics/adding_documents.rst | 5 +++++ docs/topics/docker.rst | 8 ++++++++ docs/topics/getting_started.rst | 13 +++++++++++++ 8 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 docs/topics/adding_documents.rst create mode 100644 docs/topics/docker.rst diff --git a/docs/chapters/docker.rst b/docs/chapters/docker.rst index 69ae3b25d5..3ccdcd6b7d 100644 --- a/docs/chapters/docker.rst +++ b/docs/chapters/docker.rst @@ -15,6 +15,12 @@ the command:: docker pull mayanedms/mayanedms: +Instead of a specific version tag you may use then generic ``:latest`` tag +to the get latest version available automatically. If you use the ``:latest`` +tag here, remember to do so in the next steps also.:: + + docker pull mayanedms/mayanedms:latest + Then download version 9.6 of the Docker PostgreSQL image:: docker pull postgres:9.6 @@ -37,9 +43,7 @@ expose its internal 5432 port (PostgreSQL's default port) via the host's 5432 port. The data of this container will reside on the host's ``/docker-volumes/mayan-edms/postgres`` folder. -Finally create and run a Mayan EDMS container. Change with the -latest version in numeric form (example: 3.2) or use the ``latest`` -identifier:: +Finally create and run a Mayan EDMS container. docker run -d \ --name mayan-edms \ @@ -73,6 +77,7 @@ If another web server is running on port 80 use a different port in the Using a dedicated Docker network -------------------------------- + Use this method to avoid having to expose PostreSQL port to the host's network or if you have other PostgreSQL instances but still want to use the default port of 5432 for this installation. @@ -112,6 +117,7 @@ instead of the IP address of the Docker host (``172.17.0.1``):: -v /docker-volumes/mayan-edms/media:/var/lib/mayan \ mayanedms/mayanedms: + Stopping and starting the container ----------------------------------- @@ -127,6 +133,7 @@ To start the container again:: .. _docker_environment_variables: + Environment Variables --------------------- @@ -268,6 +275,8 @@ Optional. Changes the GUID of the ``mayan`` user internal to the Docker container. Defaults to 1000. +.. _docker-accessing-outside-data: + Accessing outside data ====================== diff --git a/docs/chapters/scaling_up.rst b/docs/chapters/scaling_up.rst index c15c548c6b..1b716e1433 100644 --- a/docs/chapters/scaling_up.rst +++ b/docs/chapters/scaling_up.rst @@ -6,15 +6,19 @@ The default installation method fits most use cases. If you use case requires more speed or capacity here are some suggestion that can help you improve the performance of your installation. + Change the database manager =========================== + Use PostgreSQL or MySQL as the database manager. Tweak the memory setting of the database manager to increase memory allocation. More PostgreSQL specific examples are available in their wiki page: https://wiki.postgresql.org/wiki/Performance_Optimization + Increase the number of Gunicorn workers ======================================= + The Gunicorn workers process HTTP requests and affect the speed at which the website responds. @@ -33,6 +37,7 @@ And increase the value of the ``-w 2`` argument. This line is found in the Background task processing ========================== + The Celery workers are system processes that take care of the background tasks requested by the frontend interactions like document image rendering and periodic tasks like OCR. There are several dozen tasks defined in the code. @@ -77,6 +82,7 @@ The slow worker handles the queues: * parsing: Parses documents to extract actual text content * ocr: Performs OCR to transcribe page images to text + Optimizations ------------- @@ -130,8 +136,10 @@ container. You can launch a separate Docker Redis container and tell the Mayan EDMS container to use this via the MAYAN_CELERY_RESULT_BACKEND environment variable. The format of this variable is explained here: http://docs.celeryproject.org/en/3.1/configuration.html#celery-result-backend + Deployment type =============== + Docker provides a faster deployment and the overhead is not high on modern systems. It is however memory and CPU limited by default and you need to increase this limits. The settings to change the container resource limits @@ -140,8 +148,10 @@ are here: https://docs.docker.com/config/containers/resource_constraints/#limit- For the best performance possible use the advanced deployment method on a host dedicated to serving only Mayan EDMS. + Storage ======= + For best input and output speed use a block based local filesystem on an SSD drive for the ``/media`` sub folder. The location of the ``/media`` folder will be specified by the ``MEDIA_ROOT`` setting. @@ -149,8 +159,10 @@ will be specified by the ``MEDIA_ROOT`` setting. If capacity is your bottom line, switch to an :doc:`object storage <../chapters/object_storage>` system. + Use additional hosts ==================== + When one host is not enough you can use multiple hosts and share the load. Make sure that all hosts share the ``/media`` folder as specified by the ``MEDIA_ROOT`` setting, also the database, the broker, and the result storage. diff --git a/docs/chapters/signatures.rst b/docs/chapters/signatures.rst index 462ff04632..cb4a35e0dd 100644 --- a/docs/chapters/signatures.rst +++ b/docs/chapters/signatures.rst @@ -11,6 +11,7 @@ signatures sections of a document. .. blockdiag:: blockdiag { + orientation = portrait span_width = 240; diff --git a/docs/chapters/sources.rst b/docs/chapters/sources.rst index 9aabdb1f8b..00203bb3c9 100644 --- a/docs/chapters/sources.rst +++ b/docs/chapters/sources.rst @@ -55,3 +55,8 @@ Document source can be configure to allow document bundles to uploaded as compressed files which are decompressed and their content uploaded as separate documents. This feature is useful when migrating from another document manager system. + +.. note:: + + If you deployed a Mayan EDMS Docker container and want to use watched folders + or staging folder, refer to the Docker chapter :ref:`docker-accessing-outside-data`. diff --git a/docs/index.rst b/docs/index.rst index c5d1cd8f73..cbe8f1e4d9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,12 +21,14 @@ repository for electronic documents. topics/installation releases/index topics/getting_started + topics/adding_documents topics/access_control topics/categorization topics/collaboration topics/settings topics/storage topics/integration + topics/docker topics/advanced topics/administration topics/troubleshooting diff --git a/docs/topics/adding_documents.rst b/docs/topics/adding_documents.rst new file mode 100644 index 0000000000..1f7c4fae9a --- /dev/null +++ b/docs/topics/adding_documents.rst @@ -0,0 +1,5 @@ +################ +Adding documents +################ + +.. include:: ../chapters/sources.rst diff --git a/docs/topics/docker.rst b/docs/topics/docker.rst new file mode 100644 index 0000000000..6763dd9151 --- /dev/null +++ b/docs/topics/docker.rst @@ -0,0 +1,8 @@ +###### +Docker +###### + +Docker is a container technology. Containers are a standard unit of software +that packages up code and all its dependencies. + +.. include:: ../chapters/docker.rst diff --git a/docs/topics/getting_started.rst b/docs/topics/getting_started.rst index 16a20f3ff1..75ff46a808 100644 --- a/docs/topics/getting_started.rst +++ b/docs/topics/getting_started.rst @@ -4,6 +4,19 @@ Getting started These are the basic concepts you need to understand to start using Mayan EDMS. +The absolute minimum setup to start using Mayan EDMS is: + +#. A document type +#. A document source to add new documents + +that's it! + +To make things even easier, a default document type (named "Default") and a +default document source (also named "Default") were created for you during the +installation. So you don't need to do anything more to start adding documents +right now, however take your time reading the information below to get a deeper +understanding about how these concepts work. + .. include:: ../chapters/document_types.rst .. include:: ../chapters/sources.rst