# HG changeset patch # User Marcin Kuzminski # Date 2017-08-14 15:32:13 # Node ID 7f42b8f2a0129b395ec74795d50ee4d49cdcb553 # Parent 6912851a73dbfeb2deac0da51c7342e237414044 docs: updated enable celery documentation diff --git a/docs/install/install-celery.rst b/docs/install/configure-celery.rst rename from docs/install/install-celery.rst rename to docs/install/configure-celery.rst --- a/docs/install/install-celery.rst +++ b/docs/install/configure-celery.rst @@ -1,66 +1,69 @@ .. _config-celery: -Install Celery --------------- +Configure Celery +---------------- -To improve |RCM| performance you should install Celery_ as it makes -asynchronous tasks work efficiently. If you -install Celery you also need multi-broker support. The recommended message -broker is rabbitmq_. |RCM| works in sync -mode, but running Celery_ will give you a large speed improvement when -managing many big repositories. +To improve |RCM| performance you should configure and enabled Celery_ as it makes +asynchronous tasks work efficiently. Most important it allows sending notification +emails, create repository forks, and import repositories in async way. + +If you decide to use Celery you also need a working message queue. +The recommended message broker is rabbitmq_. + + +In order to have install and configure Celery, follow these steps: -If you want to run |RCM| with Celery you need to run ``celeryd`` using the -``paster`` command and the message broker. -The ``paster`` command is already installed during |RCM| installation. - -To install and configure Celery, use the following steps: +1. Install RabbitMQ, see the documentation on the Celery website for + `rabbitmq installation`_. +2. Configure Celery in the + :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. + Set the following minimal settings, that are set during + rabbitmq_ installation:: -1. Install Celery and RabbitMQ, see the documentation on the Celery website for - `Celery installation`_ and `rabbitmq installation`_. -2. Enable Celery in the - :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. -3. Run the Celery daemon with the ``paster`` command, - using the following example - ``.rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini`` + broker.host = + broker.vhost = + broker.user = + broker.password = -.. code-block:: ini + Full configuration example is below: + + .. code-block:: ini - # Set this section of the ini file to match your Celery installation - #################################### - ### CELERY CONFIG #### - #################################### - ## Set to true - use_celery = false - broker.host = localhost - broker.vhost = rabbitmqhost - broker.port = 5672 - broker.user = rabbitmq - broker.password = qweqwe + # Set this section of the ini file to match your Celery installation + #################################### + ### CELERY CONFIG #### + #################################### + ## Set to true + use_celery = true + broker.host = localhost + broker.vhost = rabbitmqvhost + broker.port = 5672 + broker.user = rabbitmq + broker.password = secret - celery.imports = rhodecode.lib.celerylib.tasks + celery.imports = rhodecode.lib.celerylib.tasks - celery.result.backend = amqp - celery.result.dburi = amqp:// - celery.result.serialier = json + celery.result.backend = amqp + celery.result.dburi = amqp:// + celery.result.serialier = json - #celery.send.task.error.emails = true - #celery.amqp.task.result.expires = 18000 + #celery.send.task.error.emails = true + #celery.amqp.task.result.expires = 18000 - celeryd.concurrency = 2 - #celeryd.log.file = celeryd.log - celeryd.log.level = debug - celeryd.max.tasks.per.child = 1 + celeryd.concurrency = 2 + #celeryd.log.file = celeryd.log + celeryd.log.level = debug + celeryd.max.tasks.per.child = 1 - ## tasks will never be sent to the queue, but executed locally instead. - celery.always.eager = false + ## tasks will never be sent to the queue, but executed locally instead. + celery.always.eager = false + -.. code-block:: bash +3. Enable celery, and install `celeryd` process script using the `enable-module`:: - # Once the above is configured and saved - # Run celery with the paster command and specify the ini file - .rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini + rccontrol enable-module celery {instance-id} + .. _python: http://www.python.org/ .. _mercurial: http://mercurial.selenic.com/ @@ -68,4 +71,3 @@ 3. Run the Celery daemon with the ``past .. _rabbitmq: http://www.rabbitmq.com/ .. _rabbitmq installation: http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html .. _Celery installation: http://docs.celeryproject.org/en/latest/getting-started/introduction.html#bundles -.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/ diff --git a/docs/install/install-steps.rst b/docs/install/install-steps.rst --- a/docs/install/install-steps.rst +++ b/docs/install/install-steps.rst @@ -10,5 +10,5 @@ the information in these sections to con setup-email database-string - install-celery + configure-celery migrate-repos