Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-gunicorn.rst @ 84809111

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:`qh <i-qh>` ||
16
:ref:`cms <i-cms>` ||
17
:ref:`pithos <i-pithos>` ||
18
:ref:`cyclades <i-cyclades>` ||
19
:ref:`kamaki <i-kamaki>` ||
20
:ref:`backends <i-backends>`
21

    
22
Gunicorn Setup
23
++++++++++++++
24

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

    
27
.. code-block:: console
28

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

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

    
33
.. code-block:: console
34

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

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

    
54
Test your Setup:
55
++++++++++++++++