diff --git a/HISTORY.rst b/HISTORY.rst index ae0515b35f..1f983c0344 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,17 +7,18 @@ - Update devpi-server version to 5.3.1. - Add targets to run staging containers using RabbitMQ as broker. -- Add test for GitLab issue #702 -- Don't set SourceColumns to the attribute name when no help text +- Don't set SourceColumn to the attribute name when no help text is defined. -- Make it clear when a setting is being overrided by an environment +- Make it clear when a setting is being overridden by an environment variable. Add better text explanation. Change the column to a check mark widget. - Add icons to the smart settings links. - Fix docker-runtest-all target. - Fix the evaluation priority of the bootstrap settings. Closes GitLab issue #702. Thanks to Kevin Pawsey (@kevinpawsey) for the report and the help - debuging the issue. + debugging the issue. +- Switch from librabbitmq to py-amqp. Closes GitLab issue #699. Thanks to + Rob de Canha-Knight (@rssfed23) for the report, research, and debug. 3.3.3 (2019-12-05) ================== diff --git a/config.env b/config.env index 19a9d1c6a1..c0fb776fbb 100644 --- a/config.env +++ b/config.env @@ -1,8 +1,9 @@ DOCKER_MYSQL_IMAGE_VERSION=mysql:8.0 DOCKER_ORACLE_IMAGE_VERSION=wnameless/oracle-xe-11g DOCKER_POSTGRES_IMAGE_VERSION=postgres:9.6-alpine -DOCKER_RABBITMQ_IMAGE_VERSION=rabbitmq:3 +DOCKER_RABBITMQ_IMAGE_VERSION=rabbitmq:3-alpine DOCKER_REDIS_IMAGE_VERSION=redis:5.0-alpine +PYTHON_AMQP_VERSION=2.5.1 PYTHON_FLOWER_VERSION=0.9.3 PYTHON_LIBRABBITMQ_VERSION=2.0.0 PYTHON_MYSQL_VERSION=1.4.4 diff --git a/docker/Dockerfile b/docker/Dockerfile index a05af1f0fe..15d07fad65 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -113,7 +113,7 @@ RUN set -a \ && python3 -m venv "${PROJECT_INSTALL_DIR}" \ && . "${PROJECT_INSTALL_DIR}/bin/activate" \ && pip install --no-cache-dir \ - librabbitmq==$PYTHON_LIBRABBITMQ_VERSION \ + amqp==$PYTHON_AMQP_VERSION \ mysqlclient==$PYTHON_MYSQL_VERSION \ psycopg2==$PYTHON_PSYCOPG2_VERSION \ redis==$PYTHON_REDIS_VERSION \ diff --git a/docs/chapters/deploying.txt b/docs/chapters/deploying.txt index e819a69216..7889435e59 100644 --- a/docs/chapters/deploying.txt +++ b/docs/chapters/deploying.txt @@ -218,7 +218,7 @@ of a restart or power failure. The Gunicorn workers are increased to 3. .. code-block:: bash - sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 librabbitmq==|PYTHON_LIBRABBITMQ_VERSION| + sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 amqp==|PYTHON_AMQP_VERSION| #. Create the RabbitMQ user and vhost: diff --git a/docs/releases/3.3.2.txt b/docs/releases/3.3.2.txt index cb2cc40cf2..d6e398198d 100644 --- a/docs/releases/3.3.2.txt +++ b/docs/releases/3.3.2.txt @@ -72,26 +72,6 @@ Upgrading from Mayan EDMS 3.2.x chown mayan:mayan /home/mayan -Upgrade steps from any previous version of Mayan EDMS -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -#. Remove deprecated requirements: - - .. code-block:: bash - - sudo -u mayan curl |SOURCE_CODE_REPOSITORY|raw/master/removals.txt -o /tmp/removals.txt \ - && sudo -u mayan |MAYAN_PIP_BIN| uninstall -y -r /tmp/removals.txt - - -#. Update the Mayan EDMS Python package: - - .. code-block:: bash - - sudo -u mayan |MAYAN_PIP_BIN| install mayan-edms==3.3.2 - - the requirements will also be updated automatically. - - #. Reinstall the Python client for PostgreSQL and Redis: .. code-block:: bash @@ -111,7 +91,27 @@ Upgrade steps from any previous version of Mayan EDMS .. code-block:: bash - sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 librabbitmq==|PYTHON_LIBRABBITMQ_VERSION| + sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 amqp==|PYTHON_AMQP_VERSION| + + +Upgrade steps from any previous version of Mayan EDMS +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Remove deprecated requirements: + + .. code-block:: bash + + sudo -u mayan curl |SOURCE_CODE_REPOSITORY|raw/master/removals.txt -o /tmp/removals.txt \ + && sudo -u mayan |MAYAN_PIP_BIN| uninstall -y -r /tmp/removals.txt + + +#. Update the Mayan EDMS Python package: + + .. code-block:: bash + + sudo -u mayan |MAYAN_PIP_BIN| install mayan-edms==3.3.2 + + the requirements will also be updated automatically. #. Make a backup of your supervisord file: diff --git a/docs/releases/3.3.3.txt b/docs/releases/3.3.3.txt index d888278b9d..4f717a52ed 100644 --- a/docs/releases/3.3.3.txt +++ b/docs/releases/3.3.3.txt @@ -83,27 +83,6 @@ Upgrading from Mayan EDMS 3.2.x chown mayan:mayan /home/mayan - -Upgrade steps from any previous version of Mayan EDMS -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -#. Remove deprecated requirements: - - .. code-block:: bash - - sudo -u mayan curl |SOURCE_CODE_REPOSITORY|raw/master/removals.txt -o /tmp/removals.txt \ - && sudo -u mayan |MAYAN_PIP_BIN| uninstall -y -r /tmp/removals.txt - - -#. Update the Mayan EDMS Python package: - - .. code-block:: bash - - sudo -u mayan |MAYAN_PIP_BIN| install mayan-edms==3.3.3 - - the requirements will also be updated automatically. - - #. Reinstall the Python client for PostgreSQL and Redis: .. code-block:: bash @@ -123,7 +102,27 @@ Upgrade steps from any previous version of Mayan EDMS .. code-block:: bash - sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 librabbitmq==|PYTHON_LIBRABBITMQ_VERSION| + sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 amqp==|PYTHON_AMQP_VERSION| + + +Upgrade steps from any previous version of Mayan EDMS +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Remove deprecated requirements: + + .. code-block:: bash + + sudo -u mayan curl |SOURCE_CODE_REPOSITORY|raw/master/removals.txt -o /tmp/removals.txt \ + && sudo -u mayan |MAYAN_PIP_BIN| uninstall -y -r /tmp/removals.txt + + +#. Update the Mayan EDMS Python package: + + .. code-block:: bash + + sudo -u mayan |MAYAN_PIP_BIN| install mayan-edms==3.3.3 + + the requirements will also be updated automatically. #. Make a backup of your supervisord file: diff --git a/docs/releases/3.3.4.txt b/docs/releases/3.3.4.txt new file mode 100644 index 0000000000..91154befcf --- /dev/null +++ b/docs/releases/3.3.4.txt @@ -0,0 +1,182 @@ +Version 3.3.4 +============= + +Released: December XX, 2019 + + +Changes +------- + + + +Removals +-------- + +- None + + +Upgrading process +----------------- + +#. Stop supervisord:: + + sudo systemctl stop supervisor + + +Upgrading from Mayan EDMS 3.2.x +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Install the Python 3 development OS package: + + .. code-block:: bash + + sudo apt-get install python3-dev + + +#. Update the virtualenv to use Python 3: + + .. code-block:: bash + + sudo -u mayan virtualenv --clear /opt/mayan-edms -p /usr/bin/python3 + + +#. Create a home directory for the Mayan EDMS system user: + + .. code-block:: bash + + mkdir /home/mayan + + +#. Grant ownership to the Mayan EDMS system user: + + .. code-block:: bash + + chown mayan:mayan /home/mayan + +#. Reinstall the Python client for PostgreSQL and Redis: + + .. code-block:: bash + + sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 psycopg2==|PYTHON_PSYCOPG2_VERSION| redis==|PYTHON_REDIS_VERSION| + + .. note:: + + Platforms with the ARM CPU might also need additional requirements: + + .. code-block:: bash + + sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 psutil==|PYTHON_PSUTIL_VERSION| + + +#. Reinstall the Python client for RabbitMQ if you are using RabbitMQ as a broker: + + .. code-block:: bash + + sudo -u mayan |MAYAN_PIP_BIN| install --no-use-pep517 amqp==|PYTHON_AMQP_VERSION| + + +Upgrade steps from any previous version of Mayan EDMS +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Remove deprecated requirements: + + .. code-block:: bash + + sudo -u mayan curl |SOURCE_CODE_REPOSITORY|raw/master/removals.txt -o /tmp/removals.txt \ + && sudo -u mayan |MAYAN_PIP_BIN| uninstall -y -r /tmp/removals.txt + + +#. Update the Mayan EDMS Python package: + + .. code-block:: bash + + sudo -u mayan |MAYAN_PIP_BIN| install mayan-edms==3.3.3 + + the requirements will also be updated automatically. + + +#. Make a backup of your supervisord file: + + .. code-block:: bash + + sudo cp |MAYAN_SUPERVISOR_CONF| |MAYAN_SUPERVISOR_CONF|.bck + + +#. Update the supervisord configuration file. Replace the environment + variables values show here with your respective settings. This step will refresh + the supervisord configuration file with the new queues and the latest + recommended layout: + + .. code-block:: bash + + sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \ + MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \ + MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \ + |MAYAN_BIN| platformtemplate supervisord | sudo sh -c "cat > |MAYAN_SUPERVISOR_CONF|" + + or: + + .. code-block:: bash + + sudo -u mayan MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}\" \ + MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \ + |MAYAN_BIN| platformtemplate supervisord | sudo sh -c "cat > |MAYAN_SUPERVISOR_CONF|" + + +#. Edit the supervisord configuration file and update any setting specific to your installation: + + .. code-block:: bash + + sudo vi |MAYAN_SUPERVISOR_CONF| + + +#. Migrate existing database schema with: + + .. code-block:: bash + + sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \ + MAYAN_DATABASE_PASSWORD=mayanuserpass MAYAN_DATABASE_USER=mayan \ + MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \ + |MAYAN_BIN| performupgrade + + or: + + .. code-block:: bash + + sudo -u mayan MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayanuserpass','USER':'mayan','HOST':'127.0.0.1'}}" \ + MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \ + |MAYAN_BIN| performupgrade + + +#. Add new static media: + + .. code-block:: bash + + sudo -u mayan MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| \ + |MAYAN_BIN| preparestatic --noinput + + +#. Start supervisord: + + .. code-block:: bash + + sudo systemctl start supervisor + + +The upgrade procedure is now complete. + + +Backward incompatible changes +----------------------------- + +- None + + +Bugs fixed or issues closed +--------------------------- + +- :gitlab-issue:`699` 3.3.3 - TypeError: can't pickle memoryview objects +- :gitlab-issue:`702` [Docker] Issue after upgrading to 3.3.3 + + +.. _PyPI: https://pypi.python.org/pypi/mayan-edms/ diff --git a/docs/releases/index.txt b/docs/releases/index.txt index 32b056ef76..a0000395b7 100644 --- a/docs/releases/index.txt +++ b/docs/releases/index.txt @@ -20,6 +20,7 @@ versions of the documentation contain the release notes for any later releases. .. toctree:: :maxdepth: 1 + 3.3.4 3.3.3 3.3.2 3.3.1