Statistics
| Branch: | Tag: | Revision:

root / docs / admin-guide.rst @ 5547485e

History | View | Annotate | Download (91.4 kB)

1
.. _admin-guide:
2

    
3
Synnefo Administrator's Guide
4
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5

    
6
This is the complete Synnefo Administrator's Guide.
7

    
8

    
9
.. _syn+archip:
10

    
11
General Synnefo Architecture
12
============================
13

    
14
The following figure shows a detailed view of the whole Synnefo architecture
15
and how it interacts with multiple Ganeti clusters. We hope that after reading
16
the Administrator's Guide you will be able to understand every component and
17
all the interactions between them.
18

    
19
.. image:: images/synnefo-arch2.png
20
   :width: 100%
21
   :target: _images/synnefo-arch2.png
22

    
23
Synnefo also supports RADOS as an alternative storage backend for
24
Files/Images/VM disks. You will find the :ref:`corresponding figure
25
<syn+archip+rados>` later in this guide.
26

    
27

    
28
Identity Service (Astakos)
29
==========================
30

    
31

    
32
Authentication methods
33
----------------------
34

    
35
Astakos supports multiple authentication methods:
36

    
37
 * local username/password
38
 * LDAP / Active Directory
39
 * SAML 2.0 (Shibboleth) federated logins
40
 * Google
41
 * Twitter
42
 * LinkedIn
43

    
44
.. _shibboleth-auth:
45

    
46
Shibboleth Authentication
47
~~~~~~~~~~~~~~~~~~~~~~~~~
48

    
49
Astakos can delegate user authentication to a Shibboleth federation.
50

    
51
To setup shibboleth, install package::
52

    
53
  apt-get install libapache2-mod-shib2
54

    
55
Change appropriately the configuration files in ``/etc/shibboleth``.
56

    
57
Add in ``/etc/apache2/sites-available/synnefo-ssl``::
58

    
59
  ShibConfig /etc/shibboleth/shibboleth2.xml
60
  Alias      /shibboleth-sp /usr/share/shibboleth
61

    
62
  <Location /ui/login/shibboleth>
63
    AuthType shibboleth
64
    ShibRequireSession On
65
    ShibUseHeaders On
66
    require valid-user
67
  </Location>
68

    
69
and before the line containing::
70

    
71
  ProxyPass        / http://localhost:8080/ retry=0
72

    
73
add::
74

    
75
  ProxyPass /Shibboleth.sso !
76

    
77
Then, enable the shibboleth module::
78

    
79
  a2enmod shib2
80

    
81
After passing through the apache module, the following tokens should be
82
available at the destination::
83

    
84
  eppn # eduPersonPrincipalName
85
  Shib-InetOrgPerson-givenName
86
  Shib-Person-surname
87
  Shib-Person-commonName
88
  Shib-InetOrgPerson-displayName
89
  Shib-EP-Affiliation
90
  Shib-Session-ID
91

    
92
Finally, add 'shibboleth' in ``ASTAKOS_IM_MODULES`` list. The variable resides
93
inside the file ``/etc/synnefo/20-snf-astakos-app-settings.conf``
94

    
95
Twitter Authentication
96
~~~~~~~~~~~~~~~~~~~~~~
97

    
98
To enable twitter authentication while signed in under a Twitter account,
99
visit dev.twitter.com/apps.
100

    
101
Click Create an application.
102

    
103
Fill the necessary information and for callback URL give::
104

    
105
    https://node1.example.com/ui/login/twitter/authenticated
106

    
107
Finally, add 'twitter' in ``ASTAKOS_IM_MODULES`` list. The variable resides
108
inside the file ``/etc/synnefo/20-snf-astakos-app-settings.conf``
109

    
110
Google Authentication
111
~~~~~~~~~~~~~~~~~~~~~
112

    
113
To enable google authentication while signed in under a Google account,
114
visit https://code.google.com/apis/console/.
115

    
116
Under API Access select Create another client ID, select Web application,
117
expand more options in Your site or hostname section and in Authorized
118
Redirect URIs add:
119

    
120

    
121
Fill the necessary information and for callback URL give::
122

    
123
    https://node1.example.com/ui/login/google/authenticated
124

    
125
Finally, add 'google' in ``ASTAKOS_IM_MODULES`` list. The variable resides
126
inside the file ``/etc/synnefo/20-snf-astakos-app-settings.conf``
127

    
128

    
129
Working with Astakos
130
--------------------
131

    
132
User registration
133
~~~~~~~~~~~~~~~~~
134

    
135
When a new user signs up, he/she is not directly marked as active. You can see
136
his/her state by running (on the machine that runs the Astakos app):
137

    
138
.. code-block:: console
139

    
140
   $ snf-manage user-list
141

    
142
More detailed user status is provided in the `status` field of the `user-show`
143
command:
144

    
145
.. code-block:: console
146

    
147
  $ snf-manage user-show <user-id>
148

    
149
  id                  : 6
150
  uuid                : 78661411-5eed-412f-a9ea-2de24f542c2e
151
  status              : Accepted/Active (accepted policy: manual)
152
  email               : user@synnefo.org
153
  ....
154

    
155
Based on the `astakos-app` configuration, there are several ways for a user to
156
get verified and activated in order to be able to login. We discuss the user
157
verification and activation flow in the following section.
158

    
159
User activation flow
160
````````````````````
161

    
162
A user can register for an account using the astakos signup form. Once the form
163
is submited successfully a user entry is created in astakos database. That entry
164
is passed through the astakos activation backend which handles whether the user
165
should be automatically verified and activated.
166

    
167
Email verification
168
``````````````````
169

    
170
The verification process takes place in order to ensure that the user owns the
171
email provided during the signup process. By default, after each successful
172
signup astakos notifies user with an verification url via email.
173

    
174
At this stage:
175

    
176
    * subsequent registrations invalidate and delete the previous registrations
177
      of the same email address.
178

    
179
    * in case user misses the initial notification, additional emails can be
180
      send either via the url which is prompted to the user if he tries to
181
      login, or by the administrator using the ``snf-manage user-activation-send
182
      <userid>`` command.
183

    
184
    * administrator may also enforce a user to get verified using the
185
      ``snf-manage user-modify --verify <userid>`` command.
186

    
187
Account activation
188
``````````````````
189

    
190
Once the user gets verified, it is time for Astakos to decide whether or not to
191
proceed through user activation process. If ``ASTAKOS_MODERATION_ENABLED``
192
setting is set to ``False`` (default value) user gets activated automatically.
193

    
194
In case the moderation is enabled Astakos may still automatically activate the
195
user in the following cases:
196

    
197
    * User email matches any of the regular expressions defined in
198
      ``ASTAKOS_RE_USER_EMAIL_PATTERNS`` (defaults to ``[]``)
199
    * User used a signup method (e.g. ``shibboleth``) for which automatic
200
      activation is enabled (see
201
      :ref:`authentication methods policies <auth_methods_policies>`).
202

    
203
If all of the above fail to trigger automatic activation, an email is sent to
204
the persons listed in ``HELPDESK``, ``MANAGERS`` and ``ADMINS`` settings,
205
notifing that there is a new user pending for moderation and that it's up to
206
the administrator to decide if the user should be activated. The UI also shows
207
a corresponding 'pending moderation' message to the user. The administrator can
208
activate a user using the ``snf-manage user-modify`` command:
209

    
210
.. code-block:: console
211

    
212
    # command to activate a pending user
213
    $ snf-manage user-modify --accept <userid>
214

    
215
    # command to reject a pending user
216
    $ snf-manage user-modify --reject --reject-reason="spammer" <userid>
217

    
218
Once the activation process finishes, a greeting message is sent to the user
219
email address and a notification for the activation to the persons listed in
220
``HELPDESK``, ``MANAGERS`` and ``ADMINS`` settings. Once activated the user is
221
able to login and access the Synnefo services.
222

    
223
Additional authentication methods
224
`````````````````````````````````
225

    
226
Astakos supports third party logins from external identity providers. This
227
can be usefull since it allows users to use their existing credentials to
228
login to astakos service.
229

    
230
Currently astakos supports the following identity providers:
231

    
232
    * `Shibboleth <http://www.internet2.edu/shibboleth>`_ (module name
233
      ``shibboleth``)
234
    * `Google <https://developers.google.com/accounts/docs/OAuth2>`_ (module
235
      name ``google``)
236
    * `Twitter <https://dev.twitter.com/docs/auth>`_ (module name ``twitter``)
237
    * `LinkedIn <http://developer.linkedin.com/documents/authentication>`_
238
      (module name ``linkedin``)
239

    
240
To enable any of the above modules (by default only ``local`` accounts are
241
allowed), retrieve and set the required provider settings and append the
242
module name in ``ASTAKOS_IM_MODULES``.
243

    
244
.. code-block:: python
245

    
246
    # settings from https://code.google.com/apis/console/
247
    ASTAKOS_GOOGLE_CLIENT_ID = '1111111111-epi60tvimgha63qqnjo40cljkojcann3.apps.googleusercontent.com'
248
    ASTAKOS_GOOGLE_SECRET = 'tNDQqTDKlTf7_LaeUcWTWwZM'
249

    
250
    # let users signup and login using their google account
251
    ASTAKOS_IM_MODULES = ['local', 'google']
252

    
253

    
254
.. _auth_methods_policies:
255

    
256
Authentication method policies
257
``````````````````````````````
258

    
259
Astakos allows you to override the default policies for each enabled provider
260
separately by adding the approriate settings in your ``.conf`` files in the
261
following format:
262

    
263
**ASTAKOS_AUTH_PROVIDER_<module>_<policy>_POLICY**
264

    
265
Available policies are:
266

    
267
    * **CREATE** Users can signup using that provider (default: ``True``)
268
    * **REMOVE/ADD** Users can remove/add login method from their profile
269
      (default: ``True``)
270
    * **AUTOMODERATE** Automatically activate users that signup using that
271
      provider (default: ``False``)
272
    * **LOGIN** Whether or not users can use the provider to login (default:
273
      ``True``).
274

    
275
e.g. to enable automatic activation for your academic users, while keeping
276
locally signed up users under moderation you can apply the following settings.
277

    
278
.. code-block:: python
279

    
280
    ASTAKOS_AUTH_PROVIDER_SHIBBOLETH_AUTOMODERATE_POLICY = True
281
    ASTAKOS_AUTH_PROVIDER_SHIBBOLETH_REMOVE_POLICY = False
282

    
283
User login
284
~~~~~~~~~~
285

    
286
During the logging procedure, the user is authenticated by the respective
287
identity provider.
288

    
289
If ``ASTAKOS_RECAPTCHA_ENABLED`` is set and the user fails several times
290
(``ASTAKOS_RATELIMIT_RETRIES_ALLOWED`` setting) to provide the correct
291
credentials for a local account, he/she is then prompted to solve a captcha
292
challenge.
293

    
294
Upon success, the system renews the token (if it has expired), logins the user
295
and sets the cookie, before redirecting the user to the ``next`` parameter
296
value.
297

    
298
Setting quota limits
299
~~~~~~~~~~~~~~~~~~~~
300

    
301
Set default quota
302
`````````````````
303
To inspect current default base quota limits, run::
304

    
305
   # snf-manage resource-list
306

    
307
You can modify the default base quota limit for all future users with::
308

    
309
   # snf-manage resource-modify <resource_name> --default-quota <value>
310

    
311
Set base quota for individual users
312
```````````````````````````````````
313

    
314
For individual users that need different quota than the default
315
you can set it for each resource like this::
316

    
317
    # use this to display quota / uuid
318
    # snf-manage user-show 'uuid or email' --quota
319

    
320
    # snf-manage user-modify <user-uuid> --base-quota 'cyclades.vm' 10
321

    
322
You can set base quota for all existing users, with possible exceptions, using::
323

    
324
    # snf-manage user-modify --all --base-quota cyclades.vm 10 --exclude uuid1,uuid2
325

    
326
All quota for which values different from the default have been set,
327
can be listed with::
328

    
329
    # snf-manage quota-list --with-custom=True
330

    
331

    
332
Enable the Projects feature
333
~~~~~~~~~~~~~~~~~~~~~~~~~~~
334

    
335
If you want to enable the projects feature so that users may apply
336
on their own for resources by creating and joining projects,
337
in ``20-snf-astakos-app-settings.conf`` set::
338

    
339
    # this will make the 'projects' page visible in the dashboard
340
    ASTAKOS_PROJECTS_VISIBLE = True
341

    
342
You can change the maximum allowed number of pending project applications
343
per user with::
344

    
345
    # snf-manage resource-modify astakos.pending_app --default-quota <number>
