diff --git a/docs/installation.rst b/docs/installation.rst index aa1a8405c..e39cd7289 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -7,11 +7,15 @@ Requirements ------------ * Python 2.6 + * `setuptools `_ + * `Hunspell `_ (Specifically, headers for `PyHunspell `_.) + * With Hunspell, you will also need dictionaries, either from Hunspell or MySpell, to provide spelling suggestions on search queries. + * Note that Hunspell is required even if no dictionaries are installed. @@ -40,7 +44,7 @@ virtualenv `virtualenv `_ is a tool to create isolated Python environments. We're going to be installing a bunch of packages, but we don't want your system littered with all these things you only need for -zamboni. Some other piece of software might want an older version than zamboni +kitsune. Some other piece of software might want an older version than kitsune wants, which can create quite a mess. :: easy_install virtualenv diff --git a/docs/production.rst b/docs/production.rst new file mode 100644 index 000000000..2db647952 --- /dev/null +++ b/docs/production.rst @@ -0,0 +1,95 @@ +================================ +Extra Information for Production +================================ + +There are a few small steps we need to take for production: + + +Environment +----------- + +Requirements +^^^^^^^^^^^^ + +The full list of requirements is: + +* Python 2.6 + +* `setuptools `_ + +* `Hunspell `_ (Specifically, headers for + `PyHunspell `_.) + + * With Hunspell, you will also need dictionaries, either from Hunspell or + MySpell, to provide spelling suggestions on search queries. + + * Note that Hunspell is required even if no dictionaries are installed. + +* MySQL headers (for the Python-MySQL connector). + +* `virtualenv `_ + +* `mod_wsgi `_ + +* Apache HTTPD Server + +* The Python packages in the ``requirements.txt`` file. + + +Settings +^^^^^^^^ + +Settings in ``settings.py`` can be overridden in a file named +``settings_local.py`` in the same directory. ``settings_local.py`` should +start with:: + + from settings import * + +and below that line, you can override the defaults. + +The following settings may need to be set: + +``DEBUG`` and ``TEMPLATE_DEBUG`` + Set both of these to ``False`` for production environments. +``DATABASES`` + Tells Django what databases to talk to. The ``ENGINE`` should probably + be ``django.db.backends.mysql``. Set the database named ``default`` to + the master, and you can add additional databases to the ``DATABASES`` + dict to use as slaves. (See ``SLAVE_DATABASES`` below.) +``SLAVE_DATABASES`` + If you've added additional databases to the ``DATABASES`` dict above, + you should specify which ones are slaves by putting their names in + the ``SLAVE_DATABASES`` list. (Eg: + ``SLAVE_DATABASES = ['slave-1', 'slave-2']``) +``CACHE_BACKEND`` + Set to ``caching.backends.memcached://host-1:port;host-2:port``. +``CACHE_PREFIX`` + Something to differentiate from other data on the same memcache instance. + We recommend ``CACHE_PREFIX = 'sumo:'`` if anything. +``SECRET_KEY`` + Set this to something long, random, and secret. +``DICT_DIR`` + If MySpell dictionaries are not installed in ``/usr/share/myspell/``, you + can set this to their location. (The directory should include files named + ``%LOCALE%.dic`` and ``%LOCALE%.aff`` +``SPHINX_HOST`` + Point to the Sphinx host. +``SPHINX_PORT`` + Much like ``SPHINX_HOST``. +``SPHINX_INDEXER``, ``SPHINX_SEARCHD``, and ``SPHINX_CONFIG_PATH`` + These only need to be set for running tests. You can ignore them. +``JAVA_BIN`` + If the system java binary is not at ``/usr/bin/java``, you should set + this. (It's only used for running the ``compress_assets`` command. See + below.) + + +Concat and Minify +----------------- + +When running with ``DEBUG=False``, Kitsune will try to use compressed +JavaScript and CSS. To generate the compressed files, just run:: + + ./manage.py compress_assests + +and new files will be created in the /media/ directory.