root / README.deploy @ 5509b599
History | View | Annotate | Download (5.9 kB)
1 | bbd4f788 | Georgios Gousios | DEPLOYMENT notes |
---|---|---|---|
2 | bbd4f788 | Georgios Gousios | ================= |
3 | bbd4f788 | Georgios Gousios | |
4 | a06deab3 | Vangelis Koukis | This document describes the services that comprise the Synnefo software |
5 | a06deab3 | Vangelis Koukis | infrastructure and the dependencies among them. This document applies |
6 | a06deab3 | Vangelis Koukis | to Synnefo v0.3. |
7 | a06deab3 | Vangelis Koukis | |
8 | a06deab3 | Vangelis Koukis | |
9 | a06deab3 | Vangelis Koukis | - Node types |
10 | a06deab3 | Vangelis Koukis | |
11 | a06deab3 | Vangelis Koukis | Nodes in a Synnefo deployment belong in one of the following types: |
12 | a06deab3 | Vangelis Koukis | |
13 | a06deab3 | Vangelis Koukis | * DB: |
14 | a06deab3 | Vangelis Koukis | A node [or more than one nodes, if using an HA configuration], |
15 | a06deab3 | Vangelis Koukis | running a DB engine supported by the Django ORM layer. The DB |
16 | a06deab3 | Vangelis Koukis | is the single source of truth for the servicing of API requests by |
17 | a06deab3 | Vangelis Koukis | Synnefo. |
18 | a06deab3 | Vangelis Koukis | Services: PostgreSQL / MySQL |
19 | a06deab3 | Vangelis Koukis | |
20 | a06deab3 | Vangelis Koukis | * WEBSERVER: |
21 | a06deab3 | Vangelis Koukis | A node running the implementation of the OpenStack API, in Django. |
22 | a06deab3 | Vangelis Koukis | Any number of WEBSERVERs can be used, in a load-balancing configuration, |
23 | a06deab3 | Vangelis Koukis | without any special consideration. Access to a common DB ensures |
24 | a06deab3 | Vangelis Koukis | consistency. |
25 | a06deab3 | Vangelis Koukis | Services: Web server, vncauthproxy |
26 | a06deab3 | Vangelis Koukis | |
27 | a06deab3 | Vangelis Koukis | * QUEUE: |
28 | a06deab3 | Vangelis Koukis | A node running the RabbitMQ software, which provides AMQP functionality. |
29 | a06deab3 | Vangelis Koukis | More than one QUEUE nodes may be deployed, in an HA configuration. Such |
30 | a06deab3 | Vangelis Koukis | deployments require shared storage, provided e.g., by DRBD. |
31 | a06deab3 | Vangelis Koukis | Services: RabbitMQ [rabbitmq-server] |
32 | a06deab3 | Vangelis Koukis | |
33 | a06deab3 | Vangelis Koukis | * LOGIC: |
34 | a06deab3 | Vangelis Koukis | A node running the business logic of Synnefo, in Django. It dequeues |
35 | a06deab3 | Vangelis Koukis | messages from QUEUE nodes, and provides the context in which business |
36 | a06deab3 | Vangelis Koukis | logic functions run. It uses Django ORM to connect to the common DB and |
37 | a06deab3 | Vangelis Koukis | update the state of the system, based on notifications received from the |
38 | a06deab3 | Vangelis Koukis | rest of the infrastructure, over AMQP. |
39 | a06deab3 | Vangelis Koukis | Services: the Synnefo logic dispatcher [/logic/dispatcher.py] |
40 | a06deab3 | Vangelis Koukis | |
41 | a06deab3 | Vangelis Koukis | * GANETI-MASTER and GANETI-NODE: |
42 | a06deab3 | Vangelis Koukis | A single GANETI-MASTER and a large number of GANETI-NODEs constitute the |
43 | a06deab3 | Vangelis Koukis | Ganeti backend for Synnefo, which undertakes all VM management functions. |
44 | a06deab3 | Vangelis Koukis | Any WEBSERVER can issue commands to the GANETI-MASTER, over RAPI, to effect |
45 | a06deab3 | Vangelis Koukis | changes in the state of the VMs. The GANETI-MASTER runs the Ganeti request |
46 | a06deab3 | Vangelis Koukis | queue. |
47 | a06deab3 | Vangelis Koukis | Services: only on GANETI-MASTER: |
48 | a06deab3 | Vangelis Koukis | the Synnefo Ganeti monitoring daemon [/ganeti/ganeti-eventd], |
49 | a06deab3 | Vangelis Koukis | and the Synnefo Ganeti hook [/ganeti/snf-ganeti-hook.py]. |
50 | a06deab3 | Vangelis Koukis | |
51 | a06deab3 | Vangelis Koukis | As of v0.3, the Synnefo Django project needs to be installed on nodes |
52 | a06deab3 | Vangelis Koukis | of type WEBSERVER, LOGIC and on the GANETI-MASTER, with a properly configured |
53 | a06deab3 | Vangelis Koukis | settings.py. In later revisions, the specific parts of the Django project |
54 | a06deab3 | Vangelis Koukis | which need to run on each node type will be identified. |
55 | a06deab3 | Vangelis Koukis | |
56 | a06deab3 | Vangelis Koukis | The settings.py file for Django is derived by concatenating the |
57 | a06deab3 | Vangelis Koukis | settings.py.dist file contained in the Synnefo distribution with a file |
58 | a06deab3 | Vangelis Koukis | containing custom modifications. This is recommended to minimize the load |
59 | a06deab3 | Vangelis Koukis | of reconstructing settings.py from scratch, since each release currently |
60 | a06deab3 | Vangelis Koukis | brings heavy changes to settings.py.dist. |
61 | a06deab3 | Vangelis Koukis | |
62 | a06deab3 | Vangelis Koukis | |
63 | 7e8b41e7 | Vangelis Koukis | - Service dependencies |
64 | 7e8b41e7 | Vangelis Koukis | |
65 | a06deab3 | Vangelis Koukis | This section describes each of the required service dependencies. |
66 | a06deab3 | Vangelis Koukis | |
67 | 6ec8927b | Vangelis Koukis | * RabbitMQ |
68 | 6ec8927b | Vangelis Koukis | |
69 | 6f339260 | Georgios Gousios | RabbitMQ is used as a generic message broker for the system. It should |
70 | 24435a56 | Georgios Gousios | be installed on two seperate machines (VMs should be enough for the |
71 | 24435a56 | Georgios Gousios | moment) in a high availability configuration as described here: |
72 | 6f339260 | Georgios Gousios | |
73 | 6f339260 | Georgios Gousios | http://www.rabbitmq.com/pacemaker.html |
74 | 6f339260 | Georgios Gousios | |
75 | 6f339260 | Georgios Gousios | After installation, create a user and set its permissions |
76 | 6f339260 | Georgios Gousios | |
77 | 6f339260 | Georgios Gousios | rabbitmqctl add_user okeanos 0k3@n0s |
78 | 6f339260 | Georgios Gousios | rabbitmqctl set_permissions -p / okeanos "^.*" ".*" ".*" |
79 | 6f339260 | Georgios Gousios | |
80 | 6ec8927b | Vangelis Koukis | The values set for the user and password must be mirrored in the |
81 | 6ec8927b | Vangelis Koukis | RABBIT_* variables in settings.py |
82 | 6f339260 | Georgios Gousios | |
83 | 6ec8927b | Vangelis Koukis | * /ganeti/ganeti-eventd: the Ganeti monitoring daemon |
84 | 7e8b41e7 | Vangelis Koukis | |
85 | a06deab3 | Vangelis Koukis | The Ganeti monitoring daemon must run on GANETI-MASTER. |
86 | 7e8b41e7 | Vangelis Koukis | |
87 | a06deab3 | Vangelis Koukis | Override all relevant settings in settings.py.dist, GANETI_* variables. |
88 | 6f339260 | Georgios Gousios | Then start the server on the Ganeti master as root |
89 | 7e8b41e7 | Vangelis Koukis | |
90 | 6f339260 | Georgios Gousios | # cd synnefo && python ./ganeti/ganeti-eventd |
91 | 7e8b41e7 | Vangelis Koukis | |
92 | 7e8b41e7 | Vangelis Koukis | FIXME: The server must be started from the project root directory. |
93 | 7e8b41e7 | Vangelis Koukis | TBD: how to handle master migration. |
94 | 7e8b41e7 | Vangelis Koukis | |
95 | 6ec8927b | Vangelis Koukis | * /logic/dispatcher.py: the dispatcher |
96 | 7e8b41e7 | Vangelis Koukis | |
97 | 24435a56 | Georgios Gousios | The dispatcher retrieves messages from the queue and calls the |
98 | 24435a56 | Georgios Gousios | appropriate handler function as defined in the queue configuration in |
99 | 24435a56 | Georgios Gousios | setttings.py. The default configuration should work directly without |
100 | 24435a56 | Georgios Gousios | any modifications. |
101 | 6f339260 | Georgios Gousios | |
102 | 24435a56 | Georgios Gousios | The dispatcher must be run by hand: |
103 | 24435a56 | Georgios Gousios | $ ./bin/python ./logic/dispatcher.py |
104 | 7e8b41e7 | Vangelis Koukis | |
105 | 24435a56 | Georgios Gousios | The dispatcher should run in at least 2 instances to ensure high |
106 | 24435a56 | Georgios Gousios | (actually, increased) availability. |
107 | 7e8b41e7 | Vangelis Koukis | |
108 | 6ec8927b | Vangelis Koukis | * /ganeti/snf-ganeti-hook.py: Ganeti hook for synnefo |
109 | 6ec8927b | Vangelis Koukis | |
110 | 6ec8927b | Vangelis Koukis | The script ganeti/snf-ganeti-hook.py is the generic launcher for Synnefo |
111 | 6ec8927b | Vangelis Koukis | hooks in Ganeti. It resides in the ganeti/ directory of the Synnefo |
112 | 6ec8927b | Vangelis Koukis | project root. |
113 | 6ec8927b | Vangelis Koukis | |
114 | a06deab3 | Vangelis Koukis | The hook needs to be enabled for the post-start phase, by *symlinking* |
115 | a06deab3 | Vangelis Koukis | in /etc/ganeti/hooks/instance-start-post.d on GANETI-MASTER: |
116 | 6ec8927b | Vangelis Koukis | |
117 | a06deab3 | Vangelis Koukis | root@ganeti-master:/etc/ganeti/hooks/instance-start-post.d# ls -l |
118 | ff55193e | Vangelis Koukis | lrwxrwxrwx 1 root root 45 May 3 13:45 00-snf-ganeti-hook -> /home/devel/synnefo/ganeti/snf-ganeti-hook.py* |
119 | ff55193e | Vangelis Koukis | |
120 | a06deab3 | Vangelis Koukis | IMPORTANT: The link name may only contain "upper and lower case, digits, |
121 | a06deab3 | Vangelis Koukis | underscores and hyphens. In other words, the regexp ^[a-zA-Z0-9_-]+$." |
122 | ff55193e | Vangelis Koukis | See http://docs.ganeti.org/ganeti/master/html/hooks.html?highlight=hooks#naming. |
123 | 6ec8927b | Vangelis Koukis | |
124 | 6ec8927b | Vangelis Koukis | The script uses the location of the link target to determine the Synnefo |
125 | a06deab3 | Vangelis Koukis | Project root, before passing control to the relevant Python code. |
126 | 6ec8927b | Vangelis Koukis | |
127 | 6ec8927b | Vangelis Koukis | FIXME: Perhaps require a SYNNEFO_PROJECT_ROOT environment variable? |
128 | 6ec8927b | Vangelis Koukis | |
129 | 7e8b41e7 | Vangelis Koukis | * vncauthproxy |
130 | 7e8b41e7 | Vangelis Koukis | |
131 | 7e8b41e7 | Vangelis Koukis | To support OOB console access to the VMs over VNC, the vncauthproxy |
132 | a06deab3 | Vangelis Koukis | daemon must be running on every node of type WEBSERVER. |
133 | 7e8b41e7 | Vangelis Koukis | |
134 | 7e8b41e7 | Vangelis Koukis | Download and install vncauthproxy from its own repository, |
135 | a06deab3 | Vangelis Koukis | at https://code.grnet.gr/git/vncauthproxy |
136 | a06deab3 | Vangelis Koukis | (known good commit [FIXME for v0.3]: 48b1400e). |
137 | 7e8b41e7 | Vangelis Koukis | |
138 | 7e8b41e7 | Vangelis Koukis | Edit default settings on top of vncauthproxy.py. |
139 | b6382dc5 | Vangelis Koukis | Set CTRL_SOCKET in util/vapclient.py to point to its control socket. |
140 | b6382dc5 | Vangelis Koukis | |
141 | b6382dc5 | Vangelis Koukis | FIXME: The CTRL_SOCKET setting will be moved to settings.py as |
142 | b6382dc5 | Vangelis Koukis | VNCAUTHPROXY_CTRL_SOCKET. |
143 | 7e8b41e7 | Vangelis Koukis | |
144 | a06deab3 | Vangelis Koukis | |
145 | 7e8b41e7 | Vangelis Koukis | - OS Specific instructions |
146 | 7e8b41e7 | Vangelis Koukis | |
147 | 7e8b41e7 | Vangelis Koukis | * Debian Squeeze |
148 | 7e8b41e7 | Vangelis Koukis | |
149 | 7e8b41e7 | Vangelis Koukis | TBD. |