346

    
347
You can also set a user-specific limit with::
348

    
349
    # snf-manage user-modify <user-uuid> --base-quota 'astakos.pending_app' 5
350

    
351
When users apply for projects they are not automatically granted
352
the resources. They must first be approved by the administrator.
353

    
354
To list pending project applications in astakos::
355

    
356
    # snf-manage project-list --pending
357

    
358
Note the last column, the application id. To approve it::
359

    
360
    # <app id> from the last column of project-list
361
    # snf-manage project-control --approve <app id>
362

    
363
To deny an application::
364

    
365
    # snf-manage project-control --deny <app id>
366

    
367
Users designated as *project admins* can approve, deny, or modify
368
an application through the web interface. In
369
``20-snf-astakos-app-settings.conf`` set::
370

    
371
    # UUIDs of users that can approve or deny project applications from the web.
372
    ASTAKOS_PROJECT_ADMINS = [<uuid>, ...]
373

    
374

    
375
Astakos advanced operations
376
---------------------------
377

    
378
Adding "Terms of Use"
379
~~~~~~~~~~~~~~~~~~~~~
380

    
381
Astakos supports versioned terms-of-use. First of all you need to create an
382
html file that will contain your terms. For example, create the file
383
``/usr/share/synnefo/sample-terms.html``, which contains the following:
384

    
385
.. code-block:: console
386

    
387
   <h1>My cloud service terms</h1>
388

    
389
   These are the example terms for my cloud service
390

    
391
Then, add those terms-of-use with the snf-manage command:
392

    
393
.. code-block:: console
394

    
395
   $ snf-manage term-add /usr/share/synnefo/sample-terms.html
396

    
397
Your terms have been successfully added and you will see the corresponding link
398
appearing in the Astakos web pages' footer.
399

    
400
During the account registration, if there are approval terms, the user is
401
presented with an "I agree with the Terms" checkbox that needs to get checked
402
in order to proceed.
403

    
404
In case there are new approval terms that the user has not signed yet, the
405
``signed_terms_required`` view decorator redirects to the ``approval_terms``
406
view, so the user will be presented with the new terms the next time he/she
407
logins.
408

    
409
Enabling reCAPTCHA
410
~~~~~~~~~~~~~~~~~~
411

    
412
Astakos supports the `reCAPTCHA <http://www.google.com/recaptcha>`_ feature.
413
If enabled, it protects the Astakos forms from bots. To enable the feature, go
414
to https://www.google.com/recaptcha/admin/create and create your own reCAPTCHA
415
key pair. Then edit ``/etc/synnefo/20-snf-astakos-app-settings.conf`` and set
416
the corresponding variables to reflect your newly created key pair. Finally, set
417
the ``ASTAKOS_RECAPTCHA_ENABLED`` variable to ``True``:
418

    
419
.. code-block:: console
420

    
421
   ASTAKOS_RECAPTCHA_PUBLIC_KEY = 'example_recaptcha_public_key!@#$%^&*('
422
   ASTAKOS_RECAPTCHA_PRIVATE_KEY = 'example_recaptcha_private_key!@#$%^&*('
423

    
424
   ASTAKOS_RECAPTCHA_ENABLED = True
425

    
426
Restart the service on the Astakos node(s) and you are ready:
427

    
428
.. code-block:: console
429

    
430
   # /etc/init.d/gunicorn restart
431

    
432
Checkout your new Sign up page. If you see the reCAPTCHA box, you have setup
433
everything correctly.
434

    
435

    
436
Astakos internals
437
-----------------
438

    
439
X-Auth-Token
440
~~~~~~~~~~~~
441

    
442
Alice requests a specific resource from a cloud service e.g.: Pithos. In the
443
request she supplies the `X-Auth-Token` to identify whether she is eligible to
444
perform the specific task. The service contacts Astakos through its
445
``/account/v1.0/authenticate`` api call (see :ref:`authenticate-api-label`)
446
providing the specific ``X-Auth-Token``. Astakos checkes whether the token
447
belongs to an active user and it has not expired and returns a dictionary
448
containing user related information. Finally the service uses the ``uniq``
449
field included in the dictionary as the account string to identify the user
450
accessible resources.
451

    
452
.. _authentication-label:
453

    
454
Django Auth methods and Backends
455
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
456

    
457
Astakos incorporates Django user authentication system and extends its User model.
458

    
459
Since username field of django User model has a limitation of 30 characters,
460
AstakosUser is **uniquely** identified by the ``email`` instead. Therefore,
461
``astakos.im.authentication_backends.EmailBackend`` is served to authenticate a
462
user using email if the first argument is actually an email, otherwise tries
463
the username.
464

    
465
A new AstakosUser instance is assigned with a uui as username and also with a
466
``auth_token`` used by the cloud services to authenticate the user.
467
``astakos.im.authentication_backends.TokenBackend`` is also specified in order
468
to authenticate the user using the email and the token fields.
469

    
470
Logged on users can perform a number of actions:
471

    
472
 * access and edit their profile via: ``/im/profile``.
473
 * change their password via: ``/im/password``
474
 * send feedback for grnet services via: ``/im/send_feedback``
475
 * logout (and delete cookie) via: ``/im/logout``
476

    
477
Internal Astakos requests are handled using cookie-based Django user sessions.
478

    
479
External systems should forward to the ``/login`` URI. The server,
480
depending on its configuration will redirect to the appropriate login page.
481
When done with logging in, the service's login URI should redirect to the URI
482
provided with next, adding user and token parameters, which contain the email
483
and token fields respectively.
484

    
485
The login URI accepts the following parameters:
486

    
487
======================  =========================
488
Request Parameter Name  Value
489
======================  =========================
490
next                    The URI to redirect to when the process is finished
491
renew                   Force token renewal (no value parameter)
492
force                   Force logout current user (no value parameter)
493
======================  =========================
494

    
495
External systems inside the ``ASTAKOS_COOKIE_DOMAIN`` scope can acquire the
496
user information by the cookie identified by ``ASTAKOS_COOKIE_NAME`` setting
497
(set during the login procedure).
498

    
499
Finally, backend systems having acquired a token can use the
500
:ref:`authenticate-api-label` API call from a private network or through HTTPS.
501

    
502

    
503
Compute/Network/Image Service (Cyclades)
504
========================================
505

    
506
Introduction
507
------------
508

    
509
Cyclades is the Synnefo component that implements Compute, Network and Image
510
services and exposes the associated OpenStack REST APIs. By running Cyclades
511
you can provide a cloud that can handle thousands of virtual servers and
512
networks.
513

    
514
Cyclades does not include any virtualization software and knows nothing about
515
the low-level VM management operations, e.g. handling of VM creation or
516
migrations among physical nodes. Instead, Cyclades is the component that
517
handles multiple Ganeti backends and exposes the REST APIs. The administrator
518
can expand the infrastructure dynamically either by adding more Ganeti nodes
519
or by adding new Ganeti clusters. Cyclades issue VM control commands to Ganeti
520
via Ganeti's remote API and receive asynchronous notifications from Ganeti
521
backends whenever the state of a VM changes, due to Synnefo- or
522
administrator-initiated commands.
523

    
524
Cyclades is the action orchestrator and the API layer on top of multiple Ganeti
525
clusters. By this decoupled design, Ganeti cluster are self-contained and
526
the administrator has complete control on them without Cyclades knowing about
527
it. For example a VM migration to a different physical node is transparent
528
to Cyclades.
529

    
530
Working with Cyclades
531
---------------------
532

    
533
Flavors
534
~~~~~~~
535

    
536
When creating a VM, the user must specify the `flavor` of the virtual server.
537
Flavors are the virtual hardware templates, and provide a description about
538
the number of CPUs, the amount of RAM, and the size of the disk of the VM.
539
Besides the size of the disk, Cyclades flavors describe the storage backend
540
that will be used for the virtual server.
541

    
542
Flavors are created by the administrator and the user can select one of the
543
available flavors. After VM creation, the user can resize his VM, by
544
adding/removing CPU and RAM.
545

    
546
Cyclades support different storage backends that are described by the disk
547
template of the flavor, which is mapped to Ganeti's instance `disk template`.
548
Currently the available disk templates are the following:
549

    
550
* `file`: regulars file
551
* `sharedfile`: regular files on a shared directory, e.g. NFS
552
* `plain`: logical volumes
553
* `drbd`: drbd on top of lvm volumes
554
* `rbd`: rbd volumes residing inside a RADOS cluster
555
* `ext`: disks provided by an external shared storage.
556

    
557
  - `ext_archipelago`: External shared storage provided by
558
    `Archipelago <http://www.synnefo.org/docs/archipelago/latest/index.html>`_.
559

    
560
Flavors are created by the administrator using `snf-manage flavor-create`
561
command. The command takes as argument number of CPUs, amount of RAM, the size
562
of the disks and the disk templates and create the flavors that belong to the
563
cartesian product of the specified arguments. For example, the following
564
command will create two flavors of `40G` disk size with `drbd` disk template,
565
`4G` RAM and `2` or `4` CPUs.
566

    
567
.. code-block:: console
568

    
569
  $ snf-manage flavor-create 2,4 4096 40 drbd
570

    
571
To see the available flavors, run `snf-manage flavor-list` command. Finally,
572
the administrator can delete a flavor by using `flavor-modify` command:
573

    
574
.. code-block:: console
575

    
576
  $ snf-manage flavor-modify --deleted=True <flavor_id>
577

    
578
Images
579
~~~~~~
580

    
581
When creating a VM the user must also specify the `image` of the virtual
582
server. Images are the static templates from which VM instances are
583
initiated. Cyclades uses Pithos to store system and user-provided images,
584
taking advantage of all Pithos features, like deduplication and syncing
585
protocol. An image is a file stored to Pithos with additional metadata that
586
are describing the image, e.g. the OS family or the root partition. To create
587
a new image, the administrator or the user has to upload it a file to Pithos,
588
and then register it as an Image with Cyclades. Then the user can use this
589
image to spawn new VMs from it.
590

    
591
Images can be private, public or shared between users, exactly like Pithos
592
files. Since user-provided public images can be untrusted, the administrator
593
can denote which users are trusted by adding them to the
594
``UI_SYSTEM_IMAGES_OWNERS`` setting in the
595
`/etc/synnefo/20-snf-cyclades-app-ui.conf` file. Images of those users are
596
properly displayed in the UI.
597

    
598
When creating a new VM, Cyclades pass the location of the image and it's
599
metadata to Ganeti. After Ganeti creates the instance's disk, `snf-image`
600
will copy the image to the new disk and perform the image customization
601
phase. During the phase, `snf-image` sends notifications to Cyclades about
602
the progress of the image deployment and customization. Customization includes
603
resizing the root file system, file injection (e.g. SSH keys) and setting
604
a custom hostname. For better understanding of `snf-image` read the
605
corresponding `documentation
606
<http://www.synnefo.org/docs/snf-image/latest/index.html>`_.
607

    
608
For passing sensitive data about the image to Ganeti, like the VMs password,
609
Cyclades keeps all sensitive data in memory caches (memcache) and never allows
610
them to hit the disk. The data are exposed to `snf-image` via an one-time URL
611
that is exposed from the `vmapi` application. So, instead of passing sensitive
612
data to `snf-image` via Ganeti, Cyclades pass an one-time configuration URL
613
that contains a random UUID. After `snf-image` gets the sensitive data, the
614
URL is invalidated so no one else can access them.
615

    
616
The administrator can register images, exactly like users, using a system user
617
(a user that is defined in the ``UI_SYSTEM_IMAGES_OWNERS`` setting). For
618
example, the following command will register the
619
`pithos://u53r-un1qu3-1d/images/debian_base-6.0-7-x86_64.diskdump` as an
620
image to Cyclades:
621

    
622
.. code-block:: console
623

    
624
 $ kamaki image register "Debian Base" \
625
        pithos://u53r-un1qu3-1d/images/debian_base-6.0-7-x86_64.diskdump \
626
        --public \
627
        --disk-format=diskdump \
628
        --property OSFAMILY=linux --property ROOT_PARTITION=1 \
629
        --property description="Debian Squeeze Base System" \
630
        --property size=451 --property kernel=2.6.32 --property GUI="No GUI" \
631
        --property sortorder=1 --property USERS=root --property OS=debian
