Browse Source

Reorgnizes the broker configuration guide

Ask Solem 13 years ago
parent
commit
7de8b2893c

+ 1 - 1
docs/configuration.rst

@@ -514,7 +514,7 @@ CELERY_DEFAULT_DELIVERY_MODE
 Can be `transient` or `persistent`.  The default is to send
 Can be `transient` or `persistent`.  The default is to send
 persistent messages.
 persistent messages.
 
 
-.. _conf-broker-connection:
+.. _conf-broker-settings:
 
 
 Broker Settings
 Broker Settings
 ---------------
 ---------------

+ 57 - 0
docs/getting-started/brokers/beanstalk.rst

@@ -0,0 +1,57 @@
+.. _broker-beanstalk:
+
+=================
+ Using Beanstalk
+=================
+
+.. _broker-beanstalk-installation:
+
+Installation
+============
+
+For the Beanstalk support you have to install additional dependencies.
+You can install both Celery and these dependencies in one go using
+either the `celery-with-beanstalk`_, or the `django-celery-with-beanstalk`
+bundles::
+
+    $ pip install -U celery-with-beanstalk
+
+.. _`celery-with-beanstalk`:
+    http://pypi.python.org/pypi/celery-with-beanstalk
+.. _`django-celery-with-beanstalk`:
+    http://pypi.python.org/pypi/django-celery-with-beanstalk
+
+.. _broker-beanstalk-configuration:
+
+Configuration
+=============
+
+Configuration is easy, set the transport, and configure the location of
+your CouchDB database::
+
+    BROKER_URL = "beanstalk://localhost:11300"
+
+Where the URL is in the format of::
+
+    beanstalk://hostname:port
+
+The host name will default to ``localhost`` and the port to 11300,
+and so they are optional.
+
+.. _beanstalk-results-configuration:
+
+Results
+-------
+
+Using Beanstalk to store task state and results is currently **not supported**.
+
+.. _broker-beanstalk-limitations:
+
+Limitations
+===========
+
+The Beanstalk message transport does not currently support:
+
+    * Remote control commands (celeryctl, broadcast)
+    * Authentication
+

+ 55 - 0
docs/getting-started/brokers/couchdb.rst

@@ -0,0 +1,55 @@
+.. _broker-couchdb:
+
+===============
+ Using CouchDB
+===============
+
+.. _broker-couchdb-installation:
+
+Installation
+============
+
+For the CouchDB support you have to install additional dependencies.
+You can install both Celery and these dependencies in one go using
+either the `celery-with-couchdb`_, or the `django-celery-with-couchdb` bundles::
+
+    $ pip install -U celery-with-couchdb
+
+.. _`celery-with-couchdb`:
+    http://pypi.python.org/pypi/celery-with-couchdb
+.. _`django-celery-with-couchdb`:
+    http://pypi.python.org/pypi/django-celery-with-couchdb
+
+.. _broker-couchdb-configuration:
+
+Configuration
+=============
+
+Configuration is easy, set the transport, and configure the location of
+your CouchDB database::
+
+    BROKER_URL = "couchdb://localhost:5984/database_name"
+
+Where the URL is in the format of::
+
+    couchdb://userid:password@hostname:port/database_name
+
+The host name will default to ``localhost`` and the port to 5984,
+and so they are optional.  userid and password are also optional,
+but needed if your CouchDB server requires authentication.
+
+.. _couchdb-results-configuration:
+
+Results
+-------
+
+Storing task state and results in CouchDB is currently **not supported**.
+
+.. _broker-couchdb-limitations:
+
+Limitations
+===========
+
+The Beanstalk message transport does not currently support:
+
+    * Remote control commands (celeryctl, broadcast)

+ 12 - 0
docs/getting-started/broker-installation/django.rst → docs/getting-started/brokers/django.rst

@@ -44,3 +44,15 @@ configuration values.
 #. Sync your database schema::
 #. Sync your database schema::
 
 
     $ python manage.py syncdb
     $ python manage.py syncdb
+
+.. _broker-django-limitations:
+
+Limitations
+===========
+
+The Django database transport does not currently support:
+
+    * Remote control commands (celeryev, broadcast)
+    * Events, including the Django Admin monitor.
+    * Using more than a few workers (can lead to messages being executed
+      multiple times).

+ 6 - 1
docs/getting-started/broker-installation/index.rst → docs/getting-started/brokers/index.rst

@@ -1,7 +1,7 @@
 .. _broker-installation:
 .. _broker-installation:
 
 
 =====================
 =====================
