Revision 576e059b

b/docs/quick-install-admin-guide.rst
101 101
 * postgresql (database)
102 102
 * rabbitmq (message queue)
103 103
 * ntp (NTP daemon)
104
 * gevent
104 105

  
105 106
You can install apache2, progresql and ntp by running:
106 107

  
......
115 116

  
116 117
   # apt-get -t squeeze-backports install gunicorn
117 118

  
119
Also, make sure to install gevent >= 0.13.6. Again from the debian backports:
120

  
121
.. code-block:: console
122

  
123
   # apt-get -t squeeze-backports install python-gevent
124

  
118 125
On node1, we will create our databases, so you will also need the
119 126
python-psycopg2 package:
120 127

  
......
209 216
    'group': 'www-data',
210 217
    'args': (
211 218
      '--bind=127.0.0.1:8080',
219
      '--worker-class=gevent',
212 220
      '--workers=8',
213 221
      '--log-level=debug',
214 222
    ),
......
338 346
 * gunicorn (WSGI http server)
339 347
 * postgresql (database)
340 348
 * ntp (NTP daemon)
349
 * gevent
341 350

  
342 351
You can install the above by running:
343 352

  
......
352 361

  
353 362
   # apt-get -t squeeze-backports install gunicorn
354 363

  
364
Also, make sure to install gevent >= 0.13.6. Again from the debian backports:
365

  
366
.. code-block:: console
367

  
368
   # apt-get -t squeeze-backports install python-gevent
369

  
355 370
Node2 will connect to the databases on node1, so you will also need the
356 371
python-psycopg2 package:
357 372

  
......
386 401
    'group': 'www-data',
387 402
    'args': (
388 403
      '--bind=127.0.0.1:8080',
404
      '--worker-class=gevent',
389 405
      '--workers=4',
390 406
      '--log-level=debug',
391 407
      '--timeout=43200'
......
629 645
   from synnefo.lib.db.pooled_psycopg2 import monkey_patch_psycopg2
630 646
   monkey_patch_psycopg2()
631 647

  
632
If running with greenlets, we should modify psycopg2 behavior, so it works
633
properly in a greenlet context:
648
Since we are running with greenlets, we should modify psycopg2 behavior, so it
649
works properly in a greenlet context:
634 650

  
635 651
.. code-block:: console
636 652

  
......
899 915
doesn't use a Django DB. It pools HTTP connections to Astakos and pithos
900 916
backend objects for access to the Pithos DB.
901 917

  
902
However, as in Astakos, if running with Greenlets, it is also recommended to
903
modify psycopg2 behavior so it works properly in a greenlet context. This means
904
adding the following lines at the top of your
918
However, as in Astakos, since we are running with Greenlets, it is also
919
recommended to modify psycopg2 behavior so it works properly in a greenlet
920
context. This means adding the following lines at the top of your
905 921
``/etc/synnefo/10-snf-webproject-database.conf`` file:
906 922

  
907 923
.. code-block:: console
......
909 925
   from synnefo.lib.db.psyco_gevent import make_psycopg_green
910 926
   make_psycopg_green()
911 927

  
912
Furthermore, add the ``--worker-class=gevent`` argument on your
913
``/etc/gunicorn.d/synnefo`` configuration file. The file should look something like
914
this:
915

  
916
.. code-block:: console
917

  
918
   CONFIG = {
919
    'mode': 'django',
920
    'environment': {
921
      'DJANGO_SETTINGS_MODULE': 'synnefo.settings',
922
    },
923
    'working_dir': '/etc/synnefo',
924
    'user': 'www-data',
925
    'group': 'www-data',
926
    'args': (
927
      '--bind=127.0.0.1:8080',
928
      '--workers=4',
929
      '--worker-class=gevent',
930
      '--log-level=debug',
931
      '--timeout=43200'
932
    ),
933
   }
934

  
935 928
Servers Initialization
936 929
----------------------
937 930

  
......
1013 1006
:ref:`GANETI-NODE <GANETI_NODES>` and is Master-capable and VM-capable too.
1014 1007

  
1015 1008
We highly recommend that you read the official Ganeti documentation, if you are
1016
not familiar with Ganeti. If you are extremely impatient, you can result with
1017
the above assumed setup by running on both nodes:
1018

  
1019
.. code-block:: console
1020

  
1021
   # apt-get install -t squeeze-backports ganeti2 ganeti-htools
1022
   # modprobe drbd minor_count=255 usermode_helper=/bin/true
1023

  
1024
Unfortunatelly, stock Ganeti doesn't support IP pool management yet (we are
1025
working hard to merge it upstream for Ganeti 2.7). Synnefo depends on the IP
1026
pool functionality of Ganeti, so you have to use GRNET's patches for now. To
1027
do so you have to build your own package from source. Please clone our local
1028
repo:
1029

  
1030
.. code-block:: console
1031

  
1032
   # git clone https://code.grnet.gr/git/ganeti-local