632

    
633
Deletion of an image is done via `kamaki image unregister` command, which will
634
delete the Cyclades Images but will leave the Pithos file as is (unregister).
635

    
636
Apart from using `kamaki` to see and hangle the available images, the
637
administrator can use `snf-manage image-list` and `snf-manage image-show`
638
commands to list and inspect the available public images. Also, the `--user-id`
639
option can be used the see the images of a specific user.
640

    
641
Virtual Servers
642
~~~~~~~~~~~~~~~
643

    
644
As mentioned, Cyclades uses Ganeti for management of VMs. The administrator can
645
handle Cyclades VMs just like any other Ganeti instance, via `gnt-instance`
646
commands. All Ganeti instances that belong to Synnefo, are separated from
647
others, by a prefix in their names. This prefix is defined in
648
``BACKEND_PREFIX_ID`` setting in
649
``/etc/synnefo/20-snf-cyclades-app-backend.conf``.
650

    
651
Apart from handling Cyclades VM at the Ganeti level, the administrator can
652
also use the `snf-manage server-*` commands. These command cover the most
653
common tasks that are relative with VM handling. Below we describe come
654
of them, but for more information you can use the `--help` option of all
655
`snf-manage server-* commands`. These command cover the most
656

    
657
The `snf-manage server-create` command can be used to create a new VM for some
658
user. This command can be useful when the administrator wants to test Cyclades
659
functionality without starting the API service, e.g. after an upgrade. Also, by
660
using `--backend-id` option, the VM will be created in the specified backend,
661
bypassing automatic VM allocation.
662

    
663
.. code-block:: console
664

    
665
 $ snf-manage server-create --flavor-id=1 --image-id=fc0f6858-f962-42ce-bf9a-1345f89b3d5e \
666
    --user-id=7cf4d078-67bf-424d-8ff2-8669eb4841ea --backend-id=2 \
667
    --password='example_passw0rd' --name='test_vm'
668

    
669
The above commnd will create a new VM for user
670
`7cf4d078-67bf-424d-8ff2-8669eb4841ea` in the Ganeti backend with ID 2. By
671
default this command will issue a Ganeti job to create the VM
672
(`OP_INSTANCE_CREATE`) and return. As in other commands, the `--wait=True`
673
option can be used in order to wait for the successful completion of the job.
674

    
675
`snf-manage server-list` command can be used to list all the available servers.
676
The command supports some useful options, like listing servers of a user,
677
listing servers that exist in a Ganeti backend and listing deleted servers.
678
Also, as in most of `*-list` commands, the `--filter-by` option can be used to
679
filter the results. For example, the following command will only display the
680
started servers of a specific flavor:
681

    
682
.. code-block:: console
683

    
684
 $ snf-manage server-list --filter-by="operstate=STARTED,flavor=<flavor_id>"
685

    
686
Another very useful command is the `server-inspect` command which will display
687
all available information about the state of the server in DB and the state
688
of the server in the Ganeti backend. The output will give you an easy overview
689
about the state of the VM which can be useful for debugging.
690

    
691
Also the administrator can `suspend` a user's VM, using the `server-modify`
692
command:
693

    
694
.. code-block:: console
695

    
696
 $ snf-manage server-modify --suspended=True <server_id>
697

    
698
The user is forbidden to do any action on an administratively suspended VM,
699
which is useful for abuse cases.
700

    
701
Ganeti backends
702
~~~~~~~~~~~~~~~
703

    
704
Since v0.11, Synnefo is able to manage multiple Ganeti clusters (backends)
705
making it capable to scale linearly to tens of thousands of VMs. Backends
706
can be dynamically added or removed via `snf-manage` commands.
707

    
708
Each newly created VM is allocated to a Ganeti backend by the Cyclades backend
709
allocator. The VM is "pinned" to this backend, and can not change through its
710
lifetime. The backend allocator decides in which backend to spawn the VM based
711
on the available resources of each backend, trying to balance the load between
712
them. Also, Networks are created to all Ganeti backends, in order to ensure
713
that VMs residing on different backends can be connected to the same networks.
714

    
715
A backend can be marked as `drained` in order to be excluded from automatic
716
servers allocation and not receive new servers. Also, a backend can be marked
717
as `offline` to denote that the backend is not healthy (e.g. broken master)
718
and avoid the penalty of connection timeouts.
719

    
720
Finally, Cyclades is able to manage Ganeti backends with different enabled
721
hypervisors (`kvm`, `xen`), and different enabled disk templates.
722

    
723
Listing existing backends
724
`````````````````````````
725
To list all the Ganeti backends known to Synnefo, we run:
726

    
727
.. code-block:: console
728

    
729
   $ snf-manage backend-list
730

    
731
Adding a new Ganeti backend
732
```````````````````````````
733
Backends are dynamically added under the control of Synnefo with `snf-manage
734
backend-add` command. In this section it is assumed that a Ganeti cluster,
735
named ``cluster.example.com`` is already up and running and configured to be
736
able to host Synnefo VMs.
737

    
738
To add this Ganeti cluster, we run:
739

    
740
.. code-block:: console
741

    
742
   $ snf-manage backend-add --clustername=cluster.example.com --user="synnefo_user" --pass="synnefo_pass"
743

    
744
where ``clustername`` is the Cluster hostname of the Ganeti cluster, and
745
``user`` and ``pass`` are the credentials for the `Ganeti RAPI user
746
<http://docs.ganeti.org/ganeti/2.2/html/rapi.html#users-and-passwords>`_.  All
747
backend attributes can be also changed dynamically using the `snf-manage
748
backend-modify` command.
749

    
750
``snf-manage backend-add`` will also create all existing public networks to
751
the new backend. You can verify that the backend is added, by running
752
`snf-manage backend-list`.
753

    
754
Note that no VMs will be spawned to this backend, since by default it is in a
755
``drained`` state after addition in order to manually verify the state of the
756
backend.
757

    
758
So, after making sure everything works as expected, make the new backend active
759
by un-setting the ``drained`` flag. You can do this by running:
760

    
761
.. code-block:: console
762

    
763
   $ snf-manage backend-modify --drained=False <backend_id>
764

    
765
Allocation of VMs in Ganeti backends
766
````````````````````````````````````
767
As already mentioned, the Cyclades backend allocator is responsible for
768
allocating new VMs to backends. This allocator does not choose the exact Ganeti
769
node that will host the VM but just the Ganeti backend. The exact node is
770
chosen by the Ganeti cluster's allocator (hail).
771

    
772
The decision about which backend will host a VM is based on the available
773
resources. The allocator computes a score for each backend, that shows its load
774
factor, and the one with the minimum score is chosen. The admin can exclude
775
backends from the allocation phase by marking them as ``drained`` by running:
776

    
777
.. code-block:: console
778

    
779
   $ snf-manage backend-modify --drained=True <backend_id>
780

    
781
The backend resources are periodically updated, at a period defined by
782
the ``BACKEND_REFRESH_MIN`` setting, or by running `snf-manage
783
backend-update-status` command. It is advised to have a cron job running this
784
command at a smaller interval than ``BACKEND_REFRESH_MIN`` in order to remove
785
the load of refreshing the backends stats from the VM creation phase.
786

    
787
Finally, the admin can decide to have a user's VMs being allocated to a
788
specific backend, with the ``BACKEND_PER_USER`` setting. This is a mapping
789
between users and backends. If the user is found in ``BACKEND_PER_USER``, then
790
Synnefo allocates all his/hers VMs to the specific backend in the variable,
791
even if is marked as drained (useful for testing).
792

    
793
Allocation based on disk-templates
794
**********************************
795

    
796
Besides the available resources of each Ganeti backend, the allocator takes
797
into consideration the disk template of the instance when trying to allocate it
798
to a Ganeti backend. Specifically, the allocator checks if the flavor of the
799
instance belongs to the available disk templates of each Ganeti backend.
800

    
801
A Ganeti cluster has a list of enabled disk templates
802
(`--enabled-disk-templates`) and a list of allowed disk templates for new
803
instances (`--ipolicy-disk-templates`). See the `gnt-cluster` manpage for more
804
details about these options.
805

    
806
When Synnefo allocates an instance, it checks whether the disk template of the
807
new instance belongs both in the enabled and ipolicy disk templates. You can
808
see the list of the available disk-templates by running `snf-manage
809
backend-list`. This list should be updated automatically after changing
810
these options in Ganeti and it can also be updated by running `snf-manage
811
backend-update-status`.
812

    
813
So the administrator, can route instances on different backends based on their
814
flavor disk template, by modifying the enabled or ipolicy disk templates of
815
each backend.  Also, the administrator can route instances between different
816
nodes of the same Ganeti backend, by modifying the same options at the
817
nodegroup level (see `gnt-group` manpage for mor details).
818

    
819
Removing an existing Ganeti backend
820
```````````````````````````````````
821
In order to remove an existing backend from Synnefo, you must first make
822
sure that there are not active servers in the backend, and then run:
823

    
824
.. code-block:: console
825

    
826
   $ snf-manage backend-remove <backend_id>
827

    
828

    
829
Virtual Networks
830
~~~~~~~~~~~~~~~~
831

    
832
Cyclades also implements the Network service and exposes the Quantum Openstack
833
API. Cyclades supports full IPv4 and IPv6 connectivity to the public internet
834
for it's VMs. Also, Cyclades provides L2 and L3 virtual private networks,
835
giving the user freedom to create arbitraty network topologies of
836
interconnected VMs.
837

    
838
Public networking is desployment specific and must be customized based on the
839
specific needs of the system administrator. Private virtual networks can be
840
provided by different network technologies which are exposed as different
841
network flavors. For better understanding of networking please refer to the
842
:ref:`Network <networks>` section.
843

    
844
A Cyclades virtual network is an isolated Layer-2 broadcast domain. A network
845
can also have an associated IPv4 and IPv6 subnet representing the Layer-3
846
characteristics of the network. Each subnet represents an IP address block
847
that is used in order to assign addresses to VMs.
848

    
849
To connect a VM to a network, a port must be created, which represent a virtual
850
port on a network switch. VMs are connected to networks by attaching a virtual
851
interface to a port.
852

    
853
Cyclades also supports `floating IPs`, which are public IPv4 addresses that
854
can dynamically(hotplug-able) be added and removed to VMs. Floating IPs are
855
a quotable resource that is allocated to each user. Unlike other cloud
856
platforms, floating IPs are not implemented using 1-1 NAT to a ports private
857
IP. Instead, floating IPs are directly assigned to virtual interfaces of VMs.
858

    
859
Exactly like VMS, networks can be handled as Ganeti networks via `gnt-network`
860
commands. All Ganeti networks that belong to Synnefo are named with the prefix
861
`${BACKEND_PREFIX_ID}-net-`. Also, there are a number of `snf-manage` commands
862
for handling of `networks`, `subnets`, `ports` and `floating IPs`. Below
863
we will present a use case scenario using some of these commands. For better
864
understanding of these commands, refer to their help messages.
865

    
866
Create a virtual private network for user
867
`7cf4d078-67bf-424d-8ff2-8669eb4841ea` using the `PHYSICAL_VLAN` flavor, which
868
means that the network will be uniquely assigned a phsyical VLAN. The network
869
is assigned an IPv4 subnet, described by it's CIDR and gateway. Also,
870
the `--dhcp=True` option is used, to make `nfdhcpd` response to DHCP queries
871
from VMs.
872

    
873
.. code-block:: console
874

    
875
 $ snf-manage network-create --owner=7cf4d078-67bf-424d-8ff2-8669eb4841ea --name=prv_net-1 \
876
    --subnet=192.168.2.0/24 --gateway=192.168.2.1 --dhcp=True --flavor=PHYSICAL_VLAN
877

    
878
Inspect the state of the network in Cyclades DB and in all the Ganeti backends:
879

    
880
.. code-block:: console
881

    
882
  $ snf-manage network-inspect <network_id>
883

    
884
Inspect the state of the network's subnet, containg an overview of the
885
subnet's IPv4 address allocation pool:
886

    
887
.. code-block:: console
888

    
889
  $ snf-manage subnet-inspect <subnet_id>
890

    
891
Connect a VM to the created private network. The port will be automatically
892
be assigned an IPv4 address from one of the network's available IPs. This
893
command will result in sending an `OP_INSTANCE_MODIFY` Ganeti command and
894
attaching a NIC to the specified Ganeti instance.
895

    
896
.. code-block:: console
897

    
898
 $ snf-manage port-create --network=<network_id> --server=<server_id>
899

    
900
Inspect the state of the the port in Cyclades DB and in the Ganeti backend:
901

    
902
.. code-block:: console
903

    
904
 $ snf-manage port-inspect <port_id>
905

    
906
Disconnect the VM from the network and delete the network:
907

    
908
.. code-block:: console
909

    
910
 $ snf-manage port-remove <port_id>
911
 $ snf-manage network-remove <network_id>
912

    
913

    
914
Enabling DHCP
915
`````````````
916

    
917
When connecting a VM to a network, Cyclades will automatically assign an IPv4
918
address from the IPv4 or/and IPv6 subnets of the network. If the network has
919
no subnets, then it will not be assigned any IP address.
920

    
921
If the network has DHCP enabled, then `nfdhcpd` daemon, which must be running
922
on all Ganeti nodes, will respond to DHCP queries from VMs and assign to them
923
the IP address that was allocated by Cyclades. DCHP can be enabled/disabled
924
using the `--dhcp` option of `network-create` command.
925

    
926

    
927
Public network connectivity
928
```````````````````````````
929

    
930
Since v0.14, users are able to dynamically connect and disconnect their VMs
931
from public networks. In order to do that, they have to use a `floating IP`.
932
Floating IPs are basically public IPv4 addresses that can be dynamically
933
attached and detached from VMs. The user creates a floating IP address from a
934
network that has set the `floating_ip_pool` attribute. The floating IP is
935
accounted to the user, who can then connect his VMs to public networks by
936
creating ports that they are using this floating IP. Performing this work-flow
937
from `snf-manage` would look like this:
938

    
939
.. code-block:: console
940

    
941
 $ snf-manage network-list --filter-by="floating_ip_pool=True"
942
 id      name  user.uuid   state  public  subnet.ipv4  gateway.ipv4  drained  floating_ip_pool
943
 ---------------------------------------------------------------------------------------------
944
  1  Internet       None  ACTIVE    True  10.2.1.0/24      10.2.1.1    False              True
945

    
946
 $ snf-manage floating-ip-create --owner=7cf4d078-67bf-424d-8ff2-8669eb4841ea --network=1
947

    
948
 $ snf-manage floating-ip-list --user=7cf4d078-67bf-424d-8ff2-8669eb4841ea
949
 id   address       network                             user.uuid  server
950
 ------------------------------------------------------------------------
951
 38  10.2.1.2             1  7cf4d078-67bf-424d-8ff2-8669eb4841ea      42
952

    
953
 $ snf-manage port-create --owner=7cf4d078-67bf-424d-8ff2-8669eb4841ea --network=1 \
954
                          --ipv4-address=10.2.1.2 --floating-ip=38
955

    
956
 $ snf-manage port-list --user=7cf4d078-67bf-424d-8ff2-8669eb4841ea
957
 id                            user.uuid        mac_address  network  server_id  fixed_ips   state
958
 --------------------------------------------------------------------------------------------------
959
 163 7cf4d078-67bf-424d-8ff2-8669eb4841ea  aa:00:00:45:13:98       1         77   10.2.1.2  ACTIVE
960

    
961
 $ snf-manage port-remove 163
962
 $ snf-manage floating-ip-remove 38
963

    
964
Users do not have permission to connect and disconnect VMs from public
965
networks without using a floating IP address. However, the administrator
966
have the ability to perform this tasks, using `port-create` and `port-remove`
967
commands.
968

    
969
Network connectivity for newly created servers
970
``````````````````````````````````````````````
971

    
972
When creating a virtual server, the user can specify the networks that the
973
newly created server will be connected to. Beyond this, the administrator can
974
define a list of networks that every new server will be forced to connect to.
975
For example, you can enforce all VMs to be connected to a public network
976
containing a metadata server. The networks must be specified in the
977
``CYCLADES_FORCED_SERVER_NETWORKS`` that exists in the
978
``/etc/synnefo/20-snf-cyclades-app-api.conf``. For the networks in this
979
setting, no access control or quota policy are enforced!
980

    
981
Finally, the administrator can define a list of networks that new servers will
982
be connected, *if the user has not* specified networks in the request to create
983
the server. Access control and quota policy are enforced, just as if the user
984
had specified these networks. The list of these networks is defined in the
985
``CYCLADES_DEFAULT_SERVER_NETWORKS`` that exists in the
986
``/etc/synnefo/20-snf-cyclades-app-api.conf``. This setting should only
987
be used if Cyclades are being accessed by external clients that are
988
unaware of the `Neutron API extensions` in the `Compute API`.
989

    
990
Each member of the above mentioned settings can be:
991

    
992
* a network UUID
993
* a tuple of network UUIDs: the server will be connected to only one of these
994
  networks, e.g. one that has a free IPv4 address
995
* `SNF:ANY_PUBLIC_IPV4`: the server will be connected to any network with
996
  an IPv4 subnet defined
997
* `SNF:ANY_PUBLIC_IPV6`: the server will be connected to any network with
998
  only an IPv6 subnet defined.
999
* `SNF:ANY_PUBLIC`: the server will be connected to any public network.
1000

    
1001
Public IP accounting
1002
````````````````````
1003

    
1004
There are many use cases, e.g. abuse ports, where you need to find which user
1005
or which server had a public IP address. For this reason, Cyclades keeps track
1006
usage of public IPv4/IPv6 addresses. Specifically, it keeps the date and time
1007
that each public IP address was allocated and released from a virtual server.
1008
This information can be found using `ip-list` command:
1009

    
1010
.. code-block:: console
1011

    
1012
 $ snf-manage ip-list
1013

    
1014
 Show usage of a specific address:
1015
 $ snf-manage ip-list --address=192.168.2.1
1016

    
1017
 Show public IPs of a specific server:
1018
 $ snf-manage ip-list --server=<server_id>
1019

    
1020

    
1021
Managing Network Resources
1022
``````````````````````````
1023

    
1024
Proper operation of the Cyclades Network Service depends on the unique
1025
assignment of specific resources to each type of virtual network. Specifically,
1026
these resources are:
1027

    
1028
* IP addresses. Cyclades creates a Pool of IPs for each Network, and assigns a
1029
  unique IP address to each VM, thus connecting it to this Network. You can see
1030
  the IP pool of each network by running `snf-manage subnet-inspect
