Statistics
| Branch: | Tag: | Revision:

root / docs / admin-guide.rst @ 4573511a

History | View | Annotate | Download (72.1 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

    
304
In 20-snf-astakos-app-settings.conf, 
305
uncomment the default setting ``ASTAKOS_SERVICES``
306
and customize the ``'uplimit'`` values.
307
These are the default base quota for all users.
308

    
309
To apply your configuration run::
310

    
311
    # snf-manage astakos-init --load-service-resources
312
    # snf-manage quota --sync
313

    
314
Set base quota for individual users
315
```````````````````````````````````
316

    
317
For individual users that need different quota than the default
318
you can set it for each resource like this::
319

    
320
    # use this to display quota / uuid
321
    # snf-manage user-show 'uuid or email' --quota
322

    
323
    # snf-manage user-modify 'user-uuid' --set-base-quota 'cyclades.vm' 10
324

    
325

    
326
Enable the Projects feature
327
~~~~~~~~~~~~~~~~~~~~~~~~~~~
328

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

    
333
    # this will make the 'projects' page visible in the dashboard
334
    ASTAKOS_PROJECTS_VISIBLE = True
335

    
336
You can change the maximum allowed number of pending project applications
337
per user with::
338

    
339
    # snf-manage resource-modify astakos.pending_app --limit <number>
340

    
341
You can also set a user-specific limit with::
342

    
343
    # snf-manage user-modify 'user-uuid' --set-base-quota 'astakos.pending_app' 5
344

    
345
When users apply for projects they are not automatically granted
346
the resources. They must first be approved by the administrator.
347

    
348
To list pending project applications in astakos::
349

    
350
    # snf-manage project-list --pending
351

    
352
Note the last column, the application id. To approve it::
353

    
354
    # <app id> from the last column of project-list
355
    # snf-manage project-control --approve <app id>
356

    
357
To deny an application::
358

    
359
    # snf-manage project-control --deny <app id>
360

    
361
Users designated as *project admins* can approve, deny, or modify
362
an application through the web interface. In
363
``20-snf-astakos-app-settings.conf`` set::
364

    
365
    # UUIDs of users that can approve or deny project applications from the web.
366
    ASTAKOS_PROJECT_ADMINS = [<uuid>, ...]
367

    
368

    
369
Astakos advanced operations
370
---------------------------
371

    
372
Adding "Terms of Use"
373
~~~~~~~~~~~~~~~~~~~~~
374

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

    
379
.. code-block:: console
380

    
381
   <h1>My cloud service terms</h1>
382

    
383
   These are the example terms for my cloud service
384

    
385
Then, add those terms-of-use with the snf-manage command:
386

    
387
.. code-block:: console
388

    
389
   $ snf-manage term-add /usr/share/synnefo/sample-terms.html
390

    
391
Your terms have been successfully added and you will see the corresponding link
392
appearing in the Astakos web pages' footer.
393

    
394
During the account registration, if there are approval terms, the user is
395
presented with an "I agree with the Terms" checkbox that needs to get checked
396
in order to proceed.
397

    
398
In case there are new approval terms that the user has not signed yet, the
399
``signed_terms_required`` view decorator redirects to the ``approval_terms``
400
view, so the user will be presented with the new terms the next time he/she
401
logins.
402

    
403
Enabling reCAPTCHA
404
~~~~~~~~~~~~~~~~~~
405

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

    
413
.. code-block:: console
414

    
415
   ASTAKOS_RECAPTCHA_PUBLIC_KEY = 'example_recaptcha_public_key!@#$%^&*('
416
   ASTAKOS_RECAPTCHA_PRIVATE_KEY = 'example_recaptcha_private_key!@#$%^&*('
417

    
418
   ASTAKOS_RECAPTCHA_ENABLED = True
419

    
420
Restart the service on the Astakos node(s) and you are ready:
421

    
422
.. code-block:: console
423

    
424
   # /etc/init.d/gunicorn restart
425

    
426
Checkout your new Sign up page. If you see the reCAPTCHA box, you have setup
427
everything correctly.
428

    
429

    
430
Astakos internals
431
-----------------
432

    
433
X-Auth-Token
434
~~~~~~~~~~~~
435

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

    
446
.. _authentication-label:
447

    
448
Django Auth methods and Backends
449
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
450

    
451
Astakos incorporates Django user authentication system and extends its User model.
452

    
453
Since username field of django User model has a limitation of 30 characters,
454
AstakosUser is **uniquely** identified by the ``email`` instead. Therefore,
455
``astakos.im.authentication_backends.EmailBackend`` is served to authenticate a
456
user using email if the first argument is actually an email, otherwise tries
457
the username.
458

    
459
A new AstakosUser instance is assigned with a uui as username and also with a
460
``auth_token`` used by the cloud services to authenticate the user.
461
``astakos.im.authentication_backends.TokenBackend`` is also specified in order
462
to authenticate the user using the email and the token fields.
463

    
464
Logged on users can perform a number of actions:
465

    
466
 * access and edit their profile via: ``/im/profile``.
467
 * change their password via: ``/im/password``
468
 * send feedback for grnet services via: ``/im/send_feedback``
469
 * logout (and delete cookie) via: ``/im/logout``
470

    
471
Internal Astakos requests are handled using cookie-based Django user sessions.
472

    
473
External systems should forward to the ``/login`` URI. The server,
474
depending on its configuration will redirect to the appropriate login page.
475
When done with logging in, the service's login URI should redirect to the URI
476
provided with next, adding user and token parameters, which contain the email
477
and token fields respectively.
478

    
479
The login URI accepts the following parameters:
480

    
481
======================  =========================
482
Request Parameter Name  Value
483
======================  =========================
484
next                    The URI to redirect to when the process is finished
485
renew                   Force token renewal (no value parameter)
486
force                   Force logout current user (no value parameter)
487
======================  =========================
488

    
489
External systems inside the ``ASTAKOS_COOKIE_DOMAIN`` scope can acquire the
490
user information by the cookie identified by ``ASTAKOS_COOKIE_NAME`` setting
491
(set during the login procedure).
492

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

    
496

    
497

    
498
Compute/Network/Image Service (Cyclades)
499
========================================
500

    
501
Working with Cyclades
502
---------------------
503

    
504
Managing Ganeti Backends
505
~~~~~~~~~~~~~~~~~~~~~~~~
506

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

    
511
Each newly created VM is allocated to a Ganeti backend by the Cyclades backend
512
allocator. The VM is "pinned" to this backend, and can not change through its
513
lifetime. The backend allocator decides in which backend to spawn the VM based
514
on the available resources of each backend, trying to balance the load between
515
them.
516

    
517
Handling of Networks, as far as backends are concerned, is based on whether the
518
network is public or not. Public networks are created through the `snf-manage
519
network-create` command, and are only created on one backend. Private networks
520
are created on all backends, in order to ensure that VMs residing on different
521
backends can be connected to the same private network.
522

    
523
Listing existing backends
524
`````````````````````````
525
To list all the Ganeti backends known to Synnefo, we run:
526

    
527
.. code-block:: console
528

    
529
   $ snf-manage backend-list
530

    
531
Adding a new Ganeti backend
532
```````````````````````````
533
Backends are dynamically added under the control of Synnefo with `snf-manage
534
backend-add` command. In this section it is assumed that a Ganeti cluster,
535
named ``cluster.example.com`` is already up and running and configured to be
536
able to host Synnefo VMs.
537

    
538
To add this Ganeti cluster, we run:
539

    
540
.. code-block:: console
541

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

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

    
550
``snf-manage backend-add`` will also create all existing private networks to
551
the new backend. You can verify that the backend is added, by running
552
`snf-manage backend-list`.
553

    
554
Note that no VMs will be spawned to this backend, since by default it is in a
555
``drained`` state after addition and also it has no public network assigned to
556
it.
557

    
558
So, first you need to create its public network, make sure everything works as
559
expected and finally make it active by un-setting the ``drained`` flag. You can
560
do this by running:
561

    
562
.. code-block:: console
563

    
564
   $ snf-manage backend-modify --drained=False <backend_id>
565

    
566
Removing an existing Ganeti backend
567
```````````````````````````````````
568
In order to remove an existing backend from Synnefo, we run:
569

    
570
.. code-block:: console
571

    
572
   # snf-manage backend-remove <backend_id>
573

    
574
This command will fail if there are active VMs on the backend. Also, the
575
backend is not cleaned before removal, so all the Synnefo private networks
576
will be left on the Ganeti nodes. You need to remove them manually.
577

    
578
Allocation of VMs in Ganeti backends
579
````````````````````````````````````
580
As already mentioned, the Cyclades backend allocator is responsible for
581
allocating new VMs to backends. This allocator does not choose the exact Ganeti
582
node that will host the VM but just the Ganeti backend. The exact node is
583
chosen by the Ganeti cluster's allocator (hail).
584

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

    
590
.. code-block:: console
591

    
592
   $ snf-manage backend-modify --drained=True <backend_id>
593

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

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

    
606
Allocation based on disk-templates
607
**********************************
608

    
609
Besides the available resources of each Ganeti backend, the allocator takes
610
into consideration the disk template of the instance when trying to allocate it
611
to a Ganeti backend. Specifically, the allocator checks if the flavor of the
612
instance belongs to the available disk templates of each Ganeti backend.
613

    
614
A Ganeti cluster has a list of enabled disk templates
615
(`--enabled-disk-templates`) and a list of allowed disk templates for new
616
instances (`--ipolicy-disk-templates`). See the `gnt-cluster` manpage for more
617
details about these options.
618

    
619
When Synnefo allocates an instance, it checks whether the disk template of the
620
new instance belongs both in the enabled and ipolicy disk templates. You can
621
see the list of the available disk-templates by running `snf-manage
622
backend-list`. This list should be updated automatically after changing
623
these options in Ganeti and it can also be updated by running `snf-manage
624
backend-update-status`.
625

    
626
So the administrator, can route instances on different backends based on their
627
flavor disk template, by modifying the enabled or ipolicy disk templates of
628
each backend.  Also, the administrator can route instances between different
629
nodes of the same Ganeti backend, by modifying the same options at the
630
nodegroup level (see `gnt-group` manpage for mor details).
631

    
632

    
633
Managing Virtual Machines
634
~~~~~~~~~~~~~~~~~~~~~~~~~
635

    
636
As mentioned, Cyclades uses Ganeti for management of VMs. The administrator can
637
handle Cyclades VMs just like any other Ganeti instance, via `gnt-instance`
638
commands. All Ganeti instances that belong to Synnefo, are separated from
639
others, by a prefix in their names. This prefix is defined in
640
``BACKEND_PREFIX_ID`` setting in
641
``/etc/synnefo/20-snf-cyclades-app-backend.conf``.
642

    
643
Apart from handling instances directly in the Ganeti level, a number of `snf-manage`
644
commands are available:
645

    
646
* ``snf-manage server-list``: List servers
647
* ``snf-manage server-show``: Show information about a server in the Cyclades DB
648
* ``snf-manage server-inspect``: Inspect the state of a server both in DB and Ganeti
649
* ``snf-manage server-modify``: Modify the state of a server in the Cycldes DB
650
* ``snf-manage server-create``: Create a new server
651
* ``snf-manage server-import``: Import an existing Ganeti instance to Cyclades
652

    
653

    
654
Managing Virtual Networks
655
~~~~~~~~~~~~~~~~~~~~~~~~~
656

    
657
Cyclades is able to create and manage Virtual Networks. Networking is
658
desployment specific and must be customized based on the specific needs of the
659
system administrator. For better understanding of networking please refer to
660
the :ref:`Network <networks>` section.
661

    
662
Exactly as Cyclades VMs can be handled like Ganeti instances, Cyclades Networks
663
can also by handled as Ganeti networks, via `gnt-network commands`. All Ganeti
664
networks that belong to Synnefo are named with the prefix
665
`${BACKEND_PREFIX_ID}-net-`.
666

    
667
There are also the following `snf-manage` commands for managing networks:
668

    
669
* ``snf-manage network-list``: List networks
670
* ``snf-manage network-show``: Show information about a network in the Cyclades DB
671
* ``snf-manage network-inspect``: Inspect the state of the network in DB and Ganeti backends
672
* ``snf-manage network-modify``: Modify the state of a network in the Cycldes DB
673
* ``snf-manage network-create``: Create a new network
674
* ``snf-manage network-remove``: Remove an existing network
675

    
676
Managing Network Resources
677
``````````````````````````
678

    
679
Proper operation of the Cyclades Network Service depends on the unique
680
assignment of specific resources to each type of virtual network. Specifically,
681
these resources are:
682

    
683
* IP addresses. Cyclades creates a Pool of IPs for each Network, and assigns a
684
  unique IP address to each VM, thus connecting it to this Network. You can see
685
  the IP pool of each network by running `snf-manage network-inspect
686
  <network_ID>`. IP pools are automatically created and managed by Cyclades,
687
  depending on the subnet of the Network.
688
* Bridges corresponding to physical VLANs, which are required for networks of
689
  type `PRIVATE_PHYSICAL_VLAN`.
690
* One Bridge corresponding to one physical VLAN which is required for networks of
691
  type `PRIVATE_MAC_PREFIX`.
692

    
693
IPv4 addresses
694
**************
695

    
696
An allocation pool of IPv4 addresses is automatically created for every network
697
that has the attribute `dhcp` set to True. The allocation pool contains the
698
range of IP addresses that are included in the subnet. The gateway and the
699
broadcast address of the network are excluded from the allocation pool. The
700
admin can externally reserve IP addresses to exclude them from automatic
701
allocation with the `--add-reserved-ips` option of `snf-manage network-modify`
702
command. For example the following command will reserve two IP addresses
703
from network with ID `42`:
704

    
705
.. code-block:: console
706

    
707
 snf-manage network-modify --add-reserved-ips=10.0.0.21,10.0.0.22 42
708

    
709
.. warning:: Externally reserving IP addresses is also available at the Ganeti.
710
 However, when using Cyclades with multiple Ganeti backends, the handling of
711
 IP pools must be performed from Cyclades!
712

    
713
Bridges
714
*******
715

    
716
As already mentioned Cyclades use a pool of Bridges that must correspond
717
to Physical VLAN at the Ganeti level. A bridge from the pool is assigned to
718
each network of flavor `PHYSICAL_VLAN`. Creation of this pool is done
719
using `snf-manage pool-create` command. For example the following command
720
will create a pool containing the brdiges from `prv1` to `prv21`.
721

    
722
.. code-block:: console
723

    
724
   # snf-manage pool-create --type=bridge --base=prv --size=20
725

    
726
You can verify the creation of the pool, and check its contents by running:
727

    
728
.. code-block:: console
729

    
730
   # snf-manage pool-list
731
   # snf-manage pool-show --type=bridge 1
732

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

    
736
MAC Prefixes
737
************
738

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

    
743
.. code-block:: console
744

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

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

    
752
Pool reconciliation
753
*******************
754

    
755
The management command `snf-manage reconcile-pools` can be used that all the
756
above mentioned pools are consistent and that all values that come from the
757
pool are not used more than once.
758

    
759

    
760
Cyclades advanced operations
761
----------------------------
762

    
763
Reconciliation mechanism
764
~~~~~~~~~~~~~~~~~~~~~~~~
765

    
766
On certain occasions, such as a Ganeti or RabbitMQ failure, the state of
767
Cyclades database may differ from the real state of VMs and networks in the
768
Ganeti backends. The reconciliation process is designed to synchronize
769
the state of the Cyclades DB with Ganeti. There are two management commands
770
for reconciling VMs and Networks
771

    
772
Reconciling Virtual Machines
773
````````````````````````````
774

    
775
Reconciliation of VMs detects the following conditions:
776

    
777
 * Stale DB servers without corresponding Ganeti instances
778
 * Orphan Ganeti instances, without corresponding DB entries
779
 * Out-of-sync state for DB entries wrt to Ganeti instances
780

    
781
To detect all inconsistencies you can just run:
782

    
783
.. code-block:: console
784

    
785
  $ snf-manage reconcile-servers
786

    
787
Adding the `--fix-all` option, will do the actual synchronization:
788

    
789
.. code-block:: console
790

    
791
  $ snf-manage reconcile --fix-all
792

    
793
Please see ``snf-manage reconcile --help`` for all the details.
794

    
795
Reconciling Networks
796
````````````````````
797

    
798
Reconciliation of Networks detects the following conditions:
799

    
800
  * Stale DB networks without corresponding Ganeti networks
801
  * Orphan Ganeti networks, without corresponding DB entries
802
  * Private networks that are not created to all Ganeti backends
803
  * Unsynchronized IP pools
804

    
805
To detect all inconsistencies you can just run:
806

    
807
.. code-block:: console
808

    
809
  $ snf-manage reconcile-networks
810

    
811
Adding the `--fix-all` option, will do the actual synchronization:
812

    
813
.. code-block:: console
814

    
815
  $ snf-manage reconcile-networks --fix-all
816

    
817
Please see ``snf-manage reconcile-networks --help`` for all the details.
818

    
819

    
820
Cyclades internals
821
------------------
822

    
823
Asynchronous communication with Ganeti backends
824
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
825
Synnefo uses Google Ganeti backends for VM cluster management. In order for
826
Cyclades to be able to handle thousands of user requests, Cyclades and Ganeti
827
communicate asynchronously. Briefly, requests are submitted to Ganeti through
828
Ganeti's RAPI/HTTP interface, and then asynchronous notifications about the
829
progress of Ganeti jobs are being created and pushed upwards to Cyclades. The
830
architecture and communication with a Ganeti backend is shown in the graph
831
below:
832

    
833
.. image:: images/cyclades-ganeti-communication.png
834
   :width: 50%
835
   :target: _images/cyclades-ganeti-communication.png
836

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

    
843
While Ganeti executes the job, `snf-ganeti-eventd`, `snf-ganeti-hook` and
844
`snf-progress-monitor` are monitoring the progress of the job and send
845
corresponding messages to the RabbitMQ servers. These components are part
846
of `snf-cyclades-gtools` and must be installed on all Ganeti nodes. Specially:
847

    
848
* *snf-ganeti-eventd* sends messages about operations affecting the operating
849
  state of instances and networks. Works by monitoring the Ganeti job queue.
850
* *snf-ganeti_hook* sends messages about the NICs of instances. It includes a
851
  number of `Ganeti hooks <http://docs.ganeti.org/ganeti/2.2/html/hooks.html>`_
852
  for customisation of operations.
853
* *snf-progress_monitor* sends messages about the progress of the Image deployment
854
  phase which is done by the Ganeti OS Definition `snf-image`.
855

    
856
Finally, `snf-dispatcher` consumes messages from the RabbitMQ queues, processes
857
these messages and properly updates the state of the Cyclades DB. Subsequent
858
requests to the Cyclades API, will retrieve the updated state from the DB.
859

    
860

    
861

    
862
Block Storage Service (Archipelago)
863
===================================
864

    
865
Overview
866
--------
867
Archipelago offers Copy-On-Write snapshotable volumes. Pithos images can be used
868
to provision a volume with Copy-On-Write semantics (i.e. a clone). Snapshots
869
offer a unique deduplicated image of a volume, that reflects the volume state
870
during snapshot creation and are indistinguishable from a Pithos image.
871

    
872
Archipelago is used by Cyclades and Ganeti for fast provisioning of VMs based on
873
CoW volumes. Moreover, it enables live migration of thinly-provisioned VMs with
874
no physically shared storage.
875

    
876
Archipelago Architecture
877
------------------------
878

    
879
.. image:: images/archipelago-architecture.png
880
   :width: 50%
881
   :target: _images/archipelago-architecture.png
882

    
883
.. _syn+archip+rados:
884

    
885
Overview of Synnefo + Archipelago + RADOS
886
-----------------------------------------
887

    
888
.. image:: images/synnefo-arch3.png
889
   :width: 100%
890
   :target: _images/synnefo-arch3.png
891

    
892
Prereqs
893
-------
894

    
895
The administrator must initialize the storage backend where archipelago volume
896
blocks will reside.
897

    
898
In case of a files backend, the administrator must create two directories. One
899
for the archipelago data blocks and one for the archipelago map blocks. These
900
should probably be over shared storage to enable sharing archipelago volumes
901
between multiple nodes. He or she, must also be able to supply a directory where
902
the pithos data and map blocks reside.
903

    
904
In case of a RADOS backend, the administrator must create two rados pools, one
905
for data blocks, and one for the map blocks. These pools, must be the same pools
906
used in pithos, in order to enable volume creation based on pithos images.
907

    
908
Installation
909
------------
910

    
911
Archipelago consists of
912

    
913
* ``libxseg0``: libxseg used to communicate over shared memory segments
914
* ``python-xseg``: python bindings for libxseg
915
* ``archipelago-kernel-dkms``: contains archipelago kernel modules to provide
916
  block devices to be used as vm disks
917
* ``python-archipelago``: archipelago python module. Includes archipelago and
918
  vlmc functionality.
919
* ``archipelago``: user space tools and peers for the archipelago management and
920
  volume composition
921
* ``archipelago-ganeti``: ganeti ext storage scripts, that enable ganeti to
922
  provision VMs over archipelago
923

    
924
Performing
925

    
926
.. code-block:: console
927

    
928
  $ apt-get install archipelago-ganeti 
929

    
930
should fetch all the required packages and get you up 'n going with archipelago
931

    
932
Bare in mind, that custom librados is required, which is provided in the apt
933
repo of GRNet.
934

    
935

    
936
For now, librados is a dependency of archipelago, even if you do not intend to
937
use archipelago over RADOS.
938

    
939
Configuration
940
-------------
941
Archipelago should work out of the box with a RADOS backend, but basic
942
configuration can be done in ``/etc/default/archipelago`` .
943

    
944
If you wish to change the storage backend to files, set
945

    
946
.. code-block:: console
947

    
948
   STORAGE="files"
949

    
950
and provide the appropriate settings for files storage backend in the conf file.
951

    
952
These are:
953

    
954
* ``FILED_IMAGES``: directory for archipelago data blocks.
955
* ``FILED_MAPS``: directory for archipelago map blocks.
956
* ``PITHOS``: directory of pithos data blocks.
957
* ``PITHOSMAPS``: directory of pithos map blocks.
958

    
959
The settings for RADOS storage backend are:
960

    
961
* ``RADOS_POOL_MAPS``: The pool where archipelago and pithos map blocks reside.
962
* ``RADOS_POOL_BLOCKS``: The pool where archipelago and pithos data blocks
963
  reside.
964

    
965
Examples can be found in the conf file.
966

    
967
Be aware that archipelago infrastructure doesn't provide default values for this
968
settings. If they are not set in the conf file, archipelago will not be able to
969
function.
970

    
971
Archipelago also provides ``VERBOSITY`` config options to control the output
972
generated by the userspace peers.
973

    
974
The available options are:
975

    
976
* ``VERBOSITY_BLOCKERB``
977
* ``VERBOSITY_BLOCKERM``
978
* ``VERBOSITY_MAPPER``
979
* ``VERBOSITY_VLMC``
980

    
981
and the available values are:
982

    
983
* 0 : Error only logging.
984
* 1 : Warning logging.
985
* 2 : Info logging.
986
* 3 : Debug logging. WARNING: This options produces tons of output, but the
987
  logrotate daemon should take care of it.
988

    
989
Working with Archipelago
990
------------------------
991

    
992
``archipelago`` provides basic functionality for archipelago.
993

    
994
Usage:
995

    
996
.. code-block:: console
997

    
998
  $ archipelago [-u] command
999

    
1000

    
1001
Currently it supports the following commands:
1002

    
1003
* ``start [peer]``
1004
  Starts archipelago or the specified peer.
1005
* ``stop [peer]``
1006
  Stops archipelago or the specified peer.
1007
* ``restart [peer]``
1008
  Restarts archipelago or the specified peer.
1009
* ``status``
1010
  Show the status of archipelago.
1011

    
1012
Available peers: ``blockerm``, ``blockerb``, ``mapperd``, ``vlmcd``.
1013

    
1014

    
1015
``start``, ``stop``, ``restart`` can be combined with the ``-u / --user`` option
1016
to affect only the userspace peers supporting archipelago.
1017

    
1018

    
1019

    
1020
Archipelago advanced operations
1021
-------------------------------
1022
The ``vlmc`` tool provides a way to interact with archipelago volumes
1023

    
1024
* ``vlmc map <volumename>``: maps the volume to a xsegbd device.
1025

    
1026
* ``vlmc unmap </dev/xsegbd[1-..]>``: unmaps the specified device from the
1027
  system.
1028

    
1029
* ``vlmc create <volumename> --snap <snapname> --size <size>``: creates a new
1030
  volume named <volumename> from snapshot name <snapname> with size <size>.
1031
  The ``--snap`` and ``--size`` are optional, but at least one of them is
1032
  mandatory. e.g:
1033

    
1034
  ``vlmc create <volumename> --snap <snapname>`` creates a volume named
1035
  volumename from snapshot snapname. The size of the volume is the same as
1036
  the size of the snapshot.
1037

    
1038
  ``vlmc create <volumename> --size <size>`` creates an empty volume of size
1039
  <size> named <volumename>.
1040

    
1041
* ``vlmc remove <volumename>``: removes the volume and all the related
1042
  archipelago blocks from storage.
1043

    
1044
* ``vlmc list``: provides a list of archipelago volumes. Currently only works
1045
  with RADOS storage backend.
1046

    
1047
* ``vlmc info <volumename>``: shows volume information. Currently returns only
1048
  volume size.
1049

    
1050
* ``vlmc open <volumename>``: opens an archipelago volume. That is, taking all
1051
  the necessary locks and also make the rest of the infrastructure aware of the
1052
  operation.
1053

    
1054
  This operation succeeds if the volume is alread opened.
1055

    
1056
* ``vlmc close <volumename>``: closes an archipelago volume. That is, performing
1057
  all the necessary functions in the insfrastrure to successfully release the
1058
  volume. Also releases all the acquired locks.
1059

    
1060
  ``vlmc close`` should be performed after a ``vlmc open`` operation.
1061

    
1062
* ``vlmc lock <volumename>``: locks a volume. This step allow the administrator
1063
  to lock an archipelago volume, independently from the rest of the
1064
  infrastrure.
1065

    
1066
* ``vlmc unlock [-f] <volumename>``: unlocks a volume. This allow the
1067
  administrator to unlock a volume, independently from the rest of the
1068
  infrastructure.
1069
  The unlock option can be performed only by the blocker that acquired the lock
1070
  in the first place. To unlock a volume from another blocker, ``-f`` option
1071
  must be used to break the lock.
1072

    
1073

    
1074
Synnefo management commands ("snf-manage")
1075
==========================================
1076

    
1077
Each Synnefo service, Astakos, Pithos and Cyclades are controlled by the
1078
administrator using the "snf-manage" admin tool. This tool is an extension of
1079
the Django command-line management utility. It is run on the host that runs
1080
each service and provides different types of commands depending the services
1081
running on the host. If you are running more than one service on the same host
1082
"snf-manage" adds all the corresponding commands for each service dynamically,
1083
providing a unified admin environment.
1084

    
1085
To run "snf-manage" you just type:
1086

    
1087
.. code-block:: console
1088

    
1089
   # snf-manage <command> [arguments]
1090

    
1091
on the corresponding host that runs the service. For example, if you have all
1092
services running on different physical hosts you would do:
1093

    
1094
.. code-block:: console
1095

    
1096
   root@astakos-host # snf-manage <astakos-command> [argument]
1097
   root@pithos-host # snf-manage <pithos-command> [argument]
1098
   root@cyclades-host # snf-manage <cyclades-command> [argument]
1099

    
1100
If you have all services running on the same host you would do:
1101

    
1102
.. code-block:: console
1103

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

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

    
1110
.. code-block:: console
1111

    
1112
   root@astakos-host # snf-manage <cyclades-command> [argument]
1113
   Unknown command: 'cyclades-command'
1114
   Type 'snf-manage help' for usage.
1115

    
1116
This is the complete list of "snf-manage" commands for each service.
1117

    
1118
Astakos snf-manage commands
1119
---------------------------
1120

    
1121
============================  ===========================
1122
Name                          Description
1123
============================  ===========================
1124
fix-superusers                Transform superusers created by syncdb into AstakosUser instances
1125
cleanup-full                  Cleanup sessions and session catalog
1126
commission-list               List pending commissions
1127
commission-show               Show details for a pending commission
1128
component-add                 Register a component
1129
component-list                List components
1130
component-modify              Modify component attributes
1131
component-show                Show component details
1132
project-control               Manage projects and applications
1133
project-list                  List projects
1134
project-show                  Show project details
1135
quota                         List and check the integrity of user quota
1136
reconcile-resources-astakos   Reconcile resource usage of Quotaholder with Astakos DB
1137
resource-export-astakos       Export astakos resources in json format
1138
resource-import               Register resources
1139
resource-list                 List resources
1140
resource-modify               Modify a resource's default base quota and boolean flags
1141
service-import                Register services
1142
service-list                  List services
1143
service-show                  Show service details
1144
term-add                      Add approval terms
1145
user-activation-send          Send user activation
1146
user-add                      Add user
1147
authpolicy-add                Create a new authentication provider policy profile
1148
authpolicy-list               List existing authentication provider policy profiles
1149
authpolicy-remove             Remove an authentication provider policy
1150
authpolicy-set                Assign an existing authentication provider policy profile to a user or group
1151
authpolicy-show               Show authentication provider profile details
1152
group-add                     Create a group with the given name
1153
group-list                    List available groups
1154
user-list                     List users
1155
user-modify                   Modify user
1156
user-show                     Show user details
1157
============================  ===========================
1158

    
1159
Pithos snf-manage commands
1160
--------------------------
1161

    
1162
============================  ===========================
1163
Name                          Description
1164
============================  ===========================
1165
reconcile-commissions-pithos  Display unresolved commissions and trigger their recovery
1166
resource-export-pithos        Export pithos resources in json format
1167
reconcile-resources-pithos    Detect unsynchronized usage between Astakos and Pithos DB resources and synchronize them if specified so.
1168
============================  ===========================
1169

    
1170
Cyclades snf-manage commands
1171
----------------------------
1172

    
1173
============================== ===========================
1174
Name                           Description
1175
============================== ===========================
1176
backend-add                    Add a new Ganeti backend
1177
backend-list                   List backends
1178
backend-modify                 Modify a backend
1179
backend-update-status          Update backend statistics for instance allocation
1180
backend-remove                 Remove a Ganeti backend
1181
server-create                  Create a new server
1182
server-show                    Show server details
1183
server-list                    List servers
1184
server-modify                  Modify a server
1185
server-import                  Import an existing Ganeti VM into synnefo
1186
server-inspect                 Inspect a server in DB and Ganeti
1187
network-create                 Create a new network
1188
network-list                   List networks
1189
network-modify                 Modify a network
1190
network-inspect                Inspect network state in DB and Ganeti
1191
network-remove                 Delete a network
1192
flavor-create                  Create a new flavor
1193
flavor-list                    List flavors
1194
flavor-modify                  Modify a flavor
1195
image-list                     List images
1196
image-show                     Show image details
1197
pool-create                    Create a bridge or mac-prefix pool
1198
pool-show                      Show pool details
1199
pool-list                      List pools
1200
pool-modify                    Modify a pool
1201
pool-remove                    Delete a pool
1202
queue-inspect                  Inspect the messages of a RabbitMQ queue
1203
queue-retry                    Resend messages from Dead Letter queues to original exchanges
1204
resource-export-cyclades       Export Cyclades resources in JSON format.
1205
service-export-cyclades        Export Cyclades services in JSON format.
1206
reconcile-servers              Reconcile servers of Synnefo DB with state of Ganeti backend
1207
reconcile-networks             Reconcile networks of Synnefo DB with state of Ganeti backend
1208
reconcile-pools                Check consistency of pool resources
1209
reconcile-commissions-cyclades Detect and resolve pending commissions to Quotaholder
1210
reconcile-resources-cyclades   Reconcile resource usage of Astakos with Cyclades DB.
1211
============================== ===========================
1212

    
1213
Astakos helper scripts
1214
======================
1215

    
1216
Astakos includes two scripts to facilitate the installation procedure.
1217
Running:
1218

    
1219
.. code-block:: console
1220

    
1221
   snf-component-register [<component_name>]
1222

    
1223
automates the registration of the standard Synnefo components (astakos,
1224
cyclades, and pithos) in astakos database. It internally uses the script:
1225

    
1226
.. code-block:: console
1227

    
1228
   snf-service-export <component_name> <base_url>
1229

    
1230
which simulates the export of service and resource definitions of the
1231
standard Synnefo components.
1232

    
1233
Pithos managing accounts
1234
========================
1235

    
1236
Pithos provides a utility tool for managing accounts.
1237
To run you just type:
1238

    
1239
.. code-block:: console
1240

    
1241
   # pithos-manage-accounts <command> [arguments]
1242

    
1243
This is the list of the available commands:
1244

    
1245
============================  ===========================
1246
Name                          Description
1247
============================  ===========================
1248
delete                        Remove an account from the Pithos DB
1249
export-quota                  Export account quota in a file
1250
list                          List existing/dublicate accounts
1251
merge                         Move an account contents in another account
1252
set-container-quota           Set container quota for all or a specific account
1253
============================  ===========================
1254

    
1255

    
1256
The "kamaki" API client
1257
=======================
1258

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

    
1263
.. code-block:: console
1264

    
1265
   $ kamaki config list
1266

    
1267
To change a setting use ``kamaki config set``:
1268

    
1269
.. code-block:: console
1270

    
1271
   $ kamaki config set image.url https://cyclades.example.com/image
1272
   $ kamaki config set file.url https://pithos.example.com/v1
1273
   $ kamaki config set user.url https://accounts.example.com
1274
   $ kamaki config set token ...
1275

    
1276
To test that everything works, try authenticating the current account with
1277
kamaki:
1278

    
1279
.. code-block:: console
1280

    
1281
  $ kamaki user authenticate
1282

    
1283
This will output user information.
1284

    
1285
Upload Image
1286
------------
1287

    
1288
By convention, images are stored in a container called ``images``. Check if the
1289
container exists, by listing all containers in your account:
1290

    
1291
.. code-block:: console
1292

    
1293
   $ kamaki file list
1294

    
1295
If the container ``images`` does not exist, create it:
1296

    
1297
.. code-block:: console
1298

    
1299
  $ kamaki file create images
1300

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

    
1304
.. code-block:: console
1305

    
1306
   $ kamaki file upload ubuntu.iso images
1307

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

    
1311
.. code-block:: console
1312

    
1313
  $ kamaki file list images
1314

    
1315
The full Pithos URL for the previous example will be
1316
``pithos://u53r-un1qu3-1d/images/ubuntu.iso`` where ``u53r-un1qu3-1d`` is the
1317
unique user id (uuid).
1318

    
1319
Register Image
1320
--------------
1321

    
1322
To register an image you will need to use the full Pithos URL. To register as
1323
a public image the one from the previous example use:
1324

    
1325
.. code-block:: console
1326

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

    
1329
The ``--public`` flag is important, if missing the registered image will not
1330
be listed by ``kamaki image list``.
1331

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

    
1335
.. code-block:: console
1336

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

    
1340
To verify that the image was registered successfully use:
1341

    
1342
.. code-block:: console
1343

    
1344
   $ kamaki image list --name-like=ubuntu
1345

    
1346

    
1347
Miscellaneous
1348
=============
1349

    
1350
.. _branding:
1351

    
1352
Branding
1353
--------
1354

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

    
1360
Configuration
1361
~~~~~~~~~~~~~
1362

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

    
1368
By default, the global service name is "Synnefo" and the company name is
1369
"GRNET". These names and their respective logos and URLs are used throughout
1370
the Astakos, Pithos and Cyclades UI.
1371

    
1372
**Names and URLs:**
1373

    
1374
The first group of branding customization refers to the service's and company's
1375
information.
1376

    
1377
You can overwrite the company and the service name and URL respectively by
1378
uncommenting and setting the following:
1379

    
1380
.. code-block:: python
1381
  
1382
  # setting used in Astakos Dashboard/Projects pages
1383
  BRANDING_SERVICE_NAME = 'My cloud'
1384
  BRANDING_SERVICE_URL = 'http://www.mycloud.synnefo.org/'
1385

    
1386
  # settings used in Astakos, Pithos, Cyclades footer only if 
1387
  # BRANDING_SHOW_COPYRIGHT is set to True
1388
  BRANDING_SHOW_COPYRIGHT = True
1389
  BRANDING_COMPANY_NAME = 'Company LTD'
1390
  BRANDING_COMPANY_URL = 'https://www.company-ltd.synnefo.org/'
1391

    
1392

    
1393
**Copyright and footer options:**
1394

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

    
1399
.. code-block:: python
1400

    
1401
  #BRANDING_SHOW_COPYRIGHT = False
1402

    
1403
Copyright message defaults to 'Copyright (c) 2011-<current_year>
1404
<BRANDING_COMPANY_NAME>.' but you can overwrite it to a completely custom one by
1405
setting the following option:
1406

    
1407
.. code-block:: python
1408

    
1409
  BRANDING_COPYRIGHT_MESSAGE = 'Copyright (c) 2011-2013 GRNET'
1410

    
1411
If you want to include a custom message in the footer, you can uncomment and 
1412
set the ``BRANDING_FOOTER_EXTRA_MESSAGE`` setting. You can use html markup. 
1413
Your custom message will appear  above Copyright message at the Compute 
1414
templates and the Dashboard UI.
1415

    
1416
.. code-block:: python
1417

    
1418
  #BRANDING_FOOTER_EXTRA_MESSAGE = ''
1419

    
1420

    
1421
**Images:**
1422

    
1423
The Astakos, Pithos and Cyclades Web UI has some logos and images.
1424
 
1425
The branding-related images are presented in  the following table:
1426

    
1427
===============  ============================  =========
1428
Image            Name/extension  convention    Usage
1429
===============  ============================  =========
1430
Favicon          favicon.ico                   Favicon for all services
1431
Dashboard logo   dashboard_logo.png            Visible in all Astakos UI pages
1432
Compute logo     compute_logo.png              Visible in all Cyclades UI pages
1433
Console logo     console_logo.png              Visible in the Cyclades Console Window
1434
Storage logo     storage_logo.png              Visible in all Pithos UI pages
1435
===============  ============================  =========
1436

    
1437
There are two methods  available for replacing all, or individual, 
1438
branding-related images:
1439

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

    
1443
   If you want to replace all of your images, keep the name/extension
1444
   conventions as indicated in the above table and change the
1445
   ``BRANDING_IMAGE_MEDIA_URL`` setting accordingly:
1446

    
1447
   .. code-block:: python
1448
        
1449
      # using relative path
1450
      BRANDING_IMAGE_MEDIA_URL= '/static/mybranding/images/' 
1451

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

    
1455

    
1456
   If you wish to replace individual images, **do not uncomment**
1457
   ``BRANDING_IMAGE_MEDIA_URL``, but instead provide a relative path, pointing to
1458
   the file inside your directory for each ``BRANDING_<image>_URL`` that you wish
1459
   to replace.
1460

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

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

    
1468
.. note:: Retina optimized images:
1469

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

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

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

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

    
1489
   In case that you don’t want to use a high-resolution image, the 
1490
   normal-resolution image will be visible.
1491

    
1492
More branding
1493
~~~~~~~~~~~~~
1494

    
1495
Although, it is not 100% branding-related, further verbal customization is
1496
feasible. 
1497

    
1498
**EMAILS**
1499

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

    
1504
In order to overwrite one or more email-templates you need to place your 
1505
modified <email-file>.txt files respecting the following structure:
1506
  
1507
  **/etc/synnefo/templates/**
1508
      **im/**
1509
          | activation_email.txt
1510
          | email.txt
1511
          | invitation.txt
1512
          | switch_accounts_email.txt
1513
          | welcome_email.txt
1514
          **projects/**
1515
              | project_approval_notification.txt
1516
              | project_denial_notification.txt    
1517
              | project_membership_change_notification.txt
1518
              | project_membership_enroll_notification.txt
1519
              | project_membership_leave_request_notification.txt
1520
              | project_membership_request_notification.txt
1521
              | project_suspension_notification.txt
1522
              | project_termination_notification.txt
1523
      **registration/**
1524
          | email_change_email.txt
1525
          | password_email.txt
1526

    
1527
Feel free to omit any of the above files you do not wish to overwrite.
1528

    
1529
Below is a list of all emails sent by Synnefo to users along with a short 
1530
description and a link to their content:
1531

    
1532
* ``snf-astakos-app/astakos/im/templates/im/email.txt``
1533
  Base email template. Contains a contact email and a “thank you” message.
1534
  (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/email.txt>`_)
1535
* ``snf-astakos-app/astakos/im/templates/im/activation_email.txt`` Email sent to
1536
  user that prompts  him/her to click on a link provided to activate the account.
1537
  Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/activation_email.txt>`_)
1538
* ``snf-astakos-app/astakos/im/templates/im/invitation.txt`` Email sent to an
1539
  invited user. He/she has to click on a link provided to activate the account.
1540
  Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/invitation.txt>`_)
1541
* ``snf-astakos-app/astakos/im/templates/im/switch_accounts_email.txt`` Email
1542
  sent to user upon his/her request to associate this email address with a
1543
  shibboleth account. He/she has to click on a link provided to activate the
1544
  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>`_)
1545
* ``snf-astakos-app/astakos/im/templates/im/welcome_email.txt`` Email sent to
1546
  inform the user that his/ her account has been activated. Extends “email.txt”
1547
  (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/welcome_email.txt>`_)
1548
* ``snf-astakos-app/astakos/im/templates/registration/email_change_email.txt``
1549
  Email sent to user when he/she has requested new email address assignment. The
1550
  user has to click on a link provided to validate this action. Extends
1551
  “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/registration/email_change_email.txt>`_)
1552
* ``snf-astakos-app/astakos/im/templates/registration/password_email.txt`` Email
1553
  sent for resetting password purpose. The user has to click on a link provided
1554
  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>`_)
1555
* ``snf-astakos-app/astakos/im/templates/im/projects/project_approval_notification.txt``
1556
  Informs  the project owner that his/her project has been approved. Extends
1557
  “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>`_)
1558
* ``snf-astakos-app/astakos/im/templates/im/projects/project_denial_notification.txt``
1559
  Informs the project owner that his/her  project application has been denied
1560
  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>`_)
1561
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_change_notification.txt``
1562
  An email is sent to a user containing information about his project membership
1563
  (whether he has been accepted, rejected or removed). Extends “email.txt” (`Link
1564
  <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_membership_change_notification.txt>`_)
1565
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_enroll_notification.txt``
1566
  Informs a user that he/she  has been enrolled to a project. Extends
1567
  “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>`_)
1568
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_leave_request_notification.txt``
1569
  An email is sent to the project owner to make him aware of a  user having
1570
  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>`_)
1571
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_request_notification.txt``
1572
  An email is sent to the project owner to make him/her aware of a user having
1573
  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>`_)
1574
* ``snf-astakos-app/astakos/im/templates/im/projects/project_suspension_notification.txt``
1575
  An email is sent to the project owner to make him/her aware of his/her project
1576
  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>`_)
1577
* ``snf-astakos-app/astakos/im/templates/im/projects/project_termination_notification.txt``
1578
  An email is sent to the project owner to make him/her aware of his/her project
1579
  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>`_)
1580

    
1581
.. warning:: Django templates language:
1582

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

    
1588

    
1589
.. RabbitMQ
1590

    
1591
RabbitMQ Broker
1592
---------------
1593

    
1594
Queue nodes run the RabbitMQ sofware, which provides AMQP functionality. To
1595
guarantee high-availability, more than one Queue nodes should be deployed, each
1596
of them belonging to the same `RabbitMQ cluster
1597
<http://www.rabbitmq.com/clustering.html>`_. Synnefo uses the RabbitMQ
1598
active/active `High Available Queues <http://www.rabbitmq.com/ha.html>`_ which
1599
are mirrored between two nodes within a RabbitMQ cluster.
1600

    
1601
The RabbitMQ nodes that form the cluster, are declared to Synnefo through the
1602
`AMQP_HOSTS` setting. Each time a Synnefo component needs to connect to
1603
RabbitMQ, one of these nodes is chosen in a random way. The client that Synnefo
1604
uses to connect to RabbitMQ, handles connection failures transparently and
1605
tries to reconnect to a different node. As long as one of these nodes are up
1606
and running, functionality of Synnefo should not be downgraded by the RabbitMQ
1607
node failures.
1608

    
1609
All the queues that are being used are declared as durable, meaning that
1610
messages are persistently stored to RabbitMQ, until they get successfully
1611
processed by a client.
1612

    
1613
Currently, RabbitMQ is used by the following components:
1614

    
1615
* `snf-ganeti-eventd`, `snf-ganeti-hook` and `snf-progress-monitor`:
1616
  These components send messages concerning the status and progress of
1617
  jobs in the Ganeti backend.
1618
* `snf-dispatcher`: This daemon, consumes the messages that are sent from
1619
  the above components, and updates the Cyclades DB accordingly.
1620

    
1621

    
1622
Installation
1623
~~~~~~~~~~~~
1624

    
1625
Please check the RabbitMQ documentation which covers extensively the
1626
`installation of RabbitMQ server <http://www.rabbitmq.com/download.html>`_ and
1627
the setup of a `RabbitMQ cluster <http://www.rabbitmq.com/clustering.html>`_.
1628
Also, check out the `web management plugin
1629
<http://www.rabbitmq.com/management.html>`_ that can be useful for managing and
1630
monitoring RabbitMQ.
1631

    
1632
For a basic installation of RabbitMQ on two nodes (node1 and node2) you can do
1633
the following:
1634

    
1635
On both nodes, install rabbitmq-server and create a Synnefo user:
1636

    
1637
.. code-block:: console
1638

    
1639
  $ apt-get install rabbitmq-server
1640
  $ rabbitmqctl add_user synnefo "example_pass"
1641
  $ rabbitmqctl set_permissions synnefo  ".*" ".*" ".*"
1642

    
1643
Also guarantee that both nodes share the same cookie, by running:
1644

    
1645
.. code-block:: console
1646

    
1647
  $ scp node1:/var/lib/rabbitmq/.erlang.cookie node2:/var/lib/rabbitmq/.erlang.cookie
1648

    
1649
and restart the nodes:
1650

    
1651
.. code-block:: console
1652

    
1653
  $ /etc/init.d/rabbitmq-server restart
1654

    
1655

    
1656
To setup the RabbitMQ cluster run:
1657

    
1658
.. code-block:: console
1659

    
1660
  root@node2: rabbitmqctl stop_app
1661
  root@node2: rabbitmqctl reset
1662
  root@node2: rabbitmqctl cluster rabbit@node1 rabbit@node2
1663
  root@node2: rabbitmqctl start_app
1664

    
1665
You can verify that the cluster is set up correctly by running:
1666

    
1667
.. code-block:: console
1668

    
1669
  root@node2: rabbitmqctl cluster_status
1670

    
1671

    
1672
Logging
1673
-------
1674

    
1675
Logging in Synnefo is using Python's logging module. The module is configured
1676
using dictionary configuration, whose format is described here:
1677

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

    
1680
Note that this is a feature of Python 2.7 that we have backported for use in
1681
Python 2.6.
1682

    
1683
The logging configuration dictionary is defined in
1684
``/etc/synnefo/10-snf-webproject-logging.conf``
1685

    
1686
The administrator can have finer logging control by modifying the
1687
``LOGGING_SETUP`` dictionary, and defining subloggers with different handlers
1688
and log levels.  e.g. To enable debug messages only for the API set the level
1689
of 'synnefo.api' to ``DEBUG``
1690

    
1691
By default, the Django webapp and snf-manage logs to syslog, while
1692
`snf-dispatcher` logs to `/var/log/synnefo/dispatcher.log`.
1693

    
1694

    
1695
.. _scale-up:
1696

    
1697
Scaling up to multiple nodes
1698
============================
1699

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

    
1707
Graph of a scale-out Synnefo deployment
1708
---------------------------------------
1709

    
1710
Each box in the following graph corresponds to a distinct physical node:
1711

    
1712
.. image:: images/synnefo-arch2-roles.png
1713
   :width: 100%
1714
   :target: _images/synnefo-arch2-roles.png
1715

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

    
1721
.. _physical-node-roles:
1722

    
1723
Physical Node roles
1724
-------------------
1725

    
1726
As appears in the previous graph, a scale-out Synnefo deployment consists of
1727
multiple physical nodes that have the following roles:
1728

    
1729
* **WEBSERVER**: A web server running in front of gunicorn (e.g.: Apache, nginx)
1730
* **ASTAKOS**: The Astakos application (gunicorn)
1731
* **ASTAKOS_DB**: The Astakos database (postgresql)
1732
* **PITHOS**: The Pithos application (gunicorn)
1733
* **PITHOS_DB**: The Pithos database (postgresql)
1734
* **CYCLADES**: The Cyclades application (gunicorn)
1735
* **CYCLADES_DB**: The Cyclades database (postgresql)
1736
* **MQ**: The message queue (RabbitMQ)
1737
* **GANETI_MASTER**: The Ganeti master of a Ganeti cluster
1738
* **GANETI_NODE** : A VM-capable Ganeti node of a Ganeti cluster
1739

    
1740
You will probably also have:
1741

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

    
1747
From this point we will also refer to the following groups of roles:
1748

    
1749
* **SYNNEFO**: [ **ASTAKOS**, **ASTAKOS_DB**, **PITHOS**, **PITHOS_DB**, **CYCLADES**, **CYCLADES_DB**, **MQ**, **CMS**]
1750
* **G_BACKEND**: [**GANETI_MASTER**, **GANETI_NODE**]
1751

    
1752
Of course, when deploying Synnefo you can combine multiple of the above roles on a
1753
single physical node, but if you are trying to scale out, the above separation
1754
gives you significant advantages.
1755

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

    
1760
Components for each role
1761
------------------------
1762

    
1763
When deploying Synnefo in large scale, you need to install different Synnefo
1764
or/and third party components on different physical nodes according to their
1765
Synnefo role, as stated in the previous section.
1766

    
1767
Specifically:
1768

    
1769
Role **WEBSERVER**
1770
    * Synnefo components: `None`
1771
    * 3rd party components: Apache
1772
Role **ASTAKOS**
1773
    * Synnefo components: `snf-webproject`, `snf-astakos-app`
1774
    * 3rd party components: Django, Gunicorn
1775
Role **ASTAKOS_DB**
1776
    * Synnefo components: `None`
1777
    * 3rd party components: PostgreSQL
1778
Role **PITHOS**
1779
    * Synnefo components: `snf-webproject`, `snf-pithos-app`, `snf-pithos-webclient`
1780
    * 3rd party components: Django, Gunicorn
1781
Role **PITHOS_DB**
1782
    * Synnefo components: `None`
1783
    * 3rd party components: PostgreSQL
1784
Role **CYCLADES**
1785
    * Synnefo components: `snf-webproject`, `snf-cyclades-app`, `snf-vncauthproxy`
1786
    * 3rd party components: Django Gunicorn
1787
Role **CYCLADES_DB**
1788
    * Synnefo components: `None`
1789
    * 3rd party components: PostgreSQL
1790
Role **MQ**
1791
    * Synnefo components: `None`
1792
    * 3rd party components: RabbitMQ
1793
Role **GANETI_MASTER**
1794
    * Synnefo components: `snf-cyclades-gtools`
1795
    * 3rd party components: Ganeti
1796
Role **GANETI_NODE**
1797
    * Synnefo components: `snf-cyclades-gtools`, `snf-network`, `snf-image`, `nfdhcpd`
1798
    * 3rd party components: Ganeti
1799
Role **CMS**
1800
    * Synnefo components: `snf-webproject`, `snf-cloudcms`
1801
    * 3rd party components: Django, Gunicorn
1802
Role **NS**
1803
    * Synnefo components: `None`
1804
    * 3rd party components: BIND
1805
Role **CLIENT**
1806
    * Synnefo components: `kamaki`, `snf-image-creator`
1807
    * 3rd party components: `None`
1808

    
1809
Example scale out installation
1810
------------------------------
1811

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

    
1816
We assume that we have the following 10 physical nodes with the corresponding
1817
roles:
1818

    
1819
Node1:
1820
    **WEBSERVER**, **ASTAKOS**
1821
      Guide sections:
1822
        * :ref:`apt <i-apt>`
1823
        * :ref:`gunicorn <i-gunicorn>`
1824
        * :ref:`apache <i-apache>`
1825
        * :ref:`snf-webproject <i-webproject>`
1826
        * :ref:`snf-astakos-app <i-astakos>`
1827
Node2:
1828
    **WEBSERVER**, **PITHOS**
1829
      Guide sections:
1830
        * :ref:`apt <i-apt>`
1831
        * :ref:`gunicorn <i-gunicorn>`
1832
        * :ref:`apache <i-apache>`
1833
        * :ref:`snf-webproject <i-webproject>`
1834
        * :ref:`snf-pithos-app <i-pithos>`
1835
        * :ref:`snf-pithos-webclient <i-pithos>`
1836
Node3:
1837
    **WEBSERVER**, **CYCLADES**
1838
      Guide sections:
1839
        * :ref:`apt <i-apt>`
1840
        * :ref:`gunicorn <i-gunicorn>`
1841
        * :ref:`apache <i-apache>`
1842
        * :ref:`snf-webproject <i-webproject>`
1843
        * :ref:`snf-cyclades-app <i-cyclades>`
1844
        * :ref:`snf-vncauthproxy <i-cyclades>`
1845
Node4:
1846
    **WEBSERVER**, **CMS**
1847
      Guide sections:
1848
        * :ref:`apt <i-apt>`
1849
        * :ref:`gunicorn <i-gunicorn>`
1850
        * :ref:`apache <i-apache>`
1851
        * :ref:`snf-webproject <i-webproject>`
1852
        * :ref:`snf-cloudcms <i-cms>`
1853
Node5:
1854
    **ASTAKOS_DB**, **PITHOS_DB**, **CYCLADES_DB**
1855
      Guide sections:
1856
        * :ref:`apt <i-apt>`
1857
        * :ref:`postgresql <i-db>`
1858
Node6:
1859
    **MQ**
1860
      Guide sections:
1861
        * :ref:`apt <i-apt>`
1862
        * :ref:`rabbitmq <i-mq>`
1863
Node7:
1864
    **GANETI_MASTER**, **GANETI_NODE**
1865
      Guide sections:
1866
        * :ref:`apt <i-apt>`
1867
        * :ref:`general <i-backends>`
1868
        * :ref:`ganeti <i-ganeti>`
1869
        * :ref:`snf-cyclades-gtools <i-gtools>`
1870
        * :ref:`snf-network <i-network>`
1871
        * :ref:`snf-image <i-image>`
1872
        * :ref:`nfdhcpd <i-network>`
1873
Node8:
1874
    **GANETI_NODE**
1875
      Guide sections:
1876
        * :ref:`apt <i-apt>`
1877
        * :ref:`general <i-backends>`
1878
        * :ref:`ganeti <i-ganeti>`
1879
        * :ref:`snf-cyclades-gtools <i-gtools>`
1880
        * :ref:`snf-network <i-network>`
1881
        * :ref:`snf-image <i-image>`
1882
        * :ref:`nfdhcpd <i-network>`
1883
Node9:
1884
    **GANETI_NODE**
1885
      Guide sections:
1886
        `Same as Node8`
1887
Node10:
1888
    **GANETI_NODE**
1889
      Guide sections:
1890
        `Same as Node8`
1891

    
1892
All sections: :ref:`Scale out Guide <i-synnefo>`
1893

    
1894

    
1895
Upgrade Notes
1896
=============
1897

    
1898
.. toctree::
1899
   :maxdepth: 1
1900

    
1901
   v0.12 -> v0.13 <upgrade/upgrade-0.13>
1902
   v0.13 -> v0.14 <upgrade/upgrade-0.14>
1903
   v0.14 -> v0.14.2 <upgrade/upgrade-0.14.2>
1904
   v0.14.5 -> v0.14.6 <upgrade/upgrade-0.14.6>
1905
   v0.14 -> v0.15 <upgrade/upgrade-0.15>
1906

    
1907

    
1908
Changelog, NEWS
1909
===============
1910

    
1911

    
1912
* v0.14.7 :ref:`Changelog <Changelog-0.14.6>`, :ref:`NEWS <NEWS-0.14.7>`
1913
* v0.14.6 :ref:`Changelog <Changelog-0.14.6>`, :ref:`NEWS <NEWS-0.14.6>`
1914
* v0.14.5 :ref:`Changelog <Changelog-0.14.5>`, :ref:`NEWS <NEWS-0.14.5>`
1915
* v0.14.4 :ref:`Changelog <Changelog-0.14.4>`, :ref:`NEWS <NEWS-0.14.4>`
1916
* v0.14.3 :ref:`Changelog <Changelog-0.14.3>`, :ref:`NEWS <NEWS-0.14.3>`
1917
* v0.14.2 :ref:`Changelog <Changelog-0.14.2>`, :ref:`NEWS <NEWS-0.14.2>`
1918
* v0.14 :ref:`Changelog <Changelog-0.14>`, :ref:`NEWS <NEWS-0.14>`
1919
* v0.13 :ref:`Changelog <Changelog-0.13>`, :ref:`NEWS <NEWS-0.13>`