Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-gunicorn.rst @ 73ebcd68

History | View | Annotate | Download (1.1 kB)

1
.. _i-gunicorn:
2

    
3
Synnefo
4
-------
5

    
6
:ref:`synnefo <i-synnefo>` ||
7
:ref:`ns <i-ns>` ||
8
:ref:`apt <i-apt>` ||
9
:ref:`mq <i-mq>` ||
10
:ref:`db <i-db>` ||
11
gunicorn ||
12
:ref:`apache <i-apache>` ||
13
:ref:`webproject <i-webproject>` ||
14
:ref:`astakos <i-astakos>` ||
15
:ref:`cms <i-cms>` ||
16
:ref:`pithos <i-pithos>` ||
17
:ref:`cyclades <i-cyclades>` ||
18
:ref:`kamaki <i-kamaki>` ||
19
:ref:`backends <i-backends>`
20

    
21
Gunicorn Setup
22
++++++++++++++
23

    
24
The following apply to ``astakos``, ``pithos``, ``cyclades`` and ``cms`` nodes.
25

    
26
.. code-block:: console
27

    
28
  # apt-get install -t squeeze-backports gunicorn
29

    
30
In `/etc/gunicorn.d/synnefo` add:
31

    
32
.. code-block:: console
33

    
34
   CONFIG = {
35
    'mode': 'django',
36
    'environment': {
37
      'DJANGO_SETTINGS_MODULE': 'synnefo.settings',
38
    },
39
    'working_dir': '/etc/synnefo',
40
    'user': 'www-data',
41
    'group': 'www-data',
42
    'args': (
43
      '--bind=127.0.0.1:8080',
44
      '--workers=4',
45
      '--worker-class=gevent',
46
      '--log-level=debug',
47
    ),
48
   }
49

    
50
Setting ``gevent`` for worker-class, requires webproject to support
51
pooling and greenlets.
52

    
53
Test your Setup:
54
++++++++++++++++