1033
   # cd ganeti-local
1034
   # git checkout stable-2.6-ippool-hotplug-esi
1035
   # git checkout debian-2.6
1036

  
1037
Then please check if you can complile ganeti:
1009
not familiar with Ganeti.
1038 1010

  
1039
.. code-block:: console
1040

  
1041
   # cd ganeti-local
1042
   # ./automake.sh
1043
   # ./configure
1044
   # make
1045

  
1046
To do so you must have a correct build environment. Please refer to INSTALL
1047
file in the source tree. Most of the packages needed are refered here:
1048

  
1049
.. code-block:: console
1050

  
1051
   #  apt-get install graphviz automake lvm2 ssh bridge-utils iproute iputils-arping \
1052
                      ndisc6 python python-pyopenssl openssl \
1053
                      python-pyparsing python-simplejson \
1054
                      python-pyinotify python-pycurl socat \
1055
                      python-elementtree kvm qemu-kvm \
1056
                      ghc6 libghc6-json-dev libghc6-network-dev \
1057
                      libghc6-parallel-dev libghc6-curl-dev \
1058
                      libghc-quickcheck2-dev hscolour hlint
1059
                      python-support python-paramiko \
1060
                      python-fdsend python-ipaddr python-bitarray libjs-jquery fping pandoc
1061

  
1062
Now lets try to build the package:
1011
Unfortunatelly, the current stable version of the stock Ganeti (v2.6.2) doesn't
1012
support IP pool management. This feature will be available in Ganeti >= 2.7.
1013
Synnefo depends on the IP pool functionality of Ganeti, so you have to use
1014
GRNET provided packages until stable 2.7 is out. To do so:
1063 1015

  
1064 1016
.. code-block:: console
1065 1017

  
1066
   # apt-get install git-buildpackage
1067
   # mkdir ../build-area
1068
   # git-buildpackage --git-upstream-branch=stable-2.6-ippool-hotplug-esi \
1069
                   --git-debian-branch=debian-2.6 \
1070
                   --git-export=INDEX \
1071
                   --git-ignore-new
1072

  
1073
To be able to sign the packages a key must be found in the system to comply to the
1074
name and email of the last debian/changelog entry in debian branch. Please note
1075
that signing is optional.
1076

  
1077
This will create two deb packages in build-area. You should then run in both
1078
nodes:
1018
   # apt-get install snf-ganeti ganeti-htools
1019
   # modprobe drbd minor_count=255 usermode_helper=/bin/true
1079 1020

  
1080
.. code-block:: console
1021
You should have:
1081 1022

  
1082
   # dpkg -i ../build-area/ganeti-htools.*deb
1083
   # dpkg -i ../build-area/snf-ganeti.*deb
1084
   # apt-get install -f
1023
Ganeti >= 2.6.2+ippool11+hotplug5+extstorage3+rdbfix1+kvmfix2-1
1085 1024

  
1086 1025
We assume that Ganeti will use the KVM hypervisor. After installing Ganeti on
1087 1026
both nodes, choose a domain name that resolves to a valid floating IP (let's
......
1653 1592

  
1654 1593
   # apt-get install snf-cyclades-app
1655 1594

  
1656
.. warning:: Make sure you have installed ``python-gevent`` version >= 0.13.6.
1657
    This version is available at squeeze-backports and can be installed by
1658
    running: ``apt-get install -t squeeze-backports python-gevent``
1659

  
1660 1595
If all packages install successfully, then Cyclades and Plankton are installed
1661 1596
and we proceed with their configuration.
1662 1597

  
......
1867 1802
   $ gnt-network list
1868 1803
   $ gnt-network info <network_name>
1869 1804

  
1870

  
1871 1805
Create pools for Private Networks
1872 1806
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1873 1807

  

Also available in: Unified diff