Show More
@@ -1,29 +1,32 b'' | |||||
1 |
|
1 | |||
2 | .. _config-celery: |
|
2 | .. _config-celery: | |
3 |
|
3 | |||
4 | Install Celery |
|
4 | Configure Celery | |
5 | -------------- |
|
5 | ---------------- | |
6 |
|
6 | |||
7 |
To improve |RCM| performance you should |
|
7 | To improve |RCM| performance you should configure and enabled Celery_ as it makes | |
8 |
asynchronous tasks work efficiently. |
|
8 | asynchronous tasks work efficiently. Most important it allows sending notification | |
9 | install Celery you also need multi-broker support. The recommended message |
|
9 | emails, create repository forks, and import repositories in async way. | |
10 | broker is rabbitmq_. |RCM| works in sync |
|
10 | ||
11 | mode, but running Celery_ will give you a large speed improvement when |
|
11 | If you decide to use Celery you also need a working message queue. | |
12 | managing many big repositories. |
|
12 | The recommended message broker is rabbitmq_. | |
|
13 | ||||
|
14 | ||||
|
15 | In order to have install and configure Celery, follow these steps: | |||
13 |
|
16 | |||
14 | If you want to run |RCM| with Celery you need to run ``celeryd`` using the |
|
17 | 1. Install RabbitMQ, see the documentation on the Celery website for | |
15 | ``paster`` command and the message broker. |
|
18 | `rabbitmq installation`_. | |
16 | The ``paster`` command is already installed during |RCM| installation. |
|
19 | 2. Configure Celery in the | |
17 |
|
20 | :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. | ||
18 | To install and configure Celery, use the following steps: |
|
21 | Set the following minimal settings, that are set during | |
|
22 | rabbitmq_ installation:: | |||
19 |
|
23 | |||
20 | 1. Install Celery and RabbitMQ, see the documentation on the Celery website for |
|
24 | broker.host = | |
21 | `Celery installation`_ and `rabbitmq installation`_. |
|
25 | broker.vhost = | |
22 | 2. Enable Celery in the |
|
26 | broker.user = | |
23 | :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. |
|
27 | broker.password = | |
24 | 3. Run the Celery daemon with the ``paster`` command, |
|
28 | ||
25 | using the following example |
|
29 | Full configuration example is below: | |
26 | ``.rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini`` |
|
|||
27 |
|
30 | |||
28 | .. code-block:: ini |
|
31 | .. code-block:: ini | |
29 |
|
32 | |||
@@ -32,12 +35,12 b' 3. Run the Celery daemon with the ``past' | |||||
32 | ### CELERY CONFIG #### |
|
35 | ### CELERY CONFIG #### | |
33 | #################################### |
|
36 | #################################### | |
34 | ## Set to true |
|
37 | ## Set to true | |
35 |
use_celery = |
|
38 | use_celery = true | |
36 | broker.host = localhost |
|
39 | broker.host = localhost | |
37 | broker.vhost = rabbitmqhost |
|
40 | broker.vhost = rabbitmqvhost | |
38 | broker.port = 5672 |
|
41 | broker.port = 5672 | |
39 | broker.user = rabbitmq |
|
42 | broker.user = rabbitmq | |
40 |
broker.password = |
|
43 | broker.password = secret | |
41 |
|
44 | |||
42 | celery.imports = rhodecode.lib.celerylib.tasks |
|
45 | celery.imports = rhodecode.lib.celerylib.tasks | |
43 |
|
46 | |||
@@ -56,11 +59,11 b' 3. Run the Celery daemon with the ``past' | |||||
56 | ## tasks will never be sent to the queue, but executed locally instead. |
|
59 | ## tasks will never be sent to the queue, but executed locally instead. | |
57 | celery.always.eager = false |
|
60 | celery.always.eager = false | |
58 |
|
61 | |||
59 | .. code-block:: bash |
|
62 | ||
|
63 | 3. Enable celery, and install `celeryd` process script using the `enable-module`:: | |||
60 |
|
64 | |||
61 | # Once the above is configured and saved |
|
65 | rccontrol enable-module celery {instance-id} | |
62 | # Run celery with the paster command and specify the ini file |
|
66 | ||
63 | .rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini |
|
|||
64 |
|
67 | |||
65 | .. _python: http://www.python.org/ |
|
68 | .. _python: http://www.python.org/ | |
66 | .. _mercurial: http://mercurial.selenic.com/ |
|
69 | .. _mercurial: http://mercurial.selenic.com/ | |
@@ -68,4 +71,3 b' 3. Run the Celery daemon with the ``past' | |||||
68 | .. _rabbitmq: http://www.rabbitmq.com/ |
|
71 | .. _rabbitmq: http://www.rabbitmq.com/ | |
69 | .. _rabbitmq installation: http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html |
|
72 | .. _rabbitmq installation: http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html | |
70 | .. _Celery installation: http://docs.celeryproject.org/en/latest/getting-started/introduction.html#bundles |
|
73 | .. _Celery installation: http://docs.celeryproject.org/en/latest/getting-started/introduction.html#bundles | |
71 | .. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/ |
|
General Comments 0
You need to be logged in to leave comments.
Login now