root / snf-app / docs / src / deployment.rst @ 483c9197
History | View | Annotate | Download (3.8 kB)
1 |
.. _deployment: |
---|---|
2 |
|
3 |
Deployment |
4 |
========== |
5 |
|
6 |
Node types |
7 |
---------- |
8 |
|
9 |
Nodes in a Synnefo deployment belong in one of the following types: |
10 |
|
11 |
|
12 |
.. _DB_NODE: |
13 |
|
14 |
DB |
15 |
** |
16 |
A node [or more than one nodes, if using an HA configuration], running a DB |
17 |
engine supported by the Django ORM layer. The DB is the single source of |
18 |
truth for the servicing of API requests by Synnefo. |
19 |
Services: PostgreSQL / MySQL |
20 |
|
21 |
|
22 |
.. _APISERVER_NODE: |
23 |
|
24 |
APISERVER |
25 |
********* |
26 |
A node running the implementation of the OpenStack API, in Django. Any number |
27 |
of APISERVERs can be used, in a load-balancing configuration, without any |
28 |
special consideration. Access to a common DB ensures consistency. |
29 |
Services: Web server, vncauthproxy |
30 |
|
31 |
|
32 |
.. _QUEUE_NODE: |
33 |
|
34 |
QUEUE |
35 |
***** |
36 |
A node running the RabbitMQ software, which provides AMQP functionality. More |
37 |
than one QUEUE nodes may be deployed, in an HA configuration. Such |
38 |
deployments require shared storage, provided e.g., by DRBD. |
39 |
Services: RabbitMQ [rabbitmq-server] |
40 |
|
41 |
|
42 |
.. _LOGIC_NODE: |
43 |
|
44 |
LOGIC |
45 |
***** |
46 |
A node running the business logic of Synnefo, in Django. It dequeues |
47 |
messages from QUEUE nodes, and provides the context in which business logic |
48 |
functions run. It uses Django ORM to connect to the common DB and update the |
49 |
state of the system, based on notifications received from the rest of the |
50 |
infrastructure, over AMQP. |
51 |
Services: the Synnefo logic dispatcher [``synnefo-dispatcher``] |
52 |
|
53 |
|
54 |
.. _GANETI_NODES: |
55 |
|
56 |
GANETI-MASTER and GANETI-NODE |
57 |
***************************** |
58 |
A single GANETI-MASTER and a large number of GANETI-NODEs constitute the |
59 |
Ganeti backend for Synnefo, which undertakes all VM management functions. |
60 |
Any APISERVER can issue commands to the GANETI-MASTER, over RAPI, to effect |
61 |
changes in the state of the VMs. The GANETI-MASTER runs the Ganeti request |
62 |
queue. |
63 |
|
64 |
Services: |
65 |
only on GANETI-MASTER: |
66 |
the Synnefo Ganeti monitoring daemon [/ganeti/snf-ganeti-eventd] |
67 |
the Synnefo Ganeti hook [/ganeti/snf-ganeti-hook.py]. |
68 |
on each GANETI_NODE: |
69 |
a deployment-specific KVM ifup script |
70 |
properly configured :ref:`NFDHCPD <nfdhcpd-setup>` |
71 |
|
72 |
|
73 |
.. _WEBAPP_NODE: |
74 |
|
75 |
WEBAPP |
76 |
****** |
77 |
Synnefo WEBAPP node is the server that runs the web application bundled within |
78 |
the synnefo package. The application provides 2 different interfaces. |
79 |
|
80 |
|
81 |
Web admin |
82 |
````````` |
83 |
Synnefo web administration interface. Allows administrator users to manage the |
84 |
synnefo application via web interface. |
85 |
|
86 |
Web application |
87 |
``````````````` |
88 |
Web interface which allows users to create/configure/manage their virtual |
89 |
machines. |
90 |
|
91 |
.. _dispatcher-deploy: |
92 |
|
93 |
Dispatcher |
94 |
---------- |
95 |
|
96 |
The logic dispatcher is part of the Synnefo Django project and must run |
97 |
on :ref:`LOGIC <LOGIC_NODE>` nodes. |
98 |
|
99 |
The dispatcher retrieves messages from the queue and calls the appropriate |
100 |
handler function as defined in the queue configuration in `/etc/synnefo/*.conf` |
101 |
files. |
102 |
|
103 |
The default configuration should work directly without any modifications. |
104 |
|
105 |
For the time being The dispatcher must be run by hand:: |
106 |
|
107 |
$ synnefo-dispatcher |
108 |
|
109 |
The dispatcher should run in at least 2 instances to ensure high |
110 |
(actually, increased) availability. |
111 |
|
112 |
|
113 |
.. _webapp-deploy: |
114 |
|
115 |
Web application deployment |
116 |
-------------------------- |
117 |
|
118 |
|
119 |
.. _static-files: |
120 |
|
121 |
Static files |
122 |
************ |
123 |
|
124 |
* Choose an appropriate path (e.g. /var/lib/synnefo/static/) from which your web |
125 |
server will serve all static files (js/css) required by Synnefo web frontend to |
126 |
run. |
127 |
* Change ``MEDIA_ROOT`` value in your settings to point to that directory. |
128 |
* Run the following command which will create symlinks of static files in |
129 |
that directory:: |
130 |
|
131 |
$ synnefo-manage link_static |
132 |
|
133 |
|
134 |
Using Apache |
135 |
************ |
136 |
|
137 |
.. todo:: document apache configuration |
138 |
|
139 |
Using nginx |
140 |
*********** |
141 |
|
142 |
**Sample nginx configuration using fcgi** |
143 |
|
144 |
.. literalinclude:: ../_static/synnefo.nginx.conf |
145 |
|
146 |
`download <../_static/synnefo.nginx.conf>`_ |
147 |
|
148 |
run the fcgi server:: |
149 |
|
150 |
$ synnefo-manage runfcgi host=127.0.0.1 port=8015 |