1031
  <subnet_ID>`. IP pools are automatically created and managed by Cyclades,
1032
  depending on the subnet of the Network.
1033
* Bridges corresponding to physical VLANs, which are required for networks of
1034
  type `PRIVATE_PHYSICAL_VLAN`.
1035
* One Bridge corresponding to one physical VLAN which is required for networks of
1036
  type `PRIVATE_MAC_PREFIX`.
1037

    
1038
IPv4 addresses
1039
**************
1040

    
1041
An allocation pool of IPv4 addresses is automatically created for every network
1042
with an IPv4 subnet. By default, the allocation pool contains the range of IP
1043
addresses that are included in the subnet, except from the gateway and the
1044
broadcast address of the network. The range of IP addresses can be restricted
1045
using the `--allocation-pool` option of `snf-manage network-create` command.
1046
The admin can externally reserve IP addresses to exclude them from automatic
1047
allocation with the `--add-reserved-ips` option of `snf-manage network-modify`
1048
command. For example the following command will reserve two IP addresses from
1049
network with ID `42`:
1050

    
1051
.. code-block:: console
1052

    
1053
 snf-manage network-modify --add-reserved-ips=10.0.0.21,10.0.0.22 42
1054

    
1055
.. warning:: Externally reserving IP addresses is also available at the Ganeti.
1056
 However, when using Cyclades with multiple Ganeti backends, the handling of
1057
 IP pools must be performed from Cyclades!
1058

    
1059
Bridges
1060
*******
1061

    
1062
As already mentioned Cyclades use a pool of Bridges that must correspond
1063
to Physical VLAN at the Ganeti level. A bridge from the pool is assigned to
1064
each network of flavor `PHYSICAL_VLAN`. Creation of this pool is done
1065
using `snf-manage pool-create` command. For example the following command
1066
will create a pool containing the brdiges from `prv1` to `prv21`.
1067

    
1068
.. code-block:: console
1069

    
1070
   # snf-manage pool-create --type=bridge --base=prv --size=20
1071

    
1072
You can verify the creation of the pool, and check its contents by running:
1073

    
1074
.. code-block:: console
1075

    
1076
   # snf-manage pool-list
1077
   # snf-manage pool-show --type=bridge 1
1078

    
1079
Finally you can use the `pool-modify` management command in order to externally
1080
reserve the values from pool, extend or shrink the pool if possible.
1081

    
1082
MAC Prefixes
1083
************
1084

    
1085
Cyclades also use a pool of MAC prefixes to assign to networks of flavor
1086
`MAC_FILTERED`. Handling of this pool is done exactly as with pool of bridges,
1087
except that the type option must be set to mac-prefix:
1088

    
1089
.. code-block:: console
1090

    
1091
   # snf-manage pool-create --type=mac-prefix --base=aa:00:0 --size=65536
1092

    
1093
The above command will create a pool of MAC prefixes from ``aa:00:1`` to
1094
``b9:ff:f``. The MAC prefix pool is responsible for providing only unicast and
1095
locally administered MAC addresses, so many of these prefixes will be
1096
externally reserved, to exclude from allocation.
1097

    
1098
Quotas
1099
~~~~~~
1100

    
1101
Handling of quotas for Cyclades resources is powered by Astakos quota
1102
mechanism. During registration of Cyclades service to Astakos, the Cyclades
1103
resources are also imported to Astakos for accounting and presentation.
1104

    
1105
Upon a request that will result in a resource creation or removal, Cyclades
1106
will communicate with Astakos to ensure that user quotas are within limits and
1107
update the corresponding usage. If a limit is reached, the request will be
1108
denied with an `overLimit(413)` fault.
1109

    
1110
The resources that are exported by Cyclades are the following:
1111

    
1112
* `cyclades.vm`: Number of virtual machines
1113
* `cyclades.total_cpu`: Number of virtual machine processors
1114
* `cyclades.cpu`: Number of virtual machine processors of running VMs
1115
* `cyclades.total_ram`: Virtual machine memory size
1116
* `cyclades.ram`: Virtual machine memory size of running VMs
1117
* `cyclades.disk`: Virtual machine disk size
1118
* `cyclades.floating_ip`: Number of floating IP addresses
1119
* `cyclades.network.private`: Number of private virtual networks
1120

    
1121
Cyclades advanced operations
1122
----------------------------
1123

    
1124
Reconciliation mechanism
1125
~~~~~~~~~~~~~~~~~~~~~~~~
1126

    
1127
Cyclades - Ganeti reconciliation
1128
````````````````````````````````
1129

    
1130
On certain occasions, such as a Ganeti or RabbitMQ failure, the state of
1131
Cyclades database may differ from the real state of VMs and networks in the
1132
Ganeti backends. The reconciliation process is designed to synchronize the
1133
state of the Cyclades DB with Ganeti. There are two management commands for
1134
reconciling VMs and Networks that will detect stale, orphans and out-of-sync
1135
VMs and networks. To fix detected inconsistencies, use the `--fix-all`.
1136

    
1137
.. code-block:: console
1138

    
1139
  $ snf-manage reconcile-servers
1140
  $ snf-manage reconcile-servers --fix-all
1141

    
1142
  $ snf-manage reconcile-networks
1143
  $ snf-manage reconcile-networks --fix-all
1144

    
1145
Please see ``snf-manage reconcile-servers --help`` and ``snf-manage
1146
reconcile--networks --help`` for all the details.
1147

    
1148

    
1149
Cyclades - Astakos reconciliation
1150
`````````````````````````````````
1151

    
1152
As already mentioned, Cyclades communicates with Astakos for resource
1153
accounting and quota enforcement. In rare cases, e.g. unexpected
1154
failures, the two services may get unsynchronized. For this reason there
1155
are the `reconcile-commissions-cyclades` and `reconcile-resources-cyclades`
1156
command that will synchronize the state of the two services. The first
1157
command will detect any pending commissions, while the second command will
1158
detect that the usage that is reported by Astakos is correct.
1159
To fix detected inconsistencies, use the `--fix` option.
1160

    
1161
.. code-block:: console
1162

    
1163
  $ snf-manage reconcile-commissions-cyclades
1164
  $ snf-manage reconcile-commissions-cyclades --fix
1165

    
1166
  $ snf-manage reconcile-resources-cyclades
1167
  $ snf-manage reconcile-resources-cyclades --fix
