root / docs / snf-deploy.rst @ a6d167c1
History | View | Annotate | Download (13.2 kB)
1 | 77180645 | Dimitris Aragiorgis | .. _snf-deploy: |
---|---|---|---|
2 | 77180645 | Dimitris Aragiorgis | |
3 | 77180645 | Dimitris Aragiorgis | snf-deploy tool |
4 | 77180645 | Dimitris Aragiorgis | ^^^^^^^^^^^^^^^ |
5 | 77180645 | Dimitris Aragiorgis | |
6 | 21d3d487 | Constantinos Venetsanopoulos | The `snf-deploy` tool allows you to automatically deploy Synnefo. |
7 | 21d3d487 | Constantinos Venetsanopoulos | You can use `snf-deploy` to deploy Synnefo, in two ways: |
8 | 77180645 | Dimitris Aragiorgis | |
9 | 21d3d487 | Constantinos Venetsanopoulos | 1. Create a virtual cluster on your local machine and then deploy on that cluster. |
10 | 36f3d51e | Dimitris Aragiorgis | 2. Deploy on a pre-existent cluster of physical nodes running Debian Wheezy. |
11 | bb535968 | Constantinos Venetsanopoulos | |
12 | bb535968 | Constantinos Venetsanopoulos | Currently, `snf-deploy` is mostly useful for testing/demo installations and is |
13 | bb535968 | Constantinos Venetsanopoulos | not recommended for production environment Synnefo deployments. If you want to |
14 | ff6ba888 | Constantinos Venetsanopoulos | deploy Synnefo in production, please read first the :ref:`Admin's installation |
15 | ff6ba888 | Constantinos Venetsanopoulos | guide <quick-install-admin-guide>` and then the :ref:`Admin's guide |
16 | ff6ba888 | Constantinos Venetsanopoulos | <admin-guide>`. |
17 | bb535968 | Constantinos Venetsanopoulos | |
18 | bb535968 | Constantinos Venetsanopoulos | If you use `snf-deploy` you will setup an up-and-running Synnefo installation, |
19 | bb535968 | Constantinos Venetsanopoulos | but the end-to-end functionality will depend on your underlying infrastracture |
20 | bb535968 | Constantinos Venetsanopoulos | (e.g. is nested virtualization enabled in your PC, is the router properly |
21 | bb535968 | Constantinos Venetsanopoulos | configured, do nodes have fully qualified domain names, etc.). In any way, it |
22 | bb535968 | Constantinos Venetsanopoulos | will enable you to get a grasp of the Web UI/API and base funtionality of |
23 | bb535968 | Constantinos Venetsanopoulos | Synnefo and also provide a proper configuration that you can afterwards consult |
24 | bb535968 | Constantinos Venetsanopoulos | while reading the Admin guides to set up a production environment that will |
25 | bb535968 | Constantinos Venetsanopoulos | scale up and use all available features (e.g. RADOS, Archipelago, etc). |
26 | bb535968 | Constantinos Venetsanopoulos | |
27 | bb535968 | Constantinos Venetsanopoulos | `snf-deploy` is a debian package that should be installed locally and allows |
28 | 36f3d51e | Dimitris Aragiorgis | you to install Synnefo locally, or on remote nodes, or spawn a cluster of VMs |
29 | 36f3d51e | Dimitris Aragiorgis | on your local machine using KVM and then install Synnefo on this cluster. To |
30 | 36f3d51e | Dimitris Aragiorgis | this end, here we will break down our description into three sections: |
31 | bb535968 | Constantinos Venetsanopoulos | |
32 | bb535968 | Constantinos Venetsanopoulos | a. :ref:`snf-deploy configuration <conf>` |
33 | bb535968 | Constantinos Venetsanopoulos | b. :ref:`Creating a virtual cluster <vcluster>` (needed for (1)) |
34 | bb535968 | Constantinos Venetsanopoulos | c. :ref:`Synnefo deployment <inst>` (either on virtual nodes created on section b, |
35 | bb535968 | Constantinos Venetsanopoulos | or on remote physical nodes) |
36 | 77180645 | Dimitris Aragiorgis | |
37 | 21d3d487 | Constantinos Venetsanopoulos | If you go for (1) you will need to walk through all the sections. If you go for |
38 | bb535968 | Constantinos Venetsanopoulos | (2), you should skip section `(b) <vcluster>`, since you only need sections |
39 | bb535968 | Constantinos Venetsanopoulos | `(a) <conf>` and `(c) <inst>`. |
40 | 77180645 | Dimitris Aragiorgis | |
41 | 21d3d487 | Constantinos Venetsanopoulos | Before getting any further we should mention the roles that `snf-deploy` refers |
42 | bb535968 | Constantinos Venetsanopoulos | to. The Synnefo roles are described in detail :ref:`here |
43 | 36f3d51e | Dimitris Aragiorgis | <physical-node-roles>`. Those nodes consist of certain components. |
44 | 36f3d51e | Dimitris Aragiorgis | Note that multiple roles can co-exist in the same node |
45 | bb535968 | Constantinos Venetsanopoulos | (virtual or physical). |
46 | 77180645 | Dimitris Aragiorgis | |
47 | 36f3d51e | Dimitris Aragiorgis | Currently, `snf-deploy` defines the following roles: |
48 | 36f3d51e | Dimitris Aragiorgis | |
49 | 36f3d51e | Dimitris Aragiorgis | * ns: bind server (DNS) |
50 | 36f3d51e | Dimitris Aragiorgis | * db: postgresql server (database) |
51 | 36f3d51e | Dimitris Aragiorgis | * mq: rabbitmq server (message queue) |
52 | 36f3d51e | Dimitris Aragiorgis | * nfs: nfs server |
53 | 36f3d51e | Dimitris Aragiorgis | * astakos: identity service |
54 | 36f3d51e | Dimitris Aragiorgis | * pithos: storage service |
55 | 36f3d51e | Dimitris Aragiorgis | * cyclades: compute service |
56 | 36f3d51e | Dimitris Aragiorgis | * cms: cms service |
57 | 36f3d51e | Dimitris Aragiorgis | * stats: stats service |
58 | 36f3d51e | Dimitris Aragiorgis | * ganeti: ganeti node |
59 | 36f3d51e | Dimitris Aragiorgis | * master: master node |
60 | 36f3d51e | Dimitris Aragiorgis | |
61 | 36f3d51e | Dimitris Aragiorgis | |
62 | 36f3d51e | Dimitris Aragiorgis | The previous roles are combinations of the following software components: |
63 | 36f3d51e | Dimitris Aragiorgis | |
64 | 36f3d51e | Dimitris Aragiorgis | * HW: IP and internet access |
65 | 36f3d51e | Dimitris Aragiorgis | * SSH: ssh keys and config |
66 | 36f3d51e | Dimitris Aragiorgis | * DDNS: ddns keys and ddns client config |
67 | 36f3d51e | Dimitris Aragiorgis | * NS: nameserver with ddns config |
68 | 36f3d51e | Dimitris Aragiorgis | * DNS: resolver config |
69 | 36f3d51e | Dimitris Aragiorgis | * APT: apt sources config |
70 | 36f3d51e | Dimitris Aragiorgis | * DB: database server with postgresql |
71 | 36f3d51e | Dimitris Aragiorgis | * MQ: message queue server with rabbitmq |
72 | 36f3d51e | Dimitris Aragiorgis | * NFS: nfs server |
73 | 36f3d51e | Dimitris Aragiorgis | * Mount: nfs mount point |
74 | 36f3d51e | Dimitris Aragiorgis | * Apache: web server with Apache |
75 | 36f3d51e | Dimitris Aragiorgis | * Gunicorn: gunicorn server |
76 | 36f3d51e | Dimitris Aragiorgis | * Common: synnefo common |
77 | 36f3d51e | Dimitris Aragiorgis | * WEB: synnefo webclient |
78 | 36f3d51e | Dimitris Aragiorgis | * Astakos: astakos webapp |
79 | 36f3d51e | Dimitris Aragiorgis | * Pithos: pithos webapp |
80 | 36f3d51e | Dimitris Aragiorgis | * Cyclades: cyclades webapp |
81 | 36f3d51e | Dimitris Aragiorgis | * CMS: cms webapp |
82 | 36f3d51e | Dimitris Aragiorgis | * VNC: vnc authentication proxy |
83 | 36f3d51e | Dimitris Aragiorgis | * Collectd: collectd config |
84 | 36f3d51e | Dimitris Aragiorgis | * Stats: stats webapp |
85 | 36f3d51e | Dimitris Aragiorgis | * Kamaki: kamaki client |
86 | 36f3d51e | Dimitris Aragiorgis | * Burnin: qa software |
87 | 36f3d51e | Dimitris Aragiorgis | * Ganeti: ganeti node |
88 | 36f3d51e | Dimitris Aragiorgis | * Master: ganeti master node |
89 | 36f3d51e | Dimitris Aragiorgis | * Image: synnefo image os provider |
90 | 36f3d51e | Dimitris Aragiorgis | * Network: synnefo networking scripts |
91 | 36f3d51e | Dimitris Aragiorgis | * GTools: synnefo tools for ganeti |
92 | 36f3d51e | Dimitris Aragiorgis | * GanetiCollectd: collectd config for ganeti nodes |
93 | 36f3d51e | Dimitris Aragiorgis | |
94 | 36f3d51e | Dimitris Aragiorgis | Each component defines the following things: |
95 | 36f3d51e | Dimitris Aragiorgis | |
96 | 36f3d51e | Dimitris Aragiorgis | * commands to check prereqs |
97 | 36f3d51e | Dimitris Aragiorgis | * commands to prepare installation |
98 | 36f3d51e | Dimitris Aragiorgis | * list of packages to install |
99 | 36f3d51e | Dimitris Aragiorgis | * specific configuration files (templates) |
100 | 36f3d51e | Dimitris Aragiorgis | * restart/reload commands |
101 | 36f3d51e | Dimitris Aragiorgis | * initialization commands |
102 | 36f3d51e | Dimitris Aragiorgis | * test commands |
103 | 36f3d51e | Dimitris Aragiorgis | |
104 | 36f3d51e | Dimitris Aragiorgis | All a components needs is the node info that it gets installed to and the |
105 | 36f3d51e | Dimitris Aragiorgis | snf-deploy configuration environment (available after parsing conf files). |
106 | 21d3d487 | Constantinos Venetsanopoulos | |
107 | bb535968 | Constantinos Venetsanopoulos | .. _conf: |
108 | bb535968 | Constantinos Venetsanopoulos | |
109 | 21d3d487 | Constantinos Venetsanopoulos | Configuration (a) |
110 | 21d3d487 | Constantinos Venetsanopoulos | ================= |
111 | 21d3d487 | Constantinos Venetsanopoulos | |
112 | 21d3d487 | Constantinos Venetsanopoulos | All configuration of `snf-deploy` happens by editting the following files under |
113 | 21d3d487 | Constantinos Venetsanopoulos | ``/etc/snf-deploy``: |
114 | 77180645 | Dimitris Aragiorgis | |
115 | bb535968 | Constantinos Venetsanopoulos | ``nodes.conf`` |
116 | bb535968 | Constantinos Venetsanopoulos | -------------- |
117 | bb535968 | Constantinos Venetsanopoulos | |
118 | bb535968 | Constantinos Venetsanopoulos | This file reflects the hardware infrastucture on which Synnefo is going to be |
119 | bb535968 | Constantinos Venetsanopoulos | deployed and is the first to be set before running `snf-deploy`. |
120 | bb535968 | Constantinos Venetsanopoulos | |
121 | bb535968 | Constantinos Venetsanopoulos | Defines the nodes' hostnames and their IPs. Currently `snf-deploy` expects all |
122 | 36f3d51e | Dimitris Aragiorgis | nodes to reside under the same domain. Since Synnefo requires FQDNs to operate, |
123 | 36f3d51e | Dimitris Aragiorgis | a nameserver is going to be automatically setup in the cluster by `snf-deploy` |
124 | 36f3d51e | Dimitris Aragiorgis | and all nodes with use this node for resolver. |
125 | bb535968 | Constantinos Venetsanopoulos | |
126 | bb535968 | Constantinos Venetsanopoulos | Also, defines the nodes' authentication credentials (username, password). |
127 | bb535968 | Constantinos Venetsanopoulos | Furthermore, whether nodes have an extra disk (used for LVM/DRBD storage in |
128 | bb535968 | Constantinos Venetsanopoulos | Ganeti backends) or not. The VM container nodes should have three separate |
129 | bb535968 | Constantinos Venetsanopoulos | network interfaces (either physical or vlans) each in the same collision |
130 | bb535968 | Constantinos Venetsanopoulos | domain; one for the node's public network, one for VMs' public network and one |
131 | bb535968 | Constantinos Venetsanopoulos | for VMs' private networks. In order to support the most common case, a router |
132 | bb535968 | Constantinos Venetsanopoulos | is setup on the VMs' public interface and does NAT (hoping the node has itself |
133 | bb535968 | Constantinos Venetsanopoulos | internet access). |
134 | bb535968 | Constantinos Venetsanopoulos | |
135 | bb535968 | Constantinos Venetsanopoulos | The nodes defined in this file can reflect a number of physical nodes, on which |
136 | bb535968 | Constantinos Venetsanopoulos | you will deploy Synnefo (option (2)), or a number of virtual nodes which will |
137 | bb535968 | Constantinos Venetsanopoulos | get created by `snf-deploy` using KVM (option (1)), before deploying Synnefo. |
138 | bb535968 | Constantinos Venetsanopoulos | As we will see in the next sections, one should first set up this file and then |
139 | bb535968 | Constantinos Venetsanopoulos | tell `snf-deploy` whether the nodes on this file should be created, or treated |
140 | bb535968 | Constantinos Venetsanopoulos | as pre-existing. |
141 | bb535968 | Constantinos Venetsanopoulos | |
142 | 36f3d51e | Dimitris Aragiorgis | In case you deploy all-in-one you can install `snf-deploy` package in the |
143 | 36f3d51e | Dimitris Aragiorgis | target node and use `--autoconf` option. By that you must change only |
144 | 36f3d51e | Dimitris Aragiorgis | the passwords section and everything else will be automatically configured. |
145 | 36f3d51e | Dimitris Aragiorgis | |
146 | bb535968 | Constantinos Venetsanopoulos | An example ``nodes.conf`` file looks like this: |
147 | bb535968 | Constantinos Venetsanopoulos | |
148 | bb535968 | Constantinos Venetsanopoulos | FIXME: example file here |
149 | bb535968 | Constantinos Venetsanopoulos | |
150 | bb535968 | Constantinos Venetsanopoulos | ``synnefo.conf`` |
151 | bb535968 | Constantinos Venetsanopoulos | ---------------- |
152 | bb535968 | Constantinos Venetsanopoulos | |
153 | bb535968 | Constantinos Venetsanopoulos | This file reflects the way Synnefo will be deployed on the nodes defined at |
154 | bb535968 | Constantinos Venetsanopoulos | ``nodes.conf``. |
155 | bb535968 | Constantinos Venetsanopoulos | |
156 | bb535968 | Constantinos Venetsanopoulos | The important section here is the roles. In this file we assing each of the |
157 | bb535968 | Constantinos Venetsanopoulos | roles described in the :ref:`introduction <snf-deploy>` to a specific node. The |
158 | bb535968 | Constantinos Venetsanopoulos | node is one of the nodes defined at ``nodes.conf``. Note that we refer to nodes |
159 | 36f3d51e | Dimitris Aragiorgis | with their ID (node1, node2, etc). |
160 | bb535968 | Constantinos Venetsanopoulos | |
161 | bb535968 | Constantinos Venetsanopoulos | Here we also define all credentials related to users needed by the various |
162 | bb535968 | Constantinos Venetsanopoulos | Synnefo services (database, RAPI, RabbitMQ) and the credentials of a test |
163 | bb535968 | Constantinos Venetsanopoulos | end-user (`snf-deploy` simulates a user signing up). |
164 | bb535968 | Constantinos Venetsanopoulos | |
165 | bb535968 | Constantinos Venetsanopoulos | Furthermore, define the Pithos shared directory which will hold all the Pithos |
166 | bb535968 | Constantinos Venetsanopoulos | related data (maps and blocks). |
167 | bb535968 | Constantinos Venetsanopoulos | |
168 | bb535968 | Constantinos Venetsanopoulos | Finally, define the name of the bridge interfaces controlled by Synnefo, and a |
169 | bb535968 | Constantinos Venetsanopoulos | testing Image to register after everything is up and running. |
170 | bb535968 | Constantinos Venetsanopoulos | |
171 | bb535968 | Constantinos Venetsanopoulos | An example ``setup.conf`` file (based on the previous ``nodes.conf`` example) |
172 | bb535968 | Constantinos Venetsanopoulos | looks like this: |
173 | bb535968 | Constantinos Venetsanopoulos | |
174 | bb535968 | Constantinos Venetsanopoulos | FIXME: example file here |
175 | bb535968 | Constantinos Venetsanopoulos | |
176 | bb535968 | Constantinos Venetsanopoulos | ``ganeti.conf`` |
177 | bb535968 | Constantinos Venetsanopoulos | --------------- |
178 | bb535968 | Constantinos Venetsanopoulos | |
179 | bb535968 | Constantinos Venetsanopoulos | This file reflects the way Ganeti clusters will be deployed on the nodes |
180 | bb535968 | Constantinos Venetsanopoulos | defined at ``nodes.conf``. |
181 | bb535968 | Constantinos Venetsanopoulos | |
182 | bb535968 | Constantinos Venetsanopoulos | Here we include all info with regard to Ganeti backends. That is: the master |
183 | 36f3d51e | Dimitris Aragiorgis | node, its floating IP, the rest of the cluster nodes (if any) the volume group |
184 | 36f3d51e | Dimitris Aragiorgis | name (in case of LVM support) and the VMs' public network associated to it. |
185 | bb535968 | Constantinos Venetsanopoulos | |
186 | bb535968 | Constantinos Venetsanopoulos | FIXME: example file here |
187 | bb535968 | Constantinos Venetsanopoulos | |
188 | bb535968 | Constantinos Venetsanopoulos | ``deploy.conf`` |
189 | bb535968 | Constantinos Venetsanopoulos | --------------- |
190 | bb535968 | Constantinos Venetsanopoulos | |
191 | bb535968 | Constantinos Venetsanopoulos | This file customizes `snf-deploy` itself. |
192 | bb535968 | Constantinos Venetsanopoulos | |
193 | bb535968 | Constantinos Venetsanopoulos | It defines some needed directories and also includes options that have to do |
194 | bb535968 | Constantinos Venetsanopoulos | with the source of the packages to be deployed. Specifically, whether to deploy |
195 | bb535968 | Constantinos Venetsanopoulos | using local packages found under a local directory or deploy using an apt |
196 | bb535968 | Constantinos Venetsanopoulos | repository. If deploying from local packages, there is also an option to first |
197 | bb535968 | Constantinos Venetsanopoulos | download the packages from a custom URL and save them under the local directory |
198 | bb535968 | Constantinos Venetsanopoulos | for later use. |
199 | bb535968 | Constantinos Venetsanopoulos | |
200 | bb535968 | Constantinos Venetsanopoulos | FIXME: example file here |
201 | bb535968 | Constantinos Venetsanopoulos | |
202 | bb535968 | Constantinos Venetsanopoulos | ``vcluster.conf`` |
203 | bb535968 | Constantinos Venetsanopoulos | ----------------- |
204 | bb535968 | Constantinos Venetsanopoulos | |
205 | 36f3d51e | Dimitris Aragiorgis | This file defines options that are relevant to the virtual cluster creation, if |
206 | bb535968 | Constantinos Venetsanopoulos | one chooses to create one. |
207 | bb535968 | Constantinos Venetsanopoulos | |
208 | bb535968 | Constantinos Venetsanopoulos | There is an option to define the URL of the Image that will be used as the host |
209 | bb535968 | Constantinos Venetsanopoulos | OS for the VMs of the virtual cluster. Also, options for defining an LVM space |
210 | bb535968 | Constantinos Venetsanopoulos | or a plain file to be used as a second disk. Finally, networking options to |
211 | bb535968 | Constantinos Venetsanopoulos | define where to bridge the virtual cluster. |
212 | 77180645 | Dimitris Aragiorgis | |
213 | 77180645 | Dimitris Aragiorgis | |
214 | bb535968 | Constantinos Venetsanopoulos | .. _vcluster: |
215 | bb535968 | Constantinos Venetsanopoulos | |
216 | 21d3d487 | Constantinos Venetsanopoulos | Virtual Cluster Creation (b) |
217 | 21d3d487 | Constantinos Venetsanopoulos | ============================ |
218 | 77180645 | Dimitris Aragiorgis | |
219 | bb535968 | Constantinos Venetsanopoulos | As stated in the introduction, `snf-deploy` gives you the ability to create a |
220 | bb535968 | Constantinos Venetsanopoulos | local virtual cluster using KVM and then deploy Synnefo on top of this cluster. |
221 | bb535968 | Constantinos Venetsanopoulos | The number of cluster nodes is arbitrary and is defined in ``nodes.conf``. |
222 | bb535968 | Constantinos Venetsanopoulos | |
223 | bb535968 | Constantinos Venetsanopoulos | This section describes the creation of the virtual cluster, on which Synnefo |
224 | bb535968 | Constantinos Venetsanopoulos | will be deployed in the :ref:`next section <inst>`. If you want to deploy |
225 | bb535968 | Constantinos Venetsanopoulos | Synnefo on existing physical nodes, you should skip this section. |
226 | bb535968 | Constantinos Venetsanopoulos | |
227 | bb535968 | Constantinos Venetsanopoulos | The first thing you need to deploy a virtual cluster, is a Debian Base image, |
228 | 36f3d51e | Dimitris Aragiorgis | which will be used to spawn the VMs. |
229 | 36f3d51e | Dimitris Aragiorgis | |
230 | 36f3d51e | Dimitris Aragiorgis | FIXME: Find a way to provide this image. |
231 | 36f3d51e | Dimitris Aragiorgis | |
232 | 36f3d51e | Dimitris Aragiorgis | The virtual cluster can be created by running: |
233 | 77180645 | Dimitris Aragiorgis | |
234 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
235 | 77180645 | Dimitris Aragiorgis | |
236 | 36f3d51e | Dimitris Aragiorgis | snf-deploy vcluster |
237 | 77180645 | Dimitris Aragiorgis | |
238 | 36f3d51e | Dimitris Aragiorgis | This will download the image from the URL defined at ``squeeze_image_url`` |
239 | bb535968 | Constantinos Venetsanopoulos | (Pithos by default) and save it locally under ``/var/lib/snf-deploy/images``. |
240 | 77180645 | Dimitris Aragiorgis | |
241 | bb535968 | Constantinos Venetsanopoulos | TODO: mention related options: --img-dir, --extra-disk, --lvg, --os |
242 | bb535968 | Constantinos Venetsanopoulos | |
243 | 36f3d51e | Dimitris Aragiorgis | Afterwards it will add a bridge (defined with the ``bridge`` option inside |
244 | bb535968 | Constantinos Venetsanopoulos | ``vcluster.conf``), iptables to allow traffic from/to the cluster, and enable |
245 | bb535968 | Constantinos Venetsanopoulos | forwarding and NAT for the selected network subnet (defined inside |
246 | bb535968 | Constantinos Venetsanopoulos | ``nodes.conf`` in the ``subnet`` option). |
247 | 77180645 | Dimitris Aragiorgis | |
248 | bb535968 | Constantinos Venetsanopoulos | To complete the preparation, you need a DHCP server that will provide the |
249 | bb535968 | Constantinos Venetsanopoulos | selected hostnames and IPs to the cluster (defined under ``[ips]`` in |
250 | 36f3d51e | Dimitris Aragiorgis | ``nodes.conf``). |
251 | 77180645 | Dimitris Aragiorgis | |
252 | 36f3d51e | Dimitris Aragiorgis | It will launch a dnsmasq instance, acting only as DHCP server and listening |
253 | 36f3d51e | Dimitris Aragiorgis | only on the cluster's bridge. |
254 | 77180645 | Dimitris Aragiorgis | |
255 | 36f3d51e | Dimitris Aragiorgis | Finally it will launch all the needed KVM virtual machines, snapshotting the |
256 | 36f3d51e | Dimitris Aragiorgis | image we fetched before. Their taps will be connected with the already created |
257 | 36f3d51e | Dimitris Aragiorgis | bridge and their primary interface will get the given address. |
258 | 77180645 | Dimitris Aragiorgis | |
259 | bb535968 | Constantinos Venetsanopoulos | Now that we have the nodes ready, we can move on and deploy Synnefo on them. |
260 | 77180645 | Dimitris Aragiorgis | |
261 | 77180645 | Dimitris Aragiorgis | |
262 | bb535968 | Constantinos Venetsanopoulos | .. _inst: |
263 | bb535968 | Constantinos Venetsanopoulos | |
264 | 21d3d487 | Constantinos Venetsanopoulos | Synnefo Installation (c) |
265 | 21d3d487 | Constantinos Venetsanopoulos | ======================== |
266 | 21d3d487 | Constantinos Venetsanopoulos | |
267 | bb535968 | Constantinos Venetsanopoulos | At this point you should have an up-and-running cluster, either virtual |
268 | 22a8a5e1 | Dimitris Aragiorgis | (created in the :ref:`previous section <vcluster>` on your local machine) or |
269 | bb535968 | Constantinos Venetsanopoulos | physical on remote nodes. The cluster should also have valid hostnames and IPs. |
270 | bb535968 | Constantinos Venetsanopoulos | And all its nodes should be defined in ``nodes.conf``. |
271 | bb535968 | Constantinos Venetsanopoulos | |
272 | bb535968 | Constantinos Venetsanopoulos | You should also have set up ``synnefo.conf`` to reflect which Synnefo component |
273 | bb535968 | Constantinos Venetsanopoulos | will reside in which node. |
274 | bb535968 | Constantinos Venetsanopoulos | |
275 | 22a8a5e1 | Dimitris Aragiorgis | Node Requirements |
276 | 22a8a5e1 | Dimitris Aragiorgis | ----------------- |
277 | 22a8a5e1 | Dimitris Aragiorgis | |
278 | 36f3d51e | Dimitris Aragiorgis | - OS: Debian Wheezy |
279 | 36f3d51e | Dimitris Aragiorgis | - authentication: `root` user with corresponding for each node password |
280 | 22a8a5e1 | Dimitris Aragiorgis | - primary network interface: `eth0` |
281 | 22a8a5e1 | Dimitris Aragiorgis | - spare network interfaces: `eth1`, `eth2` (or vlans on `eth0`) |
282 | 22a8a5e1 | Dimitris Aragiorgis | |
283 | 22a8a5e1 | Dimitris Aragiorgis | In case you have created a virtual cluster as described in the :ref:`section |
284 | 22a8a5e1 | Dimitris Aragiorgis | (b) <vcluster>`, the above requirements are already taken care of. In case of a |
285 | 22a8a5e1 | Dimitris Aragiorgis | physical cluster, you need to set them up manually by yourself, before |
286 | 22a8a5e1 | Dimitris Aragiorgis | proceeding with the Synnefo installation. |
287 | 22a8a5e1 | Dimitris Aragiorgis | |
288 | 77180645 | Dimitris Aragiorgis | |
289 | bb535968 | Constantinos Venetsanopoulos | Synnefo deployment |
290 | bb535968 | Constantinos Venetsanopoulos | ------------------ |
291 | bb535968 | Constantinos Venetsanopoulos | |
292 | bb535968 | Constantinos Venetsanopoulos | To install the Synnefo stack on the existing cluster run: |
293 | 77180645 | Dimitris Aragiorgis | |
294 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
295 | 77180645 | Dimitris Aragiorgis | |
296 | 36f3d51e | Dimitris Aragiorgis | snf-deploy all -vvv |
297 | 77180645 | Dimitris Aragiorgis | |
298 | bb535968 | Constantinos Venetsanopoulos | This might take a while. |
299 | 77180645 | Dimitris Aragiorgis | |
300 | bb535968 | Constantinos Venetsanopoulos | If this finishes without errors, check for successful installation by visiting |
301 | bb535968 | Constantinos Venetsanopoulos | from your local machine (make sure you have already setup your local |
302 | bb535968 | Constantinos Venetsanopoulos | ``resolv.conf`` to point at the cluster's DNS): |
303 | 77180645 | Dimitris Aragiorgis | |
304 | 36f3d51e | Dimitris Aragiorgis | | https://accounts.synnefo.live/astakos/ui/ |
305 | 77180645 | Dimitris Aragiorgis | |
306 | 77180645 | Dimitris Aragiorgis | and login with: |
307 | 77180645 | Dimitris Aragiorgis | |
308 | 36f3d51e | Dimitris Aragiorgis | | username: user@synnefo.org password: 12345 |
309 | 77180645 | Dimitris Aragiorgis | |
310 | bb535968 | Constantinos Venetsanopoulos | or the ``user_name`` and ``user_passwd`` defined in your ``synnefo.conf``. |
311 | bb535968 | Constantinos Venetsanopoulos | Take a small tour checking out Pithos and the rest of the Web UI. You can |
312 | 36f3d51e | Dimitris Aragiorgis | upload a sample file on Pithos to see that Pithos is working. To test |
313 | 36f3d51e | Dimitris Aragiorgis | everything went as expected, visit from your local machine: |
314 | 77180645 | Dimitris Aragiorgis | |
315 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
316 | 77180645 | Dimitris Aragiorgis | |
317 | 36f3d51e | Dimitris Aragiorgis | https://cyclades.synnefo.live/cyclades/ui/ |
318 | bb535968 | Constantinos Venetsanopoulos | |
319 | 36f3d51e | Dimitris Aragiorgis | and try to create a VM. Also create a Private Network and try to connect it. If |
320 | 36f3d51e | Dimitris Aragiorgis | everything works, you have setup Synnefo successfully. Enjoy! |
321 | 77180645 | Dimitris Aragiorgis | |
322 | 77180645 | Dimitris Aragiorgis | |
323 | 36f3d51e | Dimitris Aragiorgis | Adding another Ganeti Backend |
324 | 36f3d51e | Dimitris Aragiorgis | ----------------------------- |
325 | bb535968 | Constantinos Venetsanopoulos | |
326 | 36f3d51e | Dimitris Aragiorgis | From version 0.12, Synnefo supports multiple Ganeti backends. |
327 | 36f3d51e | Dimitris Aragiorgis | `snf-deploy` defines them in ``ganeti.conf``. |
328 | bb535968 | Constantinos Venetsanopoulos | |
329 | 36f3d51e | Dimitris Aragiorgis | After adding another section in ``ganeti.conf``, run: |
330 | 77180645 | Dimitris Aragiorgis | |
331 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
332 | 77180645 | Dimitris Aragiorgis | |
333 | 36f3d51e | Dimitris Aragiorgis | snf-deploy backend --cluster-name ganeti2 -vvv |
334 | 77180645 | Dimitris Aragiorgis | |
335 | bb535968 | Constantinos Venetsanopoulos | |
336 | 36f3d51e | Dimitris Aragiorgis | snf-deploy for Ganeti |
337 | 36f3d51e | Dimitris Aragiorgis | ===================== |
338 | bb535968 | Constantinos Venetsanopoulos | |
339 | 36f3d51e | Dimitris Aragiorgis | `snf-deploy` can be used to deploy a Ganeti cluster on pre-existing nodes |
340 | 36f3d51e | Dimitris Aragiorgis | by issuing: |
341 | 77180645 | Dimitris Aragiorgis | |
342 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
343 | 77180645 | Dimitris Aragiorgis | |
344 | 36f3d51e | Dimitris Aragiorgis | snf-deploy ganeti --cluster-name ganeti3 -vvv |
345 | 77180645 | Dimitris Aragiorgis | |
346 | 77180645 | Dimitris Aragiorgis | |
347 | 21d3d487 | Constantinos Venetsanopoulos | snf-deploy as a DevTool |
348 | 21d3d487 | Constantinos Venetsanopoulos | ======================= |
349 | 77180645 | Dimitris Aragiorgis | |
350 | bb535968 | Constantinos Venetsanopoulos | For developers, a single node setup is highly recommended and `snf-deploy` is a |
351 | 36f3d51e | Dimitris Aragiorgis | very helpful tool. `snf-deploy` also setting up components using packages that |
352 | 36f3d51e | Dimitris Aragiorgis | are locally generated. For this to work please add all related \*.deb files in |
353 | 36f3d51e | Dimitris Aragiorgis | packages directory (see ``deploy.conf``) and set the ``use_local_packages`` |
354 | 36f3d51e | Dimitris Aragiorgis | option to ``True``. Then run: |
355 | 36f3d51e | Dimitris Aragiorgis | |
356 | 36f3d51e | Dimitris Aragiorgis | .. code-block:: console |
357 | 36f3d51e | Dimitris Aragiorgis | |
358 | 36f3d51e | Dimitris Aragiorgis | snf-deploy run <action1> [<action2>..] |
359 | 36f3d51e | Dimitris Aragiorgis | |
360 | 36f3d51e | Dimitris Aragiorgis | |
361 | 36f3d51e | Dimitris Aragiorgis | to execute predefined actions or: |
362 | 77180645 | Dimitris Aragiorgis | |
363 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
364 | 77180645 | Dimitris Aragiorgis | |
365 | 36f3d51e | Dimitris Aragiorgis | snf-deploy run setup --node nodeX \ |
366 | 36f3d51e | Dimitris Aragiorgis | --role ROLE | --component COMPONENT --method METHOD |
367 | 77180645 | Dimitris Aragiorgis | |
368 | 36f3d51e | Dimitris Aragiorgis | to setup a synnefo role on a target node or run a specific component's method. |
369 | 36f3d51e | Dimitris Aragiorgis | |
370 | 36f3d51e | Dimitris Aragiorgis | For instance, to add another node to an existing ganeti backend run: |
371 | 77180645 | Dimitris Aragiorgis | |
372 | 77180645 | Dimitris Aragiorgis | .. code-block:: console |
373 | 77180645 | Dimitris Aragiorgis | |
374 | 36f3d51e | Dimitris Aragiorgis | snf-deploy run setup --node5 --role ganeti --cluster-name ganeti3 |
375 | 36f3d51e | Dimitris Aragiorgis | |
376 | 36f3d51e | Dimitris Aragiorgis | `snf-deploy` keeps track of installed components per node in |
377 | 36f3d51e | Dimitris Aragiorgis | ``/etc/snf-deploy/status.conf``. If a deployment command fails, the developer |
378 | 36f3d51e | Dimitris Aragiorgis | can make the required fix and then re-run the same command; `snf-deploy` will |
379 | 36f3d51e | Dimitris Aragiorgis | not re-install components that have been already setup and their status |
380 | 36f3d51e | Dimitris Aragiorgis | is ``ok``. |