deployment.rst 3.99 KB
Newer Older
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
1
2
.. _deployment:

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
3
4
5
6
Deployment
==========

Node types
7
----------
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
8
9
10

Nodes in a Synnefo deployment belong in one of the following types:

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
11
12
13

.. _DB_NODE:

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
14
15
16
17
18
19
20
DB
**
A node [or more than one nodes, if using an HA configuration], running a DB
engine supported by the Django ORM layer. The DB is the single source of
truth for the servicing of API requests by Synnefo.
Services: PostgreSQL / MySQL

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
21
22
23

.. _APISERVER_NODE:

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
24
25
26
27
28
29
30
APISERVER
*********
A node running the implementation of the OpenStack API, in Django. Any number
of APISERVERs can be used, in a load-balancing configuration, without any
special consideration. Access to a common DB ensures consistency.
Services: Web server, vncauthproxy

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
31
32
33

.. _QUEUE_NODE:

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
34
35
36
37
38
39
40
QUEUE
*****
A node running the RabbitMQ software, which provides AMQP functionality. More
than one QUEUE nodes may be deployed, in an HA configuration. Such
deployments require shared storage, provided e.g., by DRBD.
Services: RabbitMQ [rabbitmq-server]

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
41
42
43

.. _LOGIC_NODE:

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
44
45
46
47
48
49
50
LOGIC
*****
A node running the business logic of Synnefo, in Django. It dequeues
messages from QUEUE nodes, and provides the context in which business logic
functions run. It uses Django ORM to connect to the common DB and update the
state of the system, based on notifications received from the rest of the
infrastructure, over AMQP.
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
51
52
53
54
Services: the Synnefo logic dispatcher [``synnefo-dispatcher``]


.. _GANETI_NODES:
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

GANETI-MASTER and GANETI-NODE
*****************************
A single GANETI-MASTER and a large number of GANETI-NODEs constitute the
Ganeti backend for Synnefo, which undertakes all VM management functions.
Any APISERVER can issue commands to the GANETI-MASTER, over RAPI, to effect
changes in the state of the VMs. The GANETI-MASTER runs the Ganeti request
queue.

Services:
 only on GANETI-MASTER:
   the Synnefo Ganeti monitoring daemon [/ganeti/snf-ganeti-eventd]
   the Synnefo Ganeti hook [/ganeti/snf-ganeti-hook.py].
 on each GANETI_NODE:
   a deployment-specific KVM ifup script
70
   properly configured :ref:`NFDHCPD <nfdhcpd-setup>`
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
71
72


Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
73
74
75
76
.. _WEBAPP_NODE:

WEBAPP
******
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Synnefo WEBAPP node is the server that runs the web application bundled within
the synnefo package. The application provides 2 different interfaces.


Web admin
`````````
Synnefo web administration interface. Allows administrator users to manage the
synnefo application via web interface.

Web application
```````````````
Web interface which allows users to create/configure/manage their virtual
machines.

.. _dispatcher-deploy:

Dispatcher
----------

The logic dispatcher is part of the Synnefo Django project and must run
on :ref:`LOGIC <LOGIC_NODE>` nodes.

The dispatcher retrieves messages from the queue and calls the appropriate
handler function as defined in the queue configuration in `/etc/synnefo/*.conf`
files.

The default configuration should work directly without any modifications.

For the time being The dispatcher must be run by hand::

  $ synnefo-dispatcher

The dispatcher should run in at least 2 instances to ensure high
(actually, increased) availability.
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
111

112
113

.. _webapp-deploy:
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
114
115
116

Web application deployment
--------------------------
117

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
118
119
120
121
122
123
124
125
126
127

.. _static-files:

Static files
************

* Choose an appropriate path (e.g. /var/lib/synnefo/static/) from which your web 
  server will serve all static files (js/css) required by Synnefo web frontend to 
  run.
* Change ``MEDIA_ROOT`` value in your settings to point to that directory.
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
128
129
* Run the following command::

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
130
131
    $ synnefo-manage link_static

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
132
133
134
  the command will create symlinks of the appropriate static files inside the choosen 
  directory.

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
135

136
137
138
139
140
141
142
143
Using Apache
************

.. todo:: document apache configuration

Using nginx
***********

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
144
145
146
**Sample nginx configuration using fcgi**

.. literalinclude:: ../_static/synnefo.nginx.conf
147

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
148
`download <../_static/synnefo.nginx.conf>`_
149

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
150
run the fcgi server::
151

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
152
    $ synnefo-manage runfcgi host=127.0.0.1 port=8015
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171


Console scripts
---------------

synnefo-manage
**************

synnefo-dispatcher
******************

synnefo-admin
*************

synnefo-cloud
*************

synnefo-burnin
**************