1168

    
1169

    
1170
Cyclades resources reconciliation
1171
`````````````````````````````````
1172

    
1173
Reconciliation of pools will check the consistency of available pools by
1174
checking that the values from each pool are not used more than once, and also
1175
that the only reserved values in a pool are the ones used. Pool reconciliation
1176
will check pools of bridges, MAC prefixes, and IPv4 addresses for all networks.
1177
To fix detected inconsistencies, use the `--fix` option.
1178

    
1179

    
1180
.. code-block:: console
1181

    
1182
  $ snf-manage reconcile-pools
1183
  $ snf-manage reconcile-pools --fix
1184

    
1185
.. _admin-guide-stats:
1186

    
1187
VM stats collecting
1188
~~~~~~~~~~~~~~~~~~~
1189

    
1190
snf-cyclades-gtools comes with a collectd plugin to collect CPU and network
1191
stats for Ganeti VMs and an example collectd configuration. snf-stats-app is a
1192
Django (snf-webproject) app that serves the VM stats graphs by reading the VM
1193
stats (from RRD files) and serves graphs.
1194

    
1195
The snf-stats-app was originally written by `GRNET NOC <http://noc.grnet.gr>`_
1196
as a WSGI Python app and was ported to a Synnefo (snf-webproject) app.
1197

    
1198
snf-stats-app configuration
1199
```````````````````````````
1200

    
1201
The snf-stats-app node should have collectd installed. The collectd
1202
configuration should enable the network plugin, assuming the server role, and
1203
the RRD plugin / backend, to store the incoming stats. Your
1204
``/etc/collectd/collectd.conf`` should look like:
1205

    
1206
.. code-block:: console
1207

    
1208
    FQDNLookup true
1209
    LoadPlugin syslog
1210
    <Plugin syslog>
1211
        LogLevel info
1212
    </Plugin>
1213

    
1214
    LoadPlugin network
1215
    LoadPlugin rrdtool
1216
    <Plugin network>
1217
        TimeToLive 128
1218
        <Listen "okeanos.io" "25826">
1219
            SecurityLevel "Sign"
1220
            AuthFile "/etc/collectd/passwd"
1221
        </Listen>
1222

    
1223
        ReportStats false
1224
        MaxPacketSize 65535
1225
    </Plugin>
1226

    
1227

    
1228
    <Plugin rrdtool>
1229
        DataDir "/var/lib/collectd/rrd"
1230
        CacheTimeout 120
1231
        CacheFlush 900
1232
        WritesPerSecond 30
1233
        RandomTimeout 0
1234
    </Plugin>
1235

    
1236
    Include "/etc/collectd/filters.conf"
1237
    Include "/etc/collectd/thresholds.conf"
1238

    
1239

    
1240
An example collectd config file is provided in
1241
``/usr/share/doc/snf-stats-app/examples/stats-colletcd.conf``.
1242

    
1243
The recommended deployment is to run snf-stats-app using gunicorn with an
1244
Apache2 or nginx reverse proxy (using the same configuration as the other
1245
Synnefo services / apps). An example gunicorn config file is provided in
1246
``/usr/share/doc/snf-stats-app/examples/stats.gunicorn``.
1247

    
1248
Make sure to edit the settings under
1249
``/etc/synnefo/20-snf-stats-app-settings.conf`` to match your deployment.
1250
More specifically, you should change the ``STATS_BASE_URL`` setting (refer
1251
to previous documentation on the BASE_URL settings used by the other Synnefo
1252
services / apps) and the ``RRD_PREFIX`` and ``GRAPH_PREFIX`` settings.
1253

    
1254
You should also set the ``STATS_SECRET_KEY`` to a random string and make sure
1255
it's the same at the ``CYCLADES_STATS_SECRET_KEY`` on the Cyclades host (see
1256
below).
1257

    
1258
``RRD_PREFIX`` is the directory where collectd stores the RRD files. The
1259
default setting matches the default RRD directory for the collectd RRDtool
1260
plugin. In a more complex setup, the collectd daemon could run on a separate
1261
host and export the RRD directory to the snf-stats-app node via e.g. NFS.
1262

    
1263
``GRAPH_PREFIX`` is the directory where collectd stores the resulting
1264
stats graphs. You should create it manually, in case it doesn't exist.
1265

    
1266
.. code-block::
1267

    
1268
    # mkdir /var/cache/snf-stats-app/
1269
    # chown www-data:wwwdata /var/cache/snf-stats-app/
1270

    
1271
The snf-stats-app will typically run as the ``www-data`` user. In that case,
1272
make sure that the ``www-data`` user should have read access to the
1273
``RRD_PREFIX`` directory and read / write access to the ``GRAPH_PREFIX``
1274
directory.
1275

    
1276
snf-stats-app, based on the ``STATS_BASE_URL`` setting will export the
1277
following URL 'endpoints`:
1278
 * CPU stats bar: ``STATS_BASE_URL``/v1.0/cpu-bar/<encrypted VM hostname>
1279
 * Network stats bar: ``STATS_BASE_URL``/v1.0/net-bar/<encrypted VM hostname>
1280
 * CPU stats daily graph: ``STATS_BASE_URL``/v1.0/cpu-ts/<encrypted VM hostname>
1281
 * Network stats daily graph: ``STATS_BASE_URL``/v1.0/net-ts/<encrypted VM hostname>
1282
 * CPU stats weekly graph: ``STATS_BASE_URL``/v1.0/cpu-ts-w/<encrypted VM hostname>
1283
 * Network stats weekly graph: ``STATS_BASE_URL``/v1.0/net-ts-w/<encrypted VM hostname>
1284

    
1285
You can verify that these endpoints are exported by issuing:
1286

    
1287
.. code-block::
1288

    
1289
    # snf-manage show_urls
1290

    
1291
snf-cyclades-gtools configuration
1292
`````````````````````````````````
1293

    
1294
To enable VM stats collecting, you will need to:
1295
 * Install collectd on the every Ganeti (VM-capable) node.
1296
 * Enable the Ganeti stats plugin in your collectd configuration. This can be
1297
   achived by either copying the example collectd conf file that comes with
1298
   snf-cyclades-gtools
1299
   (``/usr/share/doc/snf-cyclades-gtools/examples/ganeti-stats-collectd.conf``)
1300
   or by adding the following line to your existing (or default) collectd
1301
   conf file:
1302

    
1303
       Include /etc/collectd/ganeti-stats.conf
1304

    
1305
   In the latter case, make sure to configure collectd to send the collected
1306
   stats to your collectd server (via the network plugin). For more details on
1307
   how to do this, check the collectd example config file provided by the
1308
   package and the collectd documentation.
1309

    
1310
snf-cyclades-app configuration
1311
``````````````````````````````
1312

    
1313
At this point, stats collecting should be enabled and working. You can check
1314
that everything is ok by checking the contents of ``/var/lib/collectd/rrd/``
1315
directory (it will gradually get populated with directories containing RRD
1316
files / stats for every Synnefo instances).
1317

    
1318
You should also check that gunicorn and Apache2 are configured correctly by
1319
accessing the graph URLs for a VM (whose stats have been populated in
1320
``/var/lib/collectd/rrd``).
1321

    
1322
Cyclades uses the ``CYCLADES_STATS_SECRET_KEY`` setting in
1323
``20-snf-cyclades-app`` to encrypt the instance hostname in the stats graph
1324
URL. This settings should be set to a random value and match the
1325
``STATS_SECRET_KEY`` on the Stats host.
1326

    
1327
Cyclades (snf-cyclades-app) fetches the stat graphs for VMs based on four
1328
settings in ``20-snf-cyclades-app-api.conf``. The settings are:
1329

    
1330
 * CPU_BAR_GRAPH_URL = 'https://stats.host/stats/v1.0/cpu-bar/%s'
1331
 * CPU_TIMESERIES_GRAPH_URL = 'https://stats.host/stats/v1.0/cpu-ts/%s'
1332
 * NET_BAR_GRAPH_URL = 'https://stats.host/stats/v1.0/net-bar/%s'
1333
 * NET_TIMESERIES_GRAPH_URL = 'https://stats.host/stats/v1.0/net-ts/%s'
1334

    
1335
Make sure that you change this settings to match your ``STATS_BASE_URL``
1336
(and generally the Apache2 / gunicorn deployment on your stats host).
1337

    
1338
Cyclades will pass these URLs to the Cyclades UI and the user's browser will
1339
fetch them when needed.
1340

    
1341

    
1342
Helpdesk
1343
--------
1344

    
1345
Helpdesk application provides the ability to view the virtual servers and
1346
networks of all users, along with the ability to perform some basic actions
1347
like administratively suspending a server. You can perform look-ups by
1348
user UUID or email, by server ID (vm-$id) or by an IPv4 address.
1349

    
1350
If you want to activate the helpdesk application you can set to `True` the
1351
`HELPDESK_ENABLED` setting. Access to helpdesk views (under
1352
`$BASE_URL/helpdesk`) is only to allowed to users that belong to Astakos
1353
groups defined in the `HELPDESK_PERMITTED_GROUPS` setting, which by default
1354
contains the `helpdesk` group. For example, to allow <user_id>
1355
to access helpdesk view, you should run the following command in the Astakos
1356
node:
1357

    
1358
.. code-block:: console
1359

    
1360
 snf-manage group-add helpdesk
1361
 snf-manage user-modify --add-group=helpdesk <user_id>
1362

    
1363

    
1364
Cyclades internals
1365
------------------
1366

    
1367
Asynchronous communication with Ganeti backends
1368
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1369
Synnefo uses Google Ganeti backends for VM cluster management. In order for
1370
Cyclades to be able to handle thousands of user requests, Cyclades and Ganeti
1371
communicate asynchronously. Briefly, requests are submitted to Ganeti through
1372
Ganeti's RAPI/HTTP interface, and then asynchronous notifications about the
1373
progress of Ganeti jobs are being created and pushed upwards to Cyclades. The
1374
architecture and communication with a Ganeti backend is shown in the graph
1375
below:
1376

    
1377
.. image:: images/cyclades-ganeti-communication.png
1378
   :width: 50%
1379
   :target: _images/cyclades-ganeti-communication.png
1380

    
1381
The Cyclades API server is responsible for handling user requests. Read-only
1382
requests are directly served by looking up the Cyclades DB. If the request
1383
needs an action in the Ganeti backend, Cyclades submit jobs to the Ganeti
1384
master using the `Ganeti RAPI interface
1385
<http://docs.ganeti.org/ganeti/2.2/html/rapi.html>`_.
1386

    
1387
While Ganeti executes the job, `snf-ganeti-eventd`, and `snf-progress-monitor`
1388
are monitoring the progress of the job and send corresponding messages to the
1389
RabbitMQ servers. These components are part of `snf-cyclades-gtools` and must
1390
be installed on all Ganeti nodes. Specially:
1391

    
1392
* *snf-ganeti-eventd* sends messages about operations affecting the operating
1393
  state of instances and networks. Works by monitoring the Ganeti job queue.
1394
* *snf-progress_monitor* sends messages about the progress of the Image deployment
1395
  phase which is done by the Ganeti OS Definition `snf-image`.
1396

    
1397
Finally, `snf-dispatcher` consumes messages from the RabbitMQ queues, processes
1398
these messages and properly updates the state of the Cyclades DB. Subsequent
1399
requests to the Cyclades API, will retrieve the updated state from the DB.
1400

    
1401

    
1402
List of all Synnefo components
1403
==============================
1404

    
1405
They are also available from our apt repository: ``apt.dev.grnet.gr``
1406

    
1407
 * `snf-common <http://www.synnefo.org/docs/snf-common/latest/index.html>`_
1408
 * `snf-webproject <http://www.synnefo.org/docs/snf-webproject/latest/index.html>`_
1409
 * `snf-astakos-app <http://www.synnefo.org/docs/astakos/latest/index.html>`_
1410
 * `snf-pithos-backend <http://www.synnefo.org/docs/pithos/latest/backends.html>`_
1411
 * `snf-pithos-app <http://www.synnefo.org/docs/pithos/latest/index.html>`_
1412
 * `snf-pithos-webclient <http://www.synnefo.org/docs/pithos-webclient/latest/index.html>`_
1413
 * `snf-cyclades-app <http://www.synnefo.org/docs/snf-cyclades-app/latest/index.html>`_
1414
 * `snf-cyclades-gtools <http://www.synnefo.org/docs/snf-cyclades-gtools/latest/index.html>`_
1415
 * `astakosclient <http://www.synnefo.org/docs/astakosclient/latest/index.html>`_
1416
 * `snf-vncauthproxy <https://code.grnet.gr/projects/vncauthproxy>`_
1417
 * `snf-image <http://www.synnefo.org/docs/snf-image/latest/index.html/>`_
1418
 * `snf-image-creator <http://www.synnefo.org/docs/snf-image-creator/latest/index.html>`_
1419
 * `snf-occi <http://www.synnefo.org/docs/snf-occi/latest/index.html>`_
1420
 * `snf-cloudcms <http://www.synnefo.org/docs/snf-cloudcms/latest/index.html>`_
1421
 * `nfdhcpd <https://code.grnet.gr/projects/nfdhcpd>`_
1422

    
1423

    
1424
Synnefo management commands ("snf-manage")
1425
==========================================
1426

    
1427
Each Synnefo service, Astakos, Pithos and Cyclades are controlled by the
1428
administrator using the "snf-manage" admin tool. This tool is an extension of
1429
the Django command-line management utility. It is run on the host that runs
1430
each service and provides different types of commands depending the services
1431
running on the host. If you are running more than one service on the same host
1432
"snf-manage" adds all the corresponding commands for each service dynamically,
1433
providing a unified admin environment.
1434

    
1435
To run "snf-manage" you just type:
1436

    
1437
.. code-block:: console
1438

    
1439
   # snf-manage <command> [arguments]
1440

    
1441
on the corresponding host that runs the service. For example, if you have all
1442
services running on different physical hosts you would do:
1443

    
1444
.. code-block:: console
1445

    
1446
   root@astakos-host # snf-manage <astakos-command> [argument]
1447
   root@pithos-host # snf-manage <pithos-command> [argument]
1448
   root@cyclades-host # snf-manage <cyclades-command> [argument]
1449

    
1450
If you have all services running on the same host you would do:
1451

    
1452
.. code-block:: console
1453

    
1454
   root@synnefo-host # snf-manage <{astakos,pithos,cyclades}-command> [argument]
1455

    
1456
Note that you cannot execute a service's command on a host that is not running
1457
this service. For example, the following will return an error if Astakos and
1458
Cyclades are installed on different physical hosts:
1459

    
1460
.. code-block:: console
1461

    
1462
   root@astakos-host # snf-manage <cyclades-command> [argument]
1463
   Unknown command: 'cyclades-command'
1464
   Type 'snf-manage help' for usage.
1465

    
1466
This is the complete list of "snf-manage" commands for each service.
1467

    
1468
Astakos snf-manage commands
1469
---------------------------
1470

    
1471
============================  ===========================
1472
Name                          Description
1473
============================  ===========================
1474
fix-superusers                Transform superusers created by syncdb into AstakosUser instances
1475
cleanup-full                  Cleanup sessions and session catalog
1476
commission-list               List pending commissions
1477
commission-show               Show details for a pending commission
1478
component-add                 Register a component
1479
component-list                List components
1480
component-modify              Modify component attributes
1481
component-show                Show component details
1482
project-control               Manage projects and applications
1483
project-list                  List projects
1484
project-show                  Show project details
1485
quota-list                    List user quota
1486
quota-verify                  Check the integrity of user quota
1487
reconcile-resources-astakos   Reconcile resource usage of Quotaholder with Astakos DB
1488
resource-list                 List resources
1489
resource-modify               Modify a resource's default base quota and boolean flags
1490
service-export-astakos        Export Astakos services and resources in JSON format
1491
service-import                Register services
1492
service-list                  List services
1493
service-show                  Show service details
1494
term-add                      Add approval terms
1495
user-activation-send          Send user activation
1496
user-add                      Add user
1497
authpolicy-add                Create a new authentication provider policy profile
1498
authpolicy-list               List existing authentication provider policy profiles
1499
authpolicy-remove             Remove an authentication provider policy
1500
authpolicy-set                Assign an existing authentication provider policy profile to a user or group
1501
authpolicy-show               Show authentication provider profile details
1502
group-add                     Create a group with the given name
1503
group-list                    List available groups
1504
user-list                     List users
1505
user-modify                   Modify user
1506
user-show                     Show user details
1507
oauth2-client-add             Create an oauth2 client
1508
oauth2-client-list            List oauth2 clients
1509
oauth2-client-remove          Remove an oauth2 client along with its registered redirect urls
1510
============================  ===========================
1511

    
1512
Pithos snf-manage commands
1513
--------------------------
1514

    
1515
============================  ===========================
1516
Name                          Description
1517
============================  ===========================
1518
reconcile-commissions-pithos  Display unresolved commissions and trigger their recovery
1519
service-export-pithos         Export Pithos services and resources in JSON format
1520
reconcile-resources-pithos    Detect unsynchronized usage between Astakos and Pithos DB resources and synchronize them if specified so.
1521
file-show                     Display object information
1522
============================  ===========================
1523

    
1524
Cyclades snf-manage commands
1525
----------------------------
1526

    
1527
============================== ===========================
1528
Name                           Description
1529
============================== ===========================
1530
backend-add                    Add a new Ganeti backend
1531
backend-list                   List backends
1532
backend-modify                 Modify a backend
1533
backend-update-status          Update backend statistics for instance allocation
1534
backend-remove                 Remove a Ganeti backend
1535
enforce-resources-cyclades     Check and fix quota violations for Cyclades resources
1536
server-create                  Create a new server
1537
server-show                    Show server details
1538
server-list                    List servers
1539
server-modify                  Modify a server
1540
server-import                  Import an existing Ganeti VM into synnefo
1541
server-inspect                 Inspect a server in DB and Ganeti
1542
network-create                 Create a new network
1543
network-list                   List networks
1544
network-modify                 Modify a network
1545
network-inspect                Inspect network state in DB and Ganeti
1546
network-remove                 Delete a network
1547
flavor-create                  Create a new flavor
1548
flavor-list                    List flavors
1549
flavor-modify                  Modify a flavor
1550
image-list                     List images
1551
image-show                     Show image details
1552
pool-create                    Create a bridge or mac-prefix pool
1553
pool-show                      Show pool details
1554
pool-list                      List pools
1555
pool-modify                    Modify a pool
1556
pool-remove                    Delete a pool
1557
port-create                    Create a port connecting a server to a network
1558
port-inspect                   Inspect the state of a port in DB and Ganeti
1559
port-list                      List ports
1560
port-remove                    Delete a port
1561
floating-ip-create             Create a new floating IP
1562
floating-ip-attach             Attach a floating IP to a server
1563
floating-ip-detach             Detach a floating IP from a server
1564
floating-ip-list               List floating IPs
1565
floating-ip-remove             Delete a floating IP
1566
queue-inspect                  Inspect the messages of a RabbitMQ queue
1567
queue-retry                    Resend messages from Dead Letter queues to original exchanges
1568
service-export-cyclades        Export Cyclades services and resources in JSON format
1569
subnet-create                  Create a subnet
1570
subnet-inspect                 Inspect a subnet in DB
1571
subnet-list                    List subnets
1572
subnet-modify                  Modify a subnet
1573
reconcile-servers              Reconcile servers of Synnefo DB with state of Ganeti backend
1574
reconcile-networks             Reconcile networks of Synnefo DB with state of Ganeti backend
1575
reconcile-pools                Check consistency of pool resources
1576
reconcile-commissions-cyclades Detect and resolve pending commissions to Quotaholder
1577
reconcile-resources-cyclades   Reconcile resource usage of Astakos with Cyclades DB.
1578
============================== ===========================
1579

    
1580

    
1581
Astakos helper scripts
1582
======================
1583

    
1584
Astakos includes two scripts to facilitate the installation procedure.
1585
Running:
1586

    
1587
.. code-block:: console
1588

    
1589
   snf-component-register [<component_name>]
1590

    
1591
automates the registration of the standard Synnefo components (astakos,
1592
cyclades, and pithos) in astakos database. It internally uses the script:
1593

    
1594
.. code-block:: console
1595

    
1596
   snf-service-export <component_name> <base_url>
1597

    
1598
which simulates the export of service and resource definitions of the
1599
standard Synnefo components.
1600

    
1601

    
1602
Pithos managing accounts
1603
========================
1604

    
1605
Pithos provides a utility tool for managing accounts.
1606
To run you just type:
1607

    
1608
.. code-block:: console
1609

    
1610
   # pithos-manage-accounts <command> [arguments]
1611

    
1612
This is the list of the available commands:
1613

    
1614
============================  ===========================
1615
Name                          Description
1616
============================  ===========================
1617
delete                        Remove an account from the Pithos DB
1618
export-quota                  Export account quota in a file
1619
list                          List existing/dublicate accounts
1620
merge                         Move an account contents in another account
1621
set-container-quota           Set container quota for all or a specific account
1622
============================  ===========================
1623

    
1624

    
1625
The "kamaki" API client
1626
=======================
1627

    
1628
To upload, register or modify an image you will need the **kamaki** tool.
1629
Before proceeding make sure that it is configured properly. Verify that
1630
*image.url*, *file.url*, *user.url* and *token* are set as needed:
1631

    
1632
.. code-block:: console
1633

    
1634
   $ kamaki config list
1635

    
1636
To change a setting use ``kamaki config set``:
1637

    
1638
.. code-block:: console
1639

    
1640
   $ kamaki config set image.url https://cyclades.example.com/image
1641
   $ kamaki config set file.url https://pithos.example.com/v1
1642
   $ kamaki config set user.url https://accounts.example.com
1643
   $ kamaki config set token ...
1644

    
1645
To test that everything works, try authenticating the current account with
1646
kamaki:
1647

    
1648
.. code-block:: console
1649

    
1650
  $ kamaki user authenticate
1651

    
1652
This will output user information.
1653

    
1654
Upload Image
1655
------------
1656

    
1657
By convention, images are stored in a container called ``images``. Check if the
1658
container exists, by listing all containers in your account:
1659

    
1660
.. code-block:: console
1661

    
1662
   $ kamaki file list
1663

    
1664
If the container ``images`` does not exist, create it:
1665

    
1666
.. code-block:: console
1667

    
1668
  $ kamaki file create images
1669

    
1670
You are now ready to upload an image to container ``images``. You can upload it
1671
with a Pithos client, or use kamaki directly:
1672

    
1673
.. code-block:: console
1674

    
1675
   $ kamaki file upload ubuntu.iso images
1676

    
1677
You can use any Pithos client to verify that the image was uploaded correctly,
1678
or you can list the contents of the container with kamaki:
1679

    
1680
.. code-block:: console
1681

    
1682
  $ kamaki file list images
1683

    
1684
The full Pithos URL for the previous example will be
1685
``pithos://u53r-un1qu3-1d/images/ubuntu.iso`` where ``u53r-un1qu3-1d`` is the
1686
unique user id (uuid).
1687

    
1688
Register Image
1689
--------------
1690

    
1691
To register an image you will need to use the full Pithos URL. To register as
1692
a public image the one from the previous example use:
1693

    
1694
.. code-block:: console
1695

    
1696
   $ kamaki image register Ubuntu pithos://u53r-un1qu3-1d/images/ubuntu.iso --public
1697

    
1698
The ``--public`` flag is important, if missing the registered image will not
1699
be listed by ``kamaki image list``.
1700

    
1701
Use ``kamaki image register`` with no arguments to see a list of available
1702
options. A more complete example would be the following:
1703

    
1704
.. code-block:: console
1705

    
1706
   $ kamaki image register Ubuntu pithos://u53r-un1qu3-1d/images/ubuntu.iso \
1707
            --public --disk-format diskdump --property kernel=3.1.2
1708

    
1709
To verify that the image was registered successfully use:
1710

    
1711
.. code-block:: console
1712

    
1713
   $ kamaki image list --name-like=ubuntu
1714

    
1715

    
1716
Miscellaneous
1717
=============
1718

    
1719
.. _branding:
1720

    
1721
Branding
1722
--------
1723

    
1724
Since Synnefo v0.14, you are able to adapt the Astakos, Pithos and Cyclades Web
1725
UI to your company’s visual identity. This is possible using the snf-branding
1726
component, which is automatically installed on the nodes running the API
1727
servers for Astakos, Pithos and Cyclades.
1728

    
1729
Configuration
1730
~~~~~~~~~~~~~
1731

    
1732
This can be done by modifing the settings provided by the snf-branding component
1733
to match your service identity. The settings for the snf-branding application
1734
can be found inside the configuration file ``/etc/synnefo/15-snf-branding.conf``
1735
on the nodes that have Astakos, Pithos and Cyclades installed.
1736

    
1737
By default, the global service name is "Synnefo" and the company name is
1738
"GRNET". These names and their respective logos and URLs are used throughout
1739
the Astakos, Pithos and Cyclades UI.
1740

    
1741
**Names and URLs:**
1742

    
1743
The first group of branding customization refers to the service's and company's
1744
information.
1745

    
1746
You can overwrite the company and the service name and URL respectively by
1747
uncommenting and setting the following:
1748

    
1749
.. code-block:: python
1750

    
1751
  # setting used in Astakos Dashboard/Projects pages
1752
  BRANDING_SERVICE_NAME = 'My cloud'
1753
  BRANDING_SERVICE_URL = 'http://www.mycloud.synnefo.org/'
1754

    
1755
  # settings used in Astakos, Pithos, Cyclades footer only if
1756
  # BRANDING_SHOW_COPYRIGHT is set to True
1757
  BRANDING_SHOW_COPYRIGHT = True
1758
  BRANDING_COMPANY_NAME = 'Company LTD'
1759
  BRANDING_COMPANY_URL = 'https://www.company-ltd.synnefo.org/'
1760

    
1761

    
1762
**Copyright and footer options:**
1763

    
1764
By default, no Copyright message is shown in the UI footer. If you want to make
1765
it visible in the footer of Astakos, Pithos and Cyclades UI, you can uncomment
1766
and set to ``True`` the ``BRANDING_SHOW_COPYRIGHT`` setting:
1767

    
1768
.. code-block:: python
1769

    
1770
  #BRANDING_SHOW_COPYRIGHT = False
1771

    
1772
Copyright message defaults to 'Copyright (c) 2011-<current_year>
1773
<BRANDING_COMPANY_NAME>.' but you can overwrite it to a completely custom one by
1774
setting the following option:
1775

    
1776
.. code-block:: python
1777

    
1778
  BRANDING_COPYRIGHT_MESSAGE = 'Copyright (c) 2011-2013 GRNET'
1779

    
1780
If you want to include a custom message in the footer, you can uncomment and
1781
set the ``BRANDING_FOOTER_EXTRA_MESSAGE`` setting. You can use html markup.
1782
Your custom message will appear  above Copyright message at the Compute
1783
templates and the Dashboard UI.
1784

    
1785
.. code-block:: python
1786

    
1787
  #BRANDING_FOOTER_EXTRA_MESSAGE = ''
1788

    
1789

    
1790
**Images:**
1791

    
1792
The Astakos, Pithos and Cyclades Web UI has some logos and images.
1793

    
1794
The branding-related images are presented in  the following table:
1795

    
1796
===============  ============================  =========
1797
Image            Name/extension  convention    Usage
1798
===============  ============================  =========
1799
Favicon          favicon.ico                   Favicon for all services
1800
Dashboard logo   dashboard_logo.png            Visible in all Astakos UI pages
1801
Compute logo     compute_logo.png              Visible in all Cyclades UI pages
1802
Console logo     console_logo.png              Visible in the Cyclades Console Window
1803
Storage logo     storage_logo.png              Visible in all Pithos UI pages
1804
===============  ============================  =========
1805

    
1806
There are two methods  available for replacing all, or individual,
1807
branding-related images:
1808

    
1809
1. Create a new directory inside ``/usr/share/synnefo/static/`` (e.g.
1810
   ``mybranding``) and place there some or all of your images.
1811

    
1812
   If you want to replace all of your images, keep the name/extension
1813
   conventions as indicated in the above table and change the
1814
   ``BRANDING_IMAGE_MEDIA_URL`` setting accordingly:
1815

    
1816
   .. code-block:: python
1817

    
1818
      # using relative path
1819
      BRANDING_IMAGE_MEDIA_URL= '/static/mybranding/images/'
1820

    
1821
      # or if you already host them in a separate domain (e.g. cdn)
1822
      BRANDING_IMAGE_MEDIA_URL= 'https://cdn.synnefo.org/branding/images/'
1823

    
1824

    
1825
   If you wish to replace individual images, **do not uncomment**
1826
   ``BRANDING_IMAGE_MEDIA_URL``, but instead provide a relative path, pointing to
1827
   the file inside your directory for each ``BRANDING_<image>_URL`` that you wish
1828
   to replace.
1829

    
1830
2. Upload some or all of your images to a server and replace each
1831
   ``BRANDING_<image>_URL`` with the absolute url of the image (i.e.
1832
   ``BRANDING_DASHBOARD_URL = 'https://www.synnefo.com/images/my_dashboard.jpg'``).
1833

    
1834
   Note that the alternative text  for each image tag inside html documents is
1835
   alt=“BRANDING_SERVICE_NAME {Dashboard, Compute. Console, Storage}” respectively.
1836

    
1837
.. note:: Retina optimized images:
1838

    
1839
   Synnefo UI is optimized for Retina displays. As far as images are concerned,
1840
   `retina.js <http://retinajs.com/>`_ is used.
1841

    
1842
   Retina.js checks each image on a page to see if there is a high-resolution
1843
   version of that image on your server. If a high-resolution variant exists,
1844
   the script will swap in that image in-place.
1845

    
1846
   The script assumes you use  `Apple's prescribed high-resolution modifier (@2x)
1847
   <http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/
1848
   DrawingPrintingiOS/SupportingHiResScreensInViews/SupportingHiResScreensInViews
1849
   .html#//apple_ref/doc/uid/TP40010156-CH15-SW1>`_ to denote high-resolution
1850
   image variants on your server.
1851

    
1852
   For each of the images that you wish the script to  replace, you must have a
1853
   high-resolution variant in the same folder  named correctly and it will be
1854
   detected automatically. For example if your image is in <my_directory> and is
1855
   named "my_image.jpg" the script will look in the same directory for an image
1856
   named "my_image@2x.jpg".
1857

    
1858
   In case that you don’t want to use a high-resolution image, the
1859
   normal-resolution image will be visible.
1860

    
1861
More branding
1862
~~~~~~~~~~~~~
1863

    
1864
Although, it is not 100% branding-related, further verbal customization is
1865
feasible.
1866

    
1867
**EMAILS**
1868

    
1869
The output of all email `*`.txt files will be already customized to contain your
1870
company and service names but you can further alter their content if you feel it
1871
best fits your needs as simple as creasynnefo template.
1872

    
1873
In order to overwrite one or more email-templates you need to place your
1874
modified <email-file>.txt files respecting the following structure:
1875

    
1876
  **/etc/synnefo/templates/**
1877
      **im/**
1878
          | activation_email.txt
1879
          | email.txt
1880
          | invitation.txt
1881
          | switch_accounts_email.txt
1882
          | welcome_email.txt
1883
          **projects/**
1884
              | project_approval_notification.txt
1885
              | project_denial_notification.txt
1886
              | project_membership_change_notification.txt
1887
              | project_membership_enroll_notification.txt
1888
              | project_membership_leave_request_notification.txt
1889
              | project_membership_request_notification.txt
1890
              | project_suspension_notification.txt
1891
              | project_termination_notification.txt
1892
      **registration/**
1893
          | email_change_email.txt
1894
          | password_email.txt
1895

    
1896
Feel free to omit any of the above files you do not wish to overwrite.
1897

    
1898
Below is a list of all emails sent by Synnefo to users along with a short
1899
description and a link to their content:
1900

    
1901
* ``snf-astakos-app/astakos/im/templates/im/email.txt``
1902
  Base email template. Contains a contact email and a “thank you” message.
1903
  (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/email.txt>`_)
1904
* ``snf-astakos-app/astakos/im/templates/im/activation_email.txt`` Email sent to
1905
  user that prompts  him/her to click on a link provided to activate the account.
1906
  Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/activation_email.txt>`_)
1907
* ``snf-astakos-app/astakos/im/templates/im/invitation.txt`` Email sent to an
1908
  invited user. He/she has to click on a link provided to activate the account.
1909
  Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/invitation.txt>`_)
1910
* ``snf-astakos-app/astakos/im/templates/im/switch_accounts_email.txt`` Email
1911
  sent to user upon his/her request to associate this email address with a
1912
  shibboleth account. He/she has to click on a link provided to activate the
1913
  association. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/switch_accounts_email.txt>`_)
1914
* ``snf-astakos-app/astakos/im/templates/im/welcome_email.txt`` Email sent to
1915
  inform the user that his/ her account has been activated. Extends “email.txt”
1916
  (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/welcome_email.txt>`_)
1917
* ``snf-astakos-app/astakos/im/templates/registration/email_change_email.txt``
1918
  Email sent to user when he/she has requested new email address assignment. The
1919
  user has to click on a link provided to validate this action. Extends
1920
  “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/registration/email_change_email.txt>`_)
1921
* ``snf-astakos-app/astakos/im/templates/registration/password_email.txt`` Email
1922
  sent for resetting password purpose. The user has to click on a link provided
1923
  to validate this action. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/registration/password_email.txt>`_)
1924
* ``snf-astakos-app/astakos/im/templates/im/projects/project_approval_notification.txt``
1925
  Informs  the project owner that his/her project has been approved. Extends
1926
  “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_approval_notification.txt>`_)
1927
* ``snf-astakos-app/astakos/im/templates/im/projects/project_denial_notification.txt``
1928
  Informs the project owner that his/her  project application has been denied
1929
  explaining the reasons. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_denial_notification.txt>`_)
1930
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_change_notification.txt``
1931
  An email is sent to a user containing information about his project membership
1932
  (whether he has been accepted, rejected or removed). Extends “email.txt” (`Link
1933
  <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_membership_change_notification.txt>`_)
1934
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_enroll_notification.txt``
1935
  Informs a user that he/she  has been enrolled to a project. Extends
1936
  “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_membership_enroll_notification.txt>`_)
1937
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_leave_request_notification.txt``
1938
  An email is sent to the project owner to make him aware of a  user having
1939
  requested to leave his project. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_membership_leave_request_notification.txt>`_)
1940
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_request_notification.txt``
1941
  An email is sent to the project owner to make him/her aware of a user having
1942
  requested to join  his project. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_membership_request_notification.txt>`_)
1943
* ``snf-astakos-app/astakos/im/templates/im/projects/project_suspension_notification.txt``
1944
  An email is sent to the project owner to make him/her aware of his/her project
1945
  having been suspended. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_suspension_notification.txt>`_)
1946
* ``snf-astakos-app/astakos/im/templates/im/projects/project_termination_notification.txt``
1947
  An email is sent to the project owner to make him/her aware of his/her project
1948
  having been terminated. Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_termination_notification.txt>`_)
1949

    
1950
.. warning:: Django templates language:
1951

    
1952
  If you choose to  overwrite these email templates, be mindful of the necessary
1953
  information contained in django template variables that must not be omitted,
1954
  such as the activation link for activating one’s account and many more.
1955
  These variables are contained into {{}} inside the templates.
1956

    
1957

    
1958
.. RabbitMQ
1959

    
1960
RabbitMQ Broker
1961
---------------
1962

    
1963
Queue nodes run the RabbitMQ sofware, which provides AMQP functionality. To
1964
guarantee high-availability, more than one Queue nodes should be deployed, each
1965
of them belonging to the same `RabbitMQ cluster
1966
<http://www.rabbitmq.com/clustering.html>`_. Synnefo uses the RabbitMQ
1967
active/active `High Available Queues <http://www.rabbitmq.com/ha.html>`_ which
1968
are mirrored between two nodes within a RabbitMQ cluster.
1969

    
1970
The RabbitMQ nodes that form the cluster, are declared to Synnefo through the
1971
`AMQP_HOSTS` setting. Each time a Synnefo component needs to connect to
1972
RabbitMQ, one of these nodes is chosen in a random way. The client that Synnefo
1973
uses to connect to RabbitMQ, handles connection failures transparently and
1974
tries to reconnect to a different node. As long as one of these nodes are up
1975
and running, functionality of Synnefo should not be downgraded by the RabbitMQ
1976
node failures.
1977

    
1978
All the queues that are being used are declared as durable, meaning that
1979
messages are persistently stored to RabbitMQ, until they get successfully
1980
processed by a client.
1981

    
1982
Currently, RabbitMQ is used by the following components:
1983

    
1984
* `snf-ganeti-eventd` and `snf-progress-monitor`:
1985
  These components send messages concerning the status and progress of
1986
  jobs in the Ganeti backend.
1987
* `snf-dispatcher`: This daemon, consumes the messages that are sent from
1988
  the above components, and updates the Cyclades DB accordingly.
1989

    
1990

    
1991
Installation
1992
~~~~~~~~~~~~
1993

    
1994
Please check the RabbitMQ documentation which covers extensively the
1995
`installation of RabbitMQ server <http://www.rabbitmq.com/download.html>`_ and
1996
the setup of a `RabbitMQ cluster <http://www.rabbitmq.com/clustering.html>`_.
1997
Also, check out the `web management plugin
1998
<http://www.rabbitmq.com/management.html>`_ that can be useful for managing and
1999
monitoring RabbitMQ.
2000

    
2001
For a basic installation of RabbitMQ on two nodes (node1 and node2) you can do
2002
the following:
2003

    
2004
On both nodes, install rabbitmq-server and create a Synnefo user:
2005

    
2006
.. code-block:: console
2007

    
2008
  $ apt-get install rabbitmq-server
2009
  $ rabbitmqctl add_user synnefo "example_pass"
2010
  $ rabbitmqctl set_permissions synnefo  ".*" ".*" ".*"
2011

    
2012
Also guarantee that both nodes share the same cookie, by running:
2013

    
2014
.. code-block:: console
2015

    
2016
  $ scp node1:/var/lib/rabbitmq/.erlang.cookie node2:/var/lib/rabbitmq/.erlang.cookie
2017

    
2018
and restart the nodes:
2019

    
2020
.. code-block:: console
2021

    
2022
  $ /etc/init.d/rabbitmq-server restart
2023

    
2024

    
2025
To setup the RabbitMQ cluster run:
2026

    
2027
.. code-block:: console
2028

    
2029
  root@node2: rabbitmqctl stop_app
2030
  root@node2: rabbitmqctl reset
2031
  root@node2: rabbitmqctl cluster rabbit@node1 rabbit@node2
2032
  root@node2: rabbitmqctl start_app
2033

    
2034
You can verify that the cluster is set up correctly by running:
2035

    
2036
.. code-block:: console
2037

    
2038
  root@node2: rabbitmqctl cluster_status
2039

    
2040

    
2041
Logging
2042
-------
2043

    
2044
Logging in Synnefo is using Python's logging module. The module is configured
2045
using dictionary configuration, whose format is described here:
2046

    
2047
http://docs.python.org/release/2.7.1/library/logging.html#logging-config-dictschema
2048

    
2049
The logging configuration dictionary is defined in
2050
``/etc/synnefo/10-snf-webproject-logging.conf``
2051

    
2052
The administrator can have logging control by modifying the ``LOGGING_SETUP``
2053
dictionary, and defining subloggers with different handlers and log levels.
2054

    
2055

    
2056
.. _scale-up:
2057

    
2058
Scaling up to multiple nodes
2059
============================
2060

    
2061
Here we will describe how should a large scale Synnefo deployment look like. Make
2062
sure you are familiar with Synnefo and Ganeti before proceeding with this section.
2063
This means you should at least have already set up successfully a working Synnefo
2064
deployment as described in the :ref:`Admin's Installation Guide
2065
<quick-install-admin-guide>` and also read the Administrator's Guide until this
2066
section.
2067

    
2068
Graph of a scale-out Synnefo deployment
2069
---------------------------------------
2070

    
2071
Each box in the following graph corresponds to a distinct physical node:
2072

    
2073
.. image:: images/synnefo-arch2-roles.png
2074
   :width: 100%
2075
   :target: _images/synnefo-arch2-roles.png
2076

    
2077
The above graph is actually the same with the one at the beginning of this
2078
:ref:`guide <admin-guide>`, with the only difference that here we show the
2079
Synnefo roles of each physical node. These roles are described in the
2080
following section.
2081

    
2082
.. _physical-node-roles:
2083

    
2084
Physical Node roles
2085
-------------------
2086

    
2087
As appears in the previous graph, a scale-out Synnefo deployment consists of
2088
multiple physical nodes that have the following roles:
2089

    
2090
* **WEBSERVER**: A web server running in front of gunicorn (e.g.: Apache, nginx)
2091
* **ASTAKOS**: The Astakos application (gunicorn)
2092
* **ASTAKOS_DB**: The Astakos database (postgresql)
2093
* **PITHOS**: The Pithos application (gunicorn)
2094
* **PITHOS_DB**: The Pithos database (postgresql)
2095
* **CYCLADES**: The Cyclades application (gunicorn)
2096
* **CYCLADES_DB**: The Cyclades database (postgresql)
2097
* **MQ**: The message queue (RabbitMQ)
2098
* **GANETI_MASTER**: The Ganeti master of a Ganeti cluster
2099
* **GANETI_NODE** : A VM-capable Ganeti node of a Ganeti cluster
2100

    
2101
You will probably also have:
2102

    
2103
* **CMS**: The CMS used as a frotend portal for the Synnefo services
2104
* **NS**: A nameserver serving all other Synnefo nodes and resolving Synnefo FQDNs
2105
* **CLIENT**: A machine that runs the Synnefo clients (e.g.: kamaki, Web UI),
2106
              most of the times, the end user's local machine
2107

    
2108
From this point we will also refer to the following groups of roles:
2109

    
2110
* **SYNNEFO**: [ **ASTAKOS**, **ASTAKOS_DB**, **PITHOS**, **PITHOS_DB**, **CYCLADES**, **CYCLADES_DB**, **MQ**, **CMS**]
2111
* **G_BACKEND**: [**GANETI_MASTER**, **GANETI_NODE**]
2112

    
2113
Of course, when deploying Synnefo you can combine multiple of the above roles on a
2114
single physical node, but if you are trying to scale out, the above separation
2115
gives you significant advantages.
2116

    
2117
So, in the next section we will take a look on what components you will have to
2118
install on each physical node depending on its Synnefo role. We assume the graph's
2119
architecture.
2120

    
2121
Components for each role
2122
------------------------
2123

    
2124
When deploying Synnefo in large scale, you need to install different Synnefo
2125
or/and third party components on different physical nodes according to their
2126
Synnefo role, as stated in the previous section.
2127

    
2128
Specifically:
2129

    
2130
Role **WEBSERVER**
2131
    * Synnefo components: `None`
2132
    * 3rd party components: Apache
2133
Role **ASTAKOS**
2134
    * Synnefo components: `snf-webproject`, `snf-astakos-app`
2135
    * 3rd party components: Django, Gunicorn
2136
Role **ASTAKOS_DB**
2137
    * Synnefo components: `None`
2138
    * 3rd party components: PostgreSQL
2139
Role **PITHOS**
2140
    * Synnefo components: `snf-webproject`, `snf-pithos-app`, `snf-pithos-webclient`
2141
    * 3rd party components: Django, Gunicorn
2142
Role **PITHOS_DB**
2143
    * Synnefo components: `None`
2144
    * 3rd party components: PostgreSQL
2145
Role **CYCLADES**
2146
    * Synnefo components: `snf-webproject`, `snf-cyclades-app`, `snf-vncauthproxy`
2147
    * 3rd party components: Django Gunicorn
2148
Role **CYCLADES_DB**
2149
    * Synnefo components: `None`
2150
    * 3rd party components: PostgreSQL
2151
Role **MQ**
2152
    * Synnefo components: `None`
2153
    * 3rd party components: RabbitMQ
2154
Role **GANETI_MASTER**
2155
    * Synnefo components: `snf-cyclades-gtools`
2156
    * 3rd party components: Ganeti
2157
Role **GANETI_NODE**
2158
    * Synnefo components: `snf-cyclades-gtools`, `snf-network`, `snf-image`, `nfdhcpd`
2159
    * 3rd party components: Ganeti
2160
Role **CMS**
2161
    * Synnefo components: `snf-webproject`, `snf-cloudcms`
2162
    * 3rd party components: Django, Gunicorn
2163
Role **NS**
2164
    * Synnefo components: `None`
2165
    * 3rd party components: BIND
2166
Role **CLIENT**
2167
    * Synnefo components: `kamaki`, `snf-image-creator`
2168
    * 3rd party components: `None`
2169

    
2170
Example scale out installation
2171
------------------------------
2172

    
2173
In this section we describe an example of a medium scale installation which
2174
combines multiple roles on 10 different physical nodes. We also provide a
2175
:ref:`guide <i-synnefo>` to help with such an install.
2176

    
2177
We assume that we have the following 10 physical nodes with the corresponding
2178
roles:
2179

    
2180
Node1:
2181
    **WEBSERVER**, **ASTAKOS**
2182
      Guide sections:
2183
        * :ref:`apt <i-apt>`
2184
        * :ref:`gunicorn <i-gunicorn>`
2185
        * :ref:`apache <i-apache>`
2186
        * :ref:`snf-webproject <i-webproject>`
2187
        * :ref:`snf-astakos-app <i-astakos>`
2188
Node2:
2189
    **WEBSERVER**, **PITHOS**
2190
      Guide sections:
2191
        * :ref:`apt <i-apt>`
2192
        * :ref:`gunicorn <i-gunicorn>`
2193
        * :ref:`apache <i-apache>`
2194
        * :ref:`snf-webproject <i-webproject>`
2195
        * :ref:`snf-pithos-app <i-pithos>`
2196
        * :ref:`snf-pithos-webclient <i-pithos>`
2197
Node3:
2198
    **WEBSERVER**, **CYCLADES**
2199
      Guide sections:
2200
        * :ref:`apt <i-apt>`
2201
        * :ref:`gunicorn <i-gunicorn>`
2202
        * :ref:`apache <i-apache>`
2203
        * :ref:`snf-webproject <i-webproject>`
2204
        * :ref:`snf-cyclades-app <i-cyclades>`
2205
        * :ref:`snf-vncauthproxy <i-cyclades>`
2206
Node4:
2207
    **WEBSERVER**, **CMS**
2208
      Guide sections:
2209
        * :ref:`apt <i-apt>`
2210
        * :ref:`gunicorn <i-gunicorn>`
2211
        * :ref:`apache <i-apache>`
2212
        * :ref:`snf-webproject <i-webproject>`
2213
        * :ref:`snf-cloudcms <i-cms>`
2214
Node5:
2215
    **ASTAKOS_DB**, **PITHOS_DB**, **CYCLADES_DB**
2216
      Guide sections:
2217
        * :ref:`apt <i-apt>`
2218
        * :ref:`postgresql <i-db>`
2219
Node6:
2220
    **MQ**
2221
      Guide sections:
2222
        * :ref:`apt <i-apt>`
2223
        * :ref:`rabbitmq <i-mq>`
2224
Node7:
2225
    **GANETI_MASTER**, **GANETI_NODE**
2226
      Guide sections:
2227
        * :ref:`apt <i-apt>`
2228
        * :ref:`general <i-backends>`
2229
        * :ref:`ganeti <i-ganeti>`
2230
        * :ref:`snf-cyclades-gtools <i-gtools>`
2231
        * :ref:`snf-network <i-network>`
2232
        * :ref:`snf-image <i-image>`
2233
        * :ref:`nfdhcpd <i-network>`
2234
Node8:
2235
    **GANETI_NODE**
2236
      Guide sections:
2237
        * :ref:`apt <i-apt>`
2238
        * :ref:`general <i-backends>`
2239
        * :ref:`ganeti <i-ganeti>`
2240
        * :ref:`snf-cyclades-gtools <i-gtools>`
2241
        * :ref:`snf-network <i-network>`
2242
        * :ref:`snf-image <i-image>`
2243
        * :ref:`nfdhcpd <i-network>`
2244
Node9:
2245
    **GANETI_NODE**
2246
      Guide sections:
2247
        `Same as Node8`
2248
Node10:
2249
    **GANETI_NODE**
2250
      Guide sections:
2251
        `Same as Node8`
2252

    
2253
All sections: :ref:`Scale out Guide <i-synnefo>`
2254

    
2255

    
2256
Upgrade Notes
2257
=============
2258

    
2259
.. toctree::
2260
   :maxdepth: 1
2261

    
2262
   v0.12 -> v0.13 <upgrade/upgrade-0.13>
2263
   v0.13 -> v0.14 <upgrade/upgrade-0.14>
2264
   v0.14 -> v0.14.2 <upgrade/upgrade-0.14.2>
2265
   v0.14.5 -> v0.14.6 <upgrade/upgrade-0.14.6>
2266
   v0.14.7 -> v0.14.8 <upgrade/upgrade-0.14.8>
2267
   v0.14.9 -> v0.14.10 <upgrade/upgrade-0.14.10>
2268
   v0.14 -> v0.15 <upgrade/upgrade-0.15>
2269

    
2270

    
2271
Changelog, NEWS
2272
===============
2273

    
2274

    
2275
* v0.14.10 :ref:`Changelog <Changelog-0.14.10>`, :ref:`NEWS <NEWS-0.14.10>`
2276
* v0.14.9 :ref:`Changelog <Changelog-0.14.9>`, :ref:`NEWS <NEWS-0.14.9>`
2277
* v0.14.8 :ref:`Changelog <Changelog-0.14.8>`, :ref:`NEWS <NEWS-0.14.8>`
2278
* v0.14.7 :ref:`Changelog <Changelog-0.14.7>`, :ref:`NEWS <NEWS-0.14.7>`
2279
* v0.14.6 :ref:`Changelog <Changelog-0.14.6>`, :ref:`NEWS <NEWS-0.14.6>`
2280
* v0.14.5 :ref:`Changelog <Changelog-0.14.5>`, :ref:`NEWS <NEWS-0.14.5>`
2281
* v0.14.4 :ref:`Changelog <Changelog-0.14.4>`, :ref:`NEWS <NEWS-0.14.4>`
2282
* v0.14.3 :ref:`Changelog <Changelog-0.14.3>`, :ref:`NEWS <NEWS-0.14.3>`
2283
* v0.14.2 :ref:`Changelog <Changelog-0.14.2>`, :ref:`NEWS <NEWS-0.14.2>`
2284
* v0.14 :ref:`Changelog <Changelog-0.14>`, :ref:`NEWS <NEWS-0.14>`
2285
* v0.13 :ref:`Changelog <Changelog-0.13>`, :ref:`NEWS <NEWS-0.13>`