Show More
@@ -1,71 +1,73 b'' | |||
|
1 | 1 | |
|
2 | 2 | .. _config-celery: |
|
3 | 3 | |
|
4 | Install Celery | |
|
5 | -------------- | |
|
4 | Configure Celery | |
|
5 | ---------------- | |
|
6 | 6 | |
|
7 |
To improve |RCM| performance you should |
|
|
8 |
asynchronous tasks work efficiently. |
|
|
9 | install Celery you also need multi-broker support. The recommended message | |
|
10 | broker is rabbitmq_. |RCM| works in sync | |
|
11 | mode, but running Celery_ will give you a large speed improvement when | |
|
12 | managing many big repositories. | |
|
7 | To improve |RCM| performance you should configure and enabled Celery_ as it makes | |
|
8 | asynchronous tasks work efficiently. Most important it allows sending notification | |
|
9 | emails, create repository forks, and import repositories in async way. | |
|
10 | ||
|
11 | If you decide to use Celery you also need a working message queue. | |
|
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 | |
|
15 | ``paster`` command and the message broker. | |
|
16 | The ``paster`` command is already installed during |RCM| installation. | |
|
17 | ||
|
18 | To install and configure Celery, use the following steps: | |
|
17 | 1. Install RabbitMQ, see the documentation on the Celery website for | |
|
18 | `rabbitmq installation`_. | |
|
19 | 2. Configure Celery in the | |
|
20 | :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. | |
|
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 | |
|
21 | `Celery installation`_ and `rabbitmq installation`_. | |
|
22 | 2. Enable Celery in the | |
|
23 | :file:`home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file. | |
|
24 | 3. Run the Celery daemon with the ``paster`` command, | |
|
25 | using the following example | |
|
26 | ``.rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini`` | |
|
24 | broker.host = | |
|
25 | broker.vhost = | |
|
26 | broker.user = | |
|
27 | broker.password = | |
|
28 | ||
|
29 | Full configuration example is below: | |
|
27 | 30 | |
|
28 | 31 | .. code-block:: ini |
|
29 | 32 | |
|
30 | 33 | # Set this section of the ini file to match your Celery installation |
|
31 | 34 | #################################### |
|
32 | 35 | ### CELERY CONFIG #### |
|
33 | 36 | #################################### |
|
34 | 37 | ## Set to true |
|
35 |
use_celery = |
|
|
38 | use_celery = true | |
|
36 | 39 | broker.host = localhost |
|
37 | broker.vhost = rabbitmqhost | |
|
40 | broker.vhost = rabbitmqvhost | |
|
38 | 41 | broker.port = 5672 |
|
39 | 42 | broker.user = rabbitmq |
|
40 |
broker.password = |
|
|
43 | broker.password = secret | |
|
41 | 44 | |
|
42 | 45 | celery.imports = rhodecode.lib.celerylib.tasks |
|
43 | 46 | |
|
44 | 47 | celery.result.backend = amqp |
|
45 | 48 | celery.result.dburi = amqp:// |
|
46 | 49 | celery.result.serialier = json |
|
47 | 50 | |
|
48 | 51 | #celery.send.task.error.emails = true |
|
49 | 52 | #celery.amqp.task.result.expires = 18000 |
|
50 | 53 | |
|
51 | 54 | celeryd.concurrency = 2 |
|
52 | 55 | #celeryd.log.file = celeryd.log |
|
53 | 56 | celeryd.log.level = debug |
|
54 | 57 | celeryd.max.tasks.per.child = 1 |
|
55 | 58 | |
|
56 | 59 | ## tasks will never be sent to the queue, but executed locally instead. |
|
57 | 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 | |
|
62 | # Run celery with the paster command and specify the ini file | |
|
63 | .rccontrol/enterprise-1/profile/bin/paster celeryd .rccontrol/enterprise-1/rhodecode.ini | |
|
65 | rccontrol enable-module celery {instance-id} | |
|
66 | ||
|
64 | 67 | |
|
65 | 68 | .. _python: http://www.python.org/ |
|
66 | 69 | .. _mercurial: http://mercurial.selenic.com/ |
|
67 | 70 | .. _celery: http://celeryproject.org/ |
|
68 | 71 | .. _rabbitmq: http://www.rabbitmq.com/ |
|
69 | 72 | .. _rabbitmq installation: http://docs.celeryproject.org/en/latest/getting-started/brokers/rabbitmq.html |
|
70 | 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/ |
@@ -1,14 +1,14 b'' | |||
|
1 | 1 | .. _rhodecode-post-instal-ref: |
|
2 | 2 | |
|
3 | 3 | Post Installation Tasks |
|
4 | 4 | ======================= |
|
5 | 5 | |
|
6 | 6 | The following tasks are the most common post installation requirements. Use |
|
7 | 7 | the information in these sections to configure your instance of |RCM|. |
|
8 | 8 | |
|
9 | 9 | .. toctree:: |
|
10 | 10 | |
|
11 | 11 | setup-email |
|
12 | 12 | database-string |
|
13 |
|
|
|
13 | configure-celery | |
|
14 | 14 | migrate-repos |
General Comments 0
You need to be logged in to leave comments.
Login now