- Broker Installation
+ Brokers
 =====================
 =====================
 
 
 :Release: |version|
 :Release: |version|
@@ -14,3 +14,8 @@ Celery supports several message transport alternatives.
 
 
     rabbitmq
     rabbitmq
     redis
     redis
+    sqlalchemy
+    django
+    mongodb
+    couchdb
+    beanstalk

+ 56 - 0
docs/getting-started/brokers/mongodb.rst

@@ -0,0 +1,56 @@
+.. _broker-mongodb:
+
+===============
+ Using MongoDB
+===============
+
+.. _broker-mongodb-installation:
+
+Installation
+============
+
+For the MongoDB support you have to install additional dependencies.
+You can install both Celery and these dependencies in one go using
+either the `celery-with-mongodb`_, or the `django-celery-with-mongodb` bundles::
+
+    $ pip install -U celery-with-mongodb
+
+.. _`celery-with-mongodb`:
+    http://pypi.python.org/pypi/celery-with-mongodb
+.. _`django-celery-with-mongodb`:
+    http://pypi.python.org/pypi/django-celery-with-mongodb
+
+.. _broker-mongodb-configuration:
+
+Configuration
+=============
+
+Configuration is easy, set the transport, and configure the location of
+your MongoDB database::
+
+    BROKER_URL = "mongodb://localhost:27017/database_name"
+
+Where the URL is in the format of::
+
+    mongodb://userid:password@hostname:port/database_name
+
+The host name will default to ``localhost`` and the port to 27017,
+and so they are optional.  userid and password are also optional,
+but needed if your MongoDB server requires authentication.
+
+.. _mongodb-results-configuration:
+
+Results
+-------
+
+If you also want to store the state and return values of tasks in MongoDB,
+you should see :ref:`conf-mongodb-result-backend`.
+
+.. _broker-mongodb-limitations:
+
+Limitations
+===========
+
+The mongodb message transport currently does not support:
+
+    * Remote control commands (celeryctl, broadcast)

+ 19 - 7
docs/getting-started/broker-installation/rabbitmq.rst → docs/getting-started/brokers/rabbitmq.rst

@@ -7,10 +7,23 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+Installation & Configuration
+============================
+
+RabbitMQ is the default broker so it does not require any additional
+dependencies or initial configuration, other than the URL location of
+the broker instance you want to use::
+
+    >>> BROKER_URL = "amqp://guest:guest@localhost:5672//"
+
+For a description of broker URLs and a full list of the
+various broker configuration options available to Celery,
+see :ref:`conf-broker-settings`.
+
 .. _installing-rabbitmq:
 .. _installing-rabbitmq:
 
 
-Installing RabbitMQ
-===================
+Installing the RabbitMQ Server
+==============================
 
 
 See `Installing RabbitMQ`_ over at RabbitMQ's website. For Mac OS X
 See `Installing RabbitMQ`_ over at RabbitMQ's website. For Mac OS X
 see `Installing RabbitMQ on OS X`_.
 see `Installing RabbitMQ on OS X`_.
@@ -28,7 +41,7 @@ see `Installing RabbitMQ on OS X`_.
 .. _rabbitmq-configuration:
 .. _rabbitmq-configuration:
 
 
 Setting up RabbitMQ
 Setting up RabbitMQ
-===================
+-------------------
 
 
 To use celery we need to create a RabbitMQ user, a virtual host and
 To use celery we need to create a RabbitMQ user, a virtual host and
 allow that user access to that virtual host::
 allow that user access to that virtual host::
@@ -48,7 +61,7 @@ See the RabbitMQ `Admin Guide`_ for more information about `access control`_.
 .. _rabbitmq-osx-installation:
 .. _rabbitmq-osx-installation:
 
 
 Installing RabbitMQ on OS X
 Installing RabbitMQ on OS X
-===========================
+---------------------------
 
 
 The easiest way to install RabbitMQ on Snow Leopard is using `Homebrew`_; the new
 The easiest way to install RabbitMQ on Snow Leopard is using `Homebrew`_; the new
 and shiny package management system for OS X.
 and shiny package management system for OS X.
@@ -89,7 +102,7 @@ Finally, we can install rabbitmq using :program:`brew`::
 .. _rabbitmq-osx-system-hostname:
 .. _rabbitmq-osx-system-hostname:
 
 
 Configuring the system host name
 Configuring the system host name
---------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 If you're using a DHCP server that is giving you a random host name, you need
 If you're using a DHCP server that is giving you a random host name, you need
 to permanently configure the host name. This is because RabbitMQ uses the host name
 to permanently configure the host name. This is because RabbitMQ uses the host name
@@ -126,7 +139,7 @@ then RabbitMQ will try to use `rabbit@23`, which is an illegal host name.
 .. _rabbitmq-osx-start-stop:
 .. _rabbitmq-osx-start-stop:
 
 
 Starting/Stopping the RabbitMQ server
 Starting/Stopping the RabbitMQ server
--------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 To start the server::
 To start the server::
 
 
@@ -143,4 +156,3 @@ Never use :program:`kill` to stop the RabbitMQ server, but rather use the
     $ sudo rabbitmqctl stop
     $ sudo rabbitmqctl stop
 
 
 When the server is running, you can continue reading `Setting up RabbitMQ`_.
 When the server is running, you can continue reading `Setting up RabbitMQ`_.
-

+ 2 - 5
docs/getting-started/broker-installation/redis.rst → docs/getting-started/brokers/redis.rst

@@ -40,7 +40,8 @@ Where the URL is in the format of::
 Results
 Results
 -------
 -------
 
 
-You probably also want to store results in Redis::
+If you also want to store the state and return values of tasks in Redis,
+you should configure these settings::
 
 
     CELERY_RESULT_BACKEND = "redis"
     CELERY_RESULT_BACKEND = "redis"
     CELERY_REDIS_HOST = "localhost"
     CELERY_REDIS_HOST = "localhost"
@@ -49,7 +50,3 @@ You probably also want to store results in Redis::
 
 
 For a complete list of options supported by the Redis result backend see
 For a complete list of options supported by the Redis result backend see
 :ref:`conf-redis-result-backend`
 :ref:`conf-redis-result-backend`
-
-If you don't intend to consume results you should disable them::
-
-    CELERY_IGNORE_RESULT = True

+ 10 - 2
docs/getting-started/broker-installation/sqlalchemy.rst → docs/getting-started/brokers/sqlalchemy.rst

@@ -61,6 +61,14 @@ Results
 To store results in the database as well, you should configure the result
 To store results in the database as well, you should configure the result
 backend.  See :ref:`conf-database-result-backend`.
 backend.  See :ref:`conf-database-result-backend`.
 
 
-If you don't intend to consume results you should disable them::
+.. _broker-sqlalchemy-limitations:
 
 
-    CELERY_IGNORE_RESULT = True
+Limitations
+===========
+
+The SQLAlchemy database transport does not currently support:
+
+    * Remote control commands (celeryev, broadcast)
+    * Events, including the Django Admin monitor.
+    * Using more than a few workers (can lead to messages being executed
+      multiple times).

+ 1 - 1
docs/getting-started/index.rst

@@ -9,6 +9,6 @@
     :maxdepth: 2
     :maxdepth: 2
 
 
     introduction
     introduction
-    broker-installation/index
+    brokers/index
     first-steps-with-celery
     first-steps-with-celery
     resources
     resources

+ 36 - 2
docs/includes/introduction.txt

@@ -210,11 +210,45 @@ or from source.
 
 
 To install using `pip`,::
 To install using `pip`,::
 
 
-    $ pip install Celery
+    $ pip install -U Celery
 
 
 To install using `easy_install`,::
 To install using `easy_install`,::
 
 
-    $ easy_install Celery
+    $ easy_install -U Celery
+
+Bundles
+-------
+
+Celery also defines a group of bundles that can be used
+to install Celery and the dependencies for a given feature.
+
+The following bundles are available:
+
+:`celery-with-redis`_:
+    for using Redis as a broker.
+
+:`celery-with-mongodb`_:
+    for using MongoDB as a broker.
+
+:`django-celery-with-redis`_:
+    for Django, and using Redis as a broker.
+
+:`django-celery-with-mongodb`_:
+    for Django, and using MongoDB as a broker.
+
+:`bundle-celery`_:
+    convenience bundle installing *Celery* and related packages.
+
+.. _`celery-with-redis`:
+    http://pypi.python.org/pypi/celery-with-redis/
+.. _`celery-with-mongodb`:
+    http://pypi.python.org/pypi/celery-with-mongdb/
+.. _`django-celery-with-redis`:
+    http://pypi.python.org/pypi/django-celery-with-redis/
+.. _`django-celery-with-mongodb`:
+    http://pypi.python.org/pypi/django-celery-with-mongdb/
+.. _`bundle-celery`:
+    http://pypi.python.org/pypi/bundle-celery/
 
 
 .. _celery-installing-from-source:
 .. _celery-installing-from-source: