Statistics
| Branch: | Tag: | Revision:

root / docs / admin-guide.rst @ a1d0bacb

History | View | Annotate | Download (100.4 kB)

1 bc055d09 Constantinos Venetsanopoulos
.. _admin-guide:
2 bc055d09 Constantinos Venetsanopoulos
3 bc055d09 Constantinos Venetsanopoulos
Synnefo Administrator's Guide
4 bc055d09 Constantinos Venetsanopoulos
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 bc055d09 Constantinos Venetsanopoulos
6 bc055d09 Constantinos Venetsanopoulos
This is the complete Synnefo Administrator's Guide.
7 bc055d09 Constantinos Venetsanopoulos
8 bc055d09 Constantinos Venetsanopoulos
9 14267d89 Constantinos Venetsanopoulos
.. _syn+archip:
10 bc055d09 Constantinos Venetsanopoulos
11 eab73849 Constantinos Venetsanopoulos
General Synnefo Architecture
12 eab73849 Constantinos Venetsanopoulos
============================
13 eab73849 Constantinos Venetsanopoulos
14 14267d89 Constantinos Venetsanopoulos
The following figure shows a detailed view of the whole Synnefo architecture
15 14267d89 Constantinos Venetsanopoulos
and how it interacts with multiple Ganeti clusters. We hope that after reading
16 14267d89 Constantinos Venetsanopoulos
the Administrator's Guide you will be able to understand every component and
17 14267d89 Constantinos Venetsanopoulos
all the interactions between them.
18 eab73849 Constantinos Venetsanopoulos
19 301294a9 Constantinos Venetsanopoulos
.. image:: images/synnefo-arch2.png
20 16539dad Kostas Papadimitriou
   :width: 100%
21 301294a9 Constantinos Venetsanopoulos
   :target: _images/synnefo-arch2.png
22 eab73849 Constantinos Venetsanopoulos
23 14267d89 Constantinos Venetsanopoulos
Synnefo also supports RADOS as an alternative storage backend for
24 14267d89 Constantinos Venetsanopoulos
Files/Images/VM disks. You will find the :ref:`corresponding figure
25 14267d89 Constantinos Venetsanopoulos
<syn+archip+rados>` later in this guide.
26 eab73849 Constantinos Venetsanopoulos
27 a1c707c9 Constantinos Venetsanopoulos
28 eab73849 Constantinos Venetsanopoulos
Identity Service (Astakos)
29 eab73849 Constantinos Venetsanopoulos
==========================
30 f846d8df Constantinos Venetsanopoulos
31 f846d8df Constantinos Venetsanopoulos
32 eab73849 Constantinos Venetsanopoulos
Authentication methods
33 3a0ce98e Constantinos Venetsanopoulos
----------------------
34 eab73849 Constantinos Venetsanopoulos
35 3a0ce98e Constantinos Venetsanopoulos
Astakos supports multiple authentication methods:
36 eab73849 Constantinos Venetsanopoulos
37 3a0ce98e Constantinos Venetsanopoulos
 * local username/password
38 3a0ce98e Constantinos Venetsanopoulos
 * LDAP / Active Directory
39 3a0ce98e Constantinos Venetsanopoulos
 * SAML 2.0 (Shibboleth) federated logins
40 3a0ce98e Constantinos Venetsanopoulos
 * Google
41 3a0ce98e Constantinos Venetsanopoulos
 * Twitter
42 3a0ce98e Constantinos Venetsanopoulos
 * LinkedIn
43 eab73849 Constantinos Venetsanopoulos
44 eab73849 Constantinos Venetsanopoulos
.. _shibboleth-auth:
45 eab73849 Constantinos Venetsanopoulos
46 eab73849 Constantinos Venetsanopoulos
Shibboleth Authentication
47 3a0ce98e Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~~~~~~~~
48 eab73849 Constantinos Venetsanopoulos
49 eab73849 Constantinos Venetsanopoulos
Astakos can delegate user authentication to a Shibboleth federation.
50 eab73849 Constantinos Venetsanopoulos
51 eab73849 Constantinos Venetsanopoulos
To setup shibboleth, install package::
52 eab73849 Constantinos Venetsanopoulos
53 eab73849 Constantinos Venetsanopoulos
  apt-get install libapache2-mod-shib2
54 eab73849 Constantinos Venetsanopoulos
55 eab73849 Constantinos Venetsanopoulos
Change appropriately the configuration files in ``/etc/shibboleth``.
56 eab73849 Constantinos Venetsanopoulos
57 eab73849 Constantinos Venetsanopoulos
Add in ``/etc/apache2/sites-available/synnefo-ssl``::
58 eab73849 Constantinos Venetsanopoulos
59 eab73849 Constantinos Venetsanopoulos
  ShibConfig /etc/shibboleth/shibboleth2.xml
60 eab73849 Constantinos Venetsanopoulos
  Alias      /shibboleth-sp /usr/share/shibboleth
61 eab73849 Constantinos Venetsanopoulos
62 fb814235 Kostas Papadimitriou
  <Location /ui/login/shibboleth>
63 eab73849 Constantinos Venetsanopoulos
    AuthType shibboleth
64 eab73849 Constantinos Venetsanopoulos
    ShibRequireSession On
65 eab73849 Constantinos Venetsanopoulos
    ShibUseHeaders On
66 eab73849 Constantinos Venetsanopoulos
    require valid-user
67 eab73849 Constantinos Venetsanopoulos
  </Location>
68 eab73849 Constantinos Venetsanopoulos
69 eab73849 Constantinos Venetsanopoulos
and before the line containing::
70 eab73849 Constantinos Venetsanopoulos
71 eab73849 Constantinos Venetsanopoulos
  ProxyPass        / http://localhost:8080/ retry=0
72 eab73849 Constantinos Venetsanopoulos
73 eab73849 Constantinos Venetsanopoulos
add::
74 eab73849 Constantinos Venetsanopoulos
75 eab73849 Constantinos Venetsanopoulos
  ProxyPass /Shibboleth.sso !
76 f846d8df Constantinos Venetsanopoulos
77 eab73849 Constantinos Venetsanopoulos
Then, enable the shibboleth module::
78 eab73849 Constantinos Venetsanopoulos
79 eab73849 Constantinos Venetsanopoulos
  a2enmod shib2
80 f846d8df Constantinos Venetsanopoulos
81 eab73849 Constantinos Venetsanopoulos
After passing through the apache module, the following tokens should be
82 eab73849 Constantinos Venetsanopoulos
available at the destination::
83 eab73849 Constantinos Venetsanopoulos
84 eab73849 Constantinos Venetsanopoulos
  eppn # eduPersonPrincipalName
85 eab73849 Constantinos Venetsanopoulos
  Shib-InetOrgPerson-givenName
86 eab73849 Constantinos Venetsanopoulos
  Shib-Person-surname
87 eab73849 Constantinos Venetsanopoulos
  Shib-Person-commonName
88 eab73849 Constantinos Venetsanopoulos
  Shib-InetOrgPerson-displayName
89 eab73849 Constantinos Venetsanopoulos
  Shib-EP-Affiliation
90 eab73849 Constantinos Venetsanopoulos
  Shib-Session-ID
91 eab73849 Constantinos Venetsanopoulos
92 b8603e8a Kostas Papadimitriou
Astakos keeps a map of shibboleth users using the value of the ``REMOTE_USER``
93 b8603e8a Kostas Papadimitriou
header, passed by the ``mod_shib2`` module. This happens in order to be able to
94 b8603e8a Kostas Papadimitriou
identify the astakos account the shibboleth user is associated to, every time
95 b8603e8a Kostas Papadimitriou
the user logs in from an affiliate shibboleth IdP. 
96 b8603e8a Kostas Papadimitriou
97 b8603e8a Kostas Papadimitriou
The shibboleth attribute which gets mapped to the ``REMOTE_USER`` header can be
98 b8603e8a Kostas Papadimitriou
changed in ``/etc/shibboleth/shibboleth2.xml`` configuration file.
99 b8603e8a Kostas Papadimitriou
100 b8603e8a Kostas Papadimitriou
.. code-block:: xml
101 b8603e8a Kostas Papadimitriou
102 b8603e8a Kostas Papadimitriou
    <!-- The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined. -->
103 b8603e8a Kostas Papadimitriou
        <ApplicationDefaults entityID="https://sp.example.org/shibboleth" 
104 b8603e8a Kostas Papadimitriou
         REMOTE_USER="eppn persistent-id targeted-id">
105 b8603e8a Kostas Papadimitriou
106 b8603e8a Kostas Papadimitriou
.. warning::
107 b8603e8a Kostas Papadimitriou
108 b8603e8a Kostas Papadimitriou
 Changing ``mod_shib2`` ``REMOTE_USER`` to map to different shibboleth
109 b8603e8a Kostas Papadimitriou
 attributes will probably invalidate any existing shibboleth enabled users in
110 b8603e8a Kostas Papadimitriou
 astakos database. Those users won't be able to login to their existing accounts.
111 b8603e8a Kostas Papadimitriou
112 b8603e8a Kostas Papadimitriou
113 eab73849 Constantinos Venetsanopoulos
Finally, add 'shibboleth' in ``ASTAKOS_IM_MODULES`` list. The variable resides
114 eab73849 Constantinos Venetsanopoulos
inside the file ``/etc/synnefo/20-snf-astakos-app-settings.conf``
115 eab73849 Constantinos Venetsanopoulos
116 e0975bbf Sofia Papagiannaki
Twitter Authentication
117 3a0ce98e Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~~~~~
118 e0975bbf Sofia Papagiannaki
119 e0975bbf Sofia Papagiannaki
To enable twitter authentication while signed in under a Twitter account,
120 e0975bbf Sofia Papagiannaki
visit dev.twitter.com/apps.
121 e0975bbf Sofia Papagiannaki
122 e0975bbf Sofia Papagiannaki
Click Create an application.
123 e0975bbf Sofia Papagiannaki
124 e0975bbf Sofia Papagiannaki
Fill the necessary information and for callback URL give::
125 e0975bbf Sofia Papagiannaki
126 e0975bbf Sofia Papagiannaki
    https://node1.example.com/ui/login/twitter/authenticated
127 e0975bbf Sofia Papagiannaki
128 e0975bbf Sofia Papagiannaki
Finally, add 'twitter' in ``ASTAKOS_IM_MODULES`` list. The variable resides
129 e0975bbf Sofia Papagiannaki
inside the file ``/etc/synnefo/20-snf-astakos-app-settings.conf``
130 e0975bbf Sofia Papagiannaki
131 e0975bbf Sofia Papagiannaki
Google Authentication
132 3a0ce98e Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~~~~
133 e0975bbf Sofia Papagiannaki
134 e0975bbf Sofia Papagiannaki
To enable google authentication while signed in under a Google account,
135 e0975bbf Sofia Papagiannaki
visit https://code.google.com/apis/console/.
136 e0975bbf Sofia Papagiannaki
137 e0975bbf Sofia Papagiannaki
Under API Access select Create another client ID, select Web application,
138 e0975bbf Sofia Papagiannaki
expand more options in Your site or hostname section and in Authorized
139 e0975bbf Sofia Papagiannaki
Redirect URIs add:
140 e0975bbf Sofia Papagiannaki
141 e0975bbf Sofia Papagiannaki
142 e0975bbf Sofia Papagiannaki
Fill the necessary information and for callback URL give::
143 e0975bbf Sofia Papagiannaki
144 e0975bbf Sofia Papagiannaki
    https://node1.example.com/ui/login/google/authenticated
145 e0975bbf Sofia Papagiannaki
146 e0975bbf Sofia Papagiannaki
Finally, add 'google' in ``ASTAKOS_IM_MODULES`` list. The variable resides
147 e0975bbf Sofia Papagiannaki
inside the file ``/etc/synnefo/20-snf-astakos-app-settings.conf``
148 e0975bbf Sofia Papagiannaki
149 eab73849 Constantinos Venetsanopoulos
150 eab73849 Constantinos Venetsanopoulos
Working with Astakos
151 eab73849 Constantinos Venetsanopoulos
--------------------
152 eab73849 Constantinos Venetsanopoulos
153 77186edf Kostas Papadimitriou
User registration
154 77186edf Kostas Papadimitriou
~~~~~~~~~~~~~~~~~
155 f846d8df Constantinos Venetsanopoulos
156 0019cd7d Christos Stavrakakis
When a new user signs up, he/she is not directly marked as active. You can see
157 77186edf Kostas Papadimitriou
his/her state by running (on the machine that runs the Astakos app):
158 f846d8df Constantinos Venetsanopoulos
159 f846d8df Constantinos Venetsanopoulos
.. code-block:: console
160 f846d8df Constantinos Venetsanopoulos
161 4404e02e Ilias Tsitsimpis
   $ snf-manage user-list
162 f846d8df Constantinos Venetsanopoulos
163 0019cd7d Christos Stavrakakis
More detailed user status is provided in the `status` field of the `user-show`
164 77186edf Kostas Papadimitriou
command:
165 f846d8df Constantinos Venetsanopoulos
166 77186edf Kostas Papadimitriou
.. code-block:: console
167 f846d8df Constantinos Venetsanopoulos
168 77186edf Kostas Papadimitriou
  $ snf-manage user-show <user-id>
169 f846d8df Constantinos Venetsanopoulos
170 77186edf Kostas Papadimitriou
  id                  : 6
171 77186edf Kostas Papadimitriou
  uuid                : 78661411-5eed-412f-a9ea-2de24f542c2e
172 77186edf Kostas Papadimitriou
  status              : Accepted/Active (accepted policy: manual)
173 77186edf Kostas Papadimitriou
  email               : user@synnefo.org
174 77186edf Kostas Papadimitriou
  ....
175 f846d8df Constantinos Venetsanopoulos
176 3a0ce98e Constantinos Venetsanopoulos
Based on the `astakos-app` configuration, there are several ways for a user to
177 3a0ce98e Constantinos Venetsanopoulos
get verified and activated in order to be able to login. We discuss the user
178 3a0ce98e Constantinos Venetsanopoulos
verification and activation flow in the following section.
179 77186edf Kostas Papadimitriou
180 77186edf Kostas Papadimitriou
User activation flow
181 eab73849 Constantinos Venetsanopoulos
````````````````````
182 eab73849 Constantinos Venetsanopoulos
183 77186edf Kostas Papadimitriou
A user can register for an account using the astakos signup form. Once the form
184 77186edf Kostas Papadimitriou
is submited successfully a user entry is created in astakos database. That entry
185 77186edf Kostas Papadimitriou
is passed through the astakos activation backend which handles whether the user
186 77186edf Kostas Papadimitriou
should be automatically verified and activated.
187 77186edf Kostas Papadimitriou
188 77186edf Kostas Papadimitriou
Email verification
189 77186edf Kostas Papadimitriou
``````````````````
190 77186edf Kostas Papadimitriou
191 77186edf Kostas Papadimitriou
The verification process takes place in order to ensure that the user owns the
192 77186edf Kostas Papadimitriou
email provided during the signup process. By default, after each successful
193 0019cd7d Christos Stavrakakis
signup astakos notifies user with an verification url via email.
194 77186edf Kostas Papadimitriou
195 77186edf Kostas Papadimitriou
At this stage:
196 77186edf Kostas Papadimitriou
197 0019cd7d Christos Stavrakakis
    * subsequent registrations invalidate and delete the previous registrations
198 77186edf Kostas Papadimitriou
      of the same email address.
199 77186edf Kostas Papadimitriou
200 77186edf Kostas Papadimitriou
    * in case user misses the initial notification, additional emails can be
201 77186edf Kostas Papadimitriou
      send either via the url which is prompted to the user if he tries to
202 77186edf Kostas Papadimitriou
      login, or by the administrator using the ``snf-manage user-activation-send
203 77186edf Kostas Papadimitriou
      <userid>`` command.
204 77186edf Kostas Papadimitriou
205 77186edf Kostas Papadimitriou
    * administrator may also enforce a user to get verified using the
206 77186edf Kostas Papadimitriou
      ``snf-manage user-modify --verify <userid>`` command.
207 77186edf Kostas Papadimitriou
208 77186edf Kostas Papadimitriou
Account activation
209 77186edf Kostas Papadimitriou
``````````````````
210 77186edf Kostas Papadimitriou
211 3a0ce98e Constantinos Venetsanopoulos
Once the user gets verified, it is time for Astakos to decide whether or not to
212 77186edf Kostas Papadimitriou
proceed through user activation process. If ``ASTAKOS_MODERATION_ENABLED``
213 0019cd7d Christos Stavrakakis
setting is set to ``False`` (default value) user gets activated automatically.
214 77186edf Kostas Papadimitriou
215 3a0ce98e Constantinos Venetsanopoulos
In case the moderation is enabled Astakos may still automatically activate the
216 77186edf Kostas Papadimitriou
user in the following cases:
217 77186edf Kostas Papadimitriou
218 77186edf Kostas Papadimitriou
    * User email matches any of the regular expressions defined in
219 77186edf Kostas Papadimitriou
      ``ASTAKOS_RE_USER_EMAIL_PATTERNS`` (defaults to ``[]``)
220 77186edf Kostas Papadimitriou
    * User used a signup method (e.g. ``shibboleth``) for which automatic
221 0019cd7d Christos Stavrakakis
      activation is enabled (see
222 77186edf Kostas Papadimitriou
      :ref:`authentication methods policies <auth_methods_policies>`).
223 77186edf Kostas Papadimitriou
224 3a0ce98e Constantinos Venetsanopoulos
If all of the above fail to trigger automatic activation, an email is sent to
225 3a0ce98e Constantinos Venetsanopoulos
the persons listed in ``HELPDESK``, ``MANAGERS`` and ``ADMINS`` settings,
226 3a0ce98e Constantinos Venetsanopoulos
notifing that there is a new user pending for moderation and that it's up to
227 3a0ce98e Constantinos Venetsanopoulos
the administrator to decide if the user should be activated. The UI also shows
228 3a0ce98e Constantinos Venetsanopoulos
a corresponding 'pending moderation' message to the user. The administrator can
229 3a0ce98e Constantinos Venetsanopoulos
activate a user using the ``snf-manage user-modify`` command:
230 77186edf Kostas Papadimitriou
231 77186edf Kostas Papadimitriou
.. code-block:: console
232 77186edf Kostas Papadimitriou
233 77186edf Kostas Papadimitriou
    # command to activate a pending user
234 77186edf Kostas Papadimitriou
    $ snf-manage user-modify --accept <userid>
235 77186edf Kostas Papadimitriou
236 77186edf Kostas Papadimitriou
    # command to reject a pending user
237 77186edf Kostas Papadimitriou
    $ snf-manage user-modify --reject --reject-reason="spammer" <userid>
238 77186edf Kostas Papadimitriou
239 3a0ce98e Constantinos Venetsanopoulos
Once the activation process finishes, a greeting message is sent to the user
240 3a0ce98e Constantinos Venetsanopoulos
email address and a notification for the activation to the persons listed in
241 3a0ce98e Constantinos Venetsanopoulos
``HELPDESK``, ``MANAGERS`` and ``ADMINS`` settings. Once activated the user is
242 3a0ce98e Constantinos Venetsanopoulos
able to login and access the Synnefo services.
243 77186edf Kostas Papadimitriou
244 77186edf Kostas Papadimitriou
Additional authentication methods
245 77186edf Kostas Papadimitriou
`````````````````````````````````
246 77186edf Kostas Papadimitriou
247 77186edf Kostas Papadimitriou
Astakos supports third party logins from external identity providers. This
248 0019cd7d Christos Stavrakakis
can be usefull since it allows users to use their existing credentials to
249 77186edf Kostas Papadimitriou
login to astakos service.
250 77186edf Kostas Papadimitriou
251 77186edf Kostas Papadimitriou
Currently astakos supports the following identity providers:
252 77186edf Kostas Papadimitriou
253 77186edf Kostas Papadimitriou
    * `Shibboleth <http://www.internet2.edu/shibboleth>`_ (module name
254 77186edf Kostas Papadimitriou
      ``shibboleth``)
255 77186edf Kostas Papadimitriou
    * `Google <https://developers.google.com/accounts/docs/OAuth2>`_ (module
256 77186edf Kostas Papadimitriou
      name ``google``)
257 77186edf Kostas Papadimitriou
    * `Twitter <https://dev.twitter.com/docs/auth>`_ (module name ``twitter``)
258 77186edf Kostas Papadimitriou
    * `LinkedIn <http://developer.linkedin.com/documents/authentication>`_
259 77186edf Kostas Papadimitriou
      (module name ``linkedin``)
260 77186edf Kostas Papadimitriou
261 77186edf Kostas Papadimitriou
To enable any of the above modules (by default only ``local`` accounts are
262 0019cd7d Christos Stavrakakis
allowed), retrieve and set the required provider settings and append the
263 77186edf Kostas Papadimitriou
module name in ``ASTAKOS_IM_MODULES``.
264 77186edf Kostas Papadimitriou
265 77186edf Kostas Papadimitriou
.. code-block:: python
266 77186edf Kostas Papadimitriou
267 77186edf Kostas Papadimitriou
    # settings from https://code.google.com/apis/console/
268 77186edf Kostas Papadimitriou
    ASTAKOS_GOOGLE_CLIENT_ID = '1111111111-epi60tvimgha63qqnjo40cljkojcann3.apps.googleusercontent.com'
269 77186edf Kostas Papadimitriou
    ASTAKOS_GOOGLE_SECRET = 'tNDQqTDKlTf7_LaeUcWTWwZM'
270 0019cd7d Christos Stavrakakis
271 77186edf Kostas Papadimitriou
    # let users signup and login using their google account
272 77186edf Kostas Papadimitriou
    ASTAKOS_IM_MODULES = ['local', 'google']
273 77186edf Kostas Papadimitriou
274 77186edf Kostas Papadimitriou
275 77186edf Kostas Papadimitriou
.. _auth_methods_policies:
276 77186edf Kostas Papadimitriou
277 77186edf Kostas Papadimitriou
Authentication method policies
278 77186edf Kostas Papadimitriou
``````````````````````````````
279 77186edf Kostas Papadimitriou
280 0019cd7d Christos Stavrakakis
Astakos allows you to override the default policies for each enabled provider
281 0019cd7d Christos Stavrakakis
separately by adding the approriate settings in your ``.conf`` files in the
282 77186edf Kostas Papadimitriou
following format:
283 77186edf Kostas Papadimitriou
284 77186edf Kostas Papadimitriou
**ASTAKOS_AUTH_PROVIDER_<module>_<policy>_POLICY**
285 77186edf Kostas Papadimitriou
286 77186edf Kostas Papadimitriou
Available policies are:
287 77186edf Kostas Papadimitriou
288 0019cd7d Christos Stavrakakis
    * **CREATE** Users can signup using that provider (default: ``True``)
289 0019cd7d Christos Stavrakakis
    * **REMOVE/ADD** Users can remove/add login method from their profile
290 77186edf Kostas Papadimitriou
      (default: ``True``)
291 77186edf Kostas Papadimitriou
    * **AUTOMODERATE** Automatically activate users that signup using that
292 77186edf Kostas Papadimitriou
      provider (default: ``False``)
293 77186edf Kostas Papadimitriou
    * **LOGIN** Whether or not users can use the provider to login (default:
294 77186edf Kostas Papadimitriou
      ``True``).
295 77186edf Kostas Papadimitriou
296 0019cd7d Christos Stavrakakis
e.g. to enable automatic activation for your academic users, while keeping
297 77186edf Kostas Papadimitriou
locally signed up users under moderation you can apply the following settings.
298 77186edf Kostas Papadimitriou
299 77186edf Kostas Papadimitriou
.. code-block:: python
300 77186edf Kostas Papadimitriou
301 77186edf Kostas Papadimitriou
    ASTAKOS_AUTH_PROVIDER_SHIBBOLETH_AUTOMODERATE_POLICY = True
302 77186edf Kostas Papadimitriou
    ASTAKOS_AUTH_PROVIDER_SHIBBOLETH_REMOVE_POLICY = False
303 77186edf Kostas Papadimitriou
304 3a0ce98e Constantinos Venetsanopoulos
User login
305 3a0ce98e Constantinos Venetsanopoulos
~~~~~~~~~~
306 3a0ce98e Constantinos Venetsanopoulos
307 3a0ce98e Constantinos Venetsanopoulos
During the logging procedure, the user is authenticated by the respective
308 3a0ce98e Constantinos Venetsanopoulos
identity provider.
309 3a0ce98e Constantinos Venetsanopoulos
310 3a0ce98e Constantinos Venetsanopoulos
If ``ASTAKOS_RECAPTCHA_ENABLED`` is set and the user fails several times
311 3a0ce98e Constantinos Venetsanopoulos
(``ASTAKOS_RATELIMIT_RETRIES_ALLOWED`` setting) to provide the correct
312 3a0ce98e Constantinos Venetsanopoulos
credentials for a local account, he/she is then prompted to solve a captcha
313 3a0ce98e Constantinos Venetsanopoulos
challenge.
314 3a0ce98e Constantinos Venetsanopoulos
315 3a0ce98e Constantinos Venetsanopoulos
Upon success, the system renews the token (if it has expired), logins the user
316 3a0ce98e Constantinos Venetsanopoulos
and sets the cookie, before redirecting the user to the ``next`` parameter
317 3a0ce98e Constantinos Venetsanopoulos
value.
318 eab73849 Constantinos Venetsanopoulos
319 2988ae31 Georgios D. Tsoukalas
Setting quota limits
320 2988ae31 Georgios D. Tsoukalas
~~~~~~~~~~~~~~~~~~~~
321 2988ae31 Georgios D. Tsoukalas
322 075b91de Giorgos Korfiatis
Set default quota
323 075b91de Giorgos Korfiatis
`````````````````
324 f72ba65d Giorgos Korfiatis
To inspect current default base quota limits, run::
325 2988ae31 Georgios D. Tsoukalas
326 f72ba65d Giorgos Korfiatis
   # snf-manage resource-list
327 2988ae31 Georgios D. Tsoukalas
328 d61d6007 Giorgos Korfiatis
You can modify the default base quota limit for all future users with::
329 2988ae31 Georgios D. Tsoukalas
330 d61d6007 Giorgos Korfiatis
   # snf-manage resource-modify <resource_name> --default-quota <value>
331 2988ae31 Georgios D. Tsoukalas
332 075b91de Giorgos Korfiatis
Set base quota for individual users
333 075b91de Giorgos Korfiatis
```````````````````````````````````
334 2988ae31 Georgios D. Tsoukalas
335 075b91de Giorgos Korfiatis
For individual users that need different quota than the default
336 2988ae31 Georgios D. Tsoukalas
you can set it for each resource like this::
337 2988ae31 Georgios D. Tsoukalas
338 075b91de Giorgos Korfiatis
    # use this to display quota / uuid
339 075b91de Giorgos Korfiatis
    # snf-manage user-show 'uuid or email' --quota
340 2988ae31 Georgios D. Tsoukalas
341 45112d5a Giorgos Korfiatis
    # snf-manage user-modify <user-uuid> --base-quota 'cyclades.vm' 10
342 45112d5a Giorgos Korfiatis
343 45112d5a Giorgos Korfiatis
You can set base quota for all existing users, with possible exceptions, using::
344 45112d5a Giorgos Korfiatis
345 45112d5a Giorgos Korfiatis
    # snf-manage user-modify --all --base-quota cyclades.vm 10 --exclude uuid1,uuid2
346 2988ae31 Georgios D. Tsoukalas
347 5a0f9d6c Giorgos Korfiatis
All quota for which values different from the default have been set,
348 5a0f9d6c Giorgos Korfiatis
can be listed with::
349 5a0f9d6c Giorgos Korfiatis
350 5a0f9d6c Giorgos Korfiatis
    # snf-manage quota-list --with-custom=True
351 5a0f9d6c Giorgos Korfiatis
352 2988ae31 Georgios D. Tsoukalas
353 2988ae31 Georgios D. Tsoukalas
Enable the Projects feature
354 2988ae31 Georgios D. Tsoukalas
~~~~~~~~~~~~~~~~~~~~~~~~~~~
355 2988ae31 Georgios D. Tsoukalas
356 2988ae31 Georgios D. Tsoukalas
If you want to enable the projects feature so that users may apply
357 2988ae31 Georgios D. Tsoukalas
on their own for resources by creating and joining projects,
358 2988ae31 Georgios D. Tsoukalas
in ``20-snf-astakos-app-settings.conf`` set::
359 2988ae31 Georgios D. Tsoukalas
360 2988ae31 Georgios D. Tsoukalas
    # this will make the 'projects' page visible in the dashboard
361 2988ae31 Georgios D. Tsoukalas
    ASTAKOS_PROJECTS_VISIBLE = True
362 2988ae31 Georgios D. Tsoukalas
363 9770ba6c Giorgos Korfiatis
You can change the maximum allowed number of pending project applications
364 9770ba6c Giorgos Korfiatis
per user with::
365 827de879 Giorgos Korfiatis
366 d61d6007 Giorgos Korfiatis
    # snf-manage resource-modify astakos.pending_app --default-quota <number>
367 9770ba6c Giorgos Korfiatis
368 9770ba6c Giorgos Korfiatis
You can also set a user-specific limit with::
369 9770ba6c Giorgos Korfiatis
370 45112d5a Giorgos Korfiatis
    # snf-manage user-modify <user-uuid> --base-quota 'astakos.pending_app' 5
371 827de879 Giorgos Korfiatis
372 2988ae31 Georgios D. Tsoukalas
When users apply for projects they are not automatically granted
373 2988ae31 Georgios D. Tsoukalas
the resources. They must first be approved by the administrator.
374 2988ae31 Georgios D. Tsoukalas
375 2988ae31 Georgios D. Tsoukalas
To list pending project applications in astakos::
376 2988ae31 Georgios D. Tsoukalas
377 2988ae31 Georgios D. Tsoukalas
    # snf-manage project-list --pending
378 2988ae31 Georgios D. Tsoukalas
379 2988ae31 Georgios D. Tsoukalas
Note the last column, the application id. To approve it::
380 2988ae31 Georgios D. Tsoukalas
381 2988ae31 Georgios D. Tsoukalas
    # <app id> from the last column of project-list
382 2988ae31 Georgios D. Tsoukalas
    # snf-manage project-control --approve <app id>
383 2988ae31 Georgios D. Tsoukalas
384 2988ae31 Georgios D. Tsoukalas
To deny an application::
385 2988ae31 Georgios D. Tsoukalas
386 2988ae31 Georgios D. Tsoukalas
    # snf-manage project-control --deny <app id>
387 2988ae31 Georgios D. Tsoukalas
388 827de879 Giorgos Korfiatis
Users designated as *project admins* can approve, deny, or modify
389 827de879 Giorgos Korfiatis
an application through the web interface. In
390 827de879 Giorgos Korfiatis
``20-snf-astakos-app-settings.conf`` set::
391 827de879 Giorgos Korfiatis
392 827de879 Giorgos Korfiatis
    # UUIDs of users that can approve or deny project applications from the web.
393 827de879 Giorgos Korfiatis
    ASTAKOS_PROJECT_ADMINS = [<uuid>, ...]
394 2988ae31 Georgios D. Tsoukalas
395 2988ae31 Georgios D. Tsoukalas
396 eab73849 Constantinos Venetsanopoulos
Astakos advanced operations
397 eab73849 Constantinos Venetsanopoulos
---------------------------
398 eab73849 Constantinos Venetsanopoulos
399 eab73849 Constantinos Venetsanopoulos
Adding "Terms of Use"
400 eab73849 Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~~~~
401 eab73849 Constantinos Venetsanopoulos
402 eab73849 Constantinos Venetsanopoulos
Astakos supports versioned terms-of-use. First of all you need to create an
403 eab73849 Constantinos Venetsanopoulos
html file that will contain your terms. For example, create the file
404 eab73849 Constantinos Venetsanopoulos
``/usr/share/synnefo/sample-terms.html``, which contains the following:
405 eab73849 Constantinos Venetsanopoulos
406 eab73849 Constantinos Venetsanopoulos
.. code-block:: console
407 eab73849 Constantinos Venetsanopoulos
408 3a0ce98e Constantinos Venetsanopoulos
   <h1>My cloud service terms</h1>
409 eab73849 Constantinos Venetsanopoulos
410 3a0ce98e Constantinos Venetsanopoulos
   These are the example terms for my cloud service
411 eab73849 Constantinos Venetsanopoulos
412 eab73849 Constantinos Venetsanopoulos
Then, add those terms-of-use with the snf-manage command:
413 eab73849 Constantinos Venetsanopoulos
414 eab73849 Constantinos Venetsanopoulos
.. code-block:: console
415 eab73849 Constantinos Venetsanopoulos
416 eab73849 Constantinos Venetsanopoulos
   $ snf-manage term-add /usr/share/synnefo/sample-terms.html
417 eab73849 Constantinos Venetsanopoulos
418 eab73849 Constantinos Venetsanopoulos
Your terms have been successfully added and you will see the corresponding link
419 eab73849 Constantinos Venetsanopoulos
appearing in the Astakos web pages' footer.
420 eab73849 Constantinos Venetsanopoulos
421 3a0ce98e Constantinos Venetsanopoulos
During the account registration, if there are approval terms, the user is
422 3a0ce98e Constantinos Venetsanopoulos
presented with an "I agree with the Terms" checkbox that needs to get checked
423 3a0ce98e Constantinos Venetsanopoulos
in order to proceed.
424 3a0ce98e Constantinos Venetsanopoulos
425 3a0ce98e Constantinos Venetsanopoulos
In case there are new approval terms that the user has not signed yet, the
426 3a0ce98e Constantinos Venetsanopoulos
``signed_terms_required`` view decorator redirects to the ``approval_terms``
427 3a0ce98e Constantinos Venetsanopoulos
view, so the user will be presented with the new terms the next time he/she
428 3a0ce98e Constantinos Venetsanopoulos
logins.
429 3a0ce98e Constantinos Venetsanopoulos
430 a23251f4 Constantinos Venetsanopoulos
Enabling reCAPTCHA
431 a23251f4 Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~
432 a23251f4 Constantinos Venetsanopoulos
433 a23251f4 Constantinos Venetsanopoulos
Astakos supports the `reCAPTCHA <http://www.google.com/recaptcha>`_ feature.
434 a23251f4 Constantinos Venetsanopoulos
If enabled, it protects the Astakos forms from bots. To enable the feature, go
435 a23251f4 Constantinos Venetsanopoulos
to https://www.google.com/recaptcha/admin/create and create your own reCAPTCHA
436 a23251f4 Constantinos Venetsanopoulos
key pair. Then edit ``/etc/synnefo/20-snf-astakos-app-settings.conf`` and set
437 a23251f4 Constantinos Venetsanopoulos
the corresponding variables to reflect your newly created key pair. Finally, set
438 a23251f4 Constantinos Venetsanopoulos
the ``ASTAKOS_RECAPTCHA_ENABLED`` variable to ``True``:
439 a23251f4 Constantinos Venetsanopoulos
440 a23251f4 Constantinos Venetsanopoulos
.. code-block:: console
441 a23251f4 Constantinos Venetsanopoulos
442 a23251f4 Constantinos Venetsanopoulos
   ASTAKOS_RECAPTCHA_PUBLIC_KEY = 'example_recaptcha_public_key!@#$%^&*('
443 a23251f4 Constantinos Venetsanopoulos
   ASTAKOS_RECAPTCHA_PRIVATE_KEY = 'example_recaptcha_private_key!@#$%^&*('
444 a23251f4 Constantinos Venetsanopoulos
445 a23251f4 Constantinos Venetsanopoulos
   ASTAKOS_RECAPTCHA_ENABLED = True
446 a23251f4 Constantinos Venetsanopoulos
447 a23251f4 Constantinos Venetsanopoulos
Restart the service on the Astakos node(s) and you are ready:
448 a23251f4 Constantinos Venetsanopoulos
449 a23251f4 Constantinos Venetsanopoulos
.. code-block:: console
450 a23251f4 Constantinos Venetsanopoulos
451 a23251f4 Constantinos Venetsanopoulos
   # /etc/init.d/gunicorn restart
452 a23251f4 Constantinos Venetsanopoulos
453 a23251f4 Constantinos Venetsanopoulos
Checkout your new Sign up page. If you see the reCAPTCHA box, you have setup
454 a23251f4 Constantinos Venetsanopoulos
everything correctly.
455 a23251f4 Constantinos Venetsanopoulos
456 eab73849 Constantinos Venetsanopoulos
457 3a0ce98e Constantinos Venetsanopoulos
Astakos internals
458 3a0ce98e Constantinos Venetsanopoulos
-----------------
459 3a0ce98e Constantinos Venetsanopoulos
460 3a0ce98e Constantinos Venetsanopoulos
X-Auth-Token
461 3a0ce98e Constantinos Venetsanopoulos
~~~~~~~~~~~~
462 3a0ce98e Constantinos Venetsanopoulos
463 3a0ce98e Constantinos Venetsanopoulos
Alice requests a specific resource from a cloud service e.g.: Pithos. In the
464 3a0ce98e Constantinos Venetsanopoulos
request she supplies the `X-Auth-Token` to identify whether she is eligible to
465 3a0ce98e Constantinos Venetsanopoulos
perform the specific task. The service contacts Astakos through its
466 3a0ce98e Constantinos Venetsanopoulos
``/account/v1.0/authenticate`` api call (see :ref:`authenticate-api-label`)
467 3a0ce98e Constantinos Venetsanopoulos
providing the specific ``X-Auth-Token``. Astakos checkes whether the token
468 3a0ce98e Constantinos Venetsanopoulos
belongs to an active user and it has not expired and returns a dictionary
469 3a0ce98e Constantinos Venetsanopoulos
containing user related information. Finally the service uses the ``uniq``
470 3a0ce98e Constantinos Venetsanopoulos
field included in the dictionary as the account string to identify the user
471 3a0ce98e Constantinos Venetsanopoulos
accessible resources.
472 3a0ce98e Constantinos Venetsanopoulos
473 3a0ce98e Constantinos Venetsanopoulos
.. _authentication-label:
474 3a0ce98e Constantinos Venetsanopoulos
475 3a0ce98e Constantinos Venetsanopoulos
Django Auth methods and Backends
476 3a0ce98e Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477 3a0ce98e Constantinos Venetsanopoulos
478 3a0ce98e Constantinos Venetsanopoulos
Astakos incorporates Django user authentication system and extends its User model.
479 3a0ce98e Constantinos Venetsanopoulos
480 3a0ce98e Constantinos Venetsanopoulos
Since username field of django User model has a limitation of 30 characters,
481 3a0ce98e Constantinos Venetsanopoulos
AstakosUser is **uniquely** identified by the ``email`` instead. Therefore,
482 3a0ce98e Constantinos Venetsanopoulos
``astakos.im.authentication_backends.EmailBackend`` is served to authenticate a
483 3a0ce98e Constantinos Venetsanopoulos
user using email if the first argument is actually an email, otherwise tries
484 3a0ce98e Constantinos Venetsanopoulos
the username.
485 3a0ce98e Constantinos Venetsanopoulos
486 3a0ce98e Constantinos Venetsanopoulos
A new AstakosUser instance is assigned with a uui as username and also with a
487 3a0ce98e Constantinos Venetsanopoulos
``auth_token`` used by the cloud services to authenticate the user.
488 3a0ce98e Constantinos Venetsanopoulos
``astakos.im.authentication_backends.TokenBackend`` is also specified in order
489 3a0ce98e Constantinos Venetsanopoulos
to authenticate the user using the email and the token fields.
490 3a0ce98e Constantinos Venetsanopoulos
491 3a0ce98e Constantinos Venetsanopoulos
Logged on users can perform a number of actions:
492 3a0ce98e Constantinos Venetsanopoulos
493 3a0ce98e Constantinos Venetsanopoulos
 * access and edit their profile via: ``/im/profile``.
494 3a0ce98e Constantinos Venetsanopoulos
 * change their password via: ``/im/password``
495 3a0ce98e Constantinos Venetsanopoulos
 * send feedback for grnet services via: ``/im/send_feedback``
496 3a0ce98e Constantinos Venetsanopoulos
 * logout (and delete cookie) via: ``/im/logout``
497 3a0ce98e Constantinos Venetsanopoulos
498 3a0ce98e Constantinos Venetsanopoulos
Internal Astakos requests are handled using cookie-based Django user sessions.
499 3a0ce98e Constantinos Venetsanopoulos
500 3a0ce98e Constantinos Venetsanopoulos
External systems should forward to the ``/login`` URI. The server,
501 3a0ce98e Constantinos Venetsanopoulos
depending on its configuration will redirect to the appropriate login page.
502 3a0ce98e Constantinos Venetsanopoulos
When done with logging in, the service's login URI should redirect to the URI
503 3a0ce98e Constantinos Venetsanopoulos
provided with next, adding user and token parameters, which contain the email
504 3a0ce98e Constantinos Venetsanopoulos
and token fields respectively.
505 3a0ce98e Constantinos Venetsanopoulos
506 3a0ce98e Constantinos Venetsanopoulos
The login URI accepts the following parameters:
507 3a0ce98e Constantinos Venetsanopoulos
508 3a0ce98e Constantinos Venetsanopoulos
======================  =========================
509 3a0ce98e Constantinos Venetsanopoulos
Request Parameter Name  Value
510 3a0ce98e Constantinos Venetsanopoulos
======================  =========================
511 3a0ce98e Constantinos Venetsanopoulos
next                    The URI to redirect to when the process is finished
512 3a0ce98e Constantinos Venetsanopoulos
renew                   Force token renewal (no value parameter)
513 3a0ce98e Constantinos Venetsanopoulos
force                   Force logout current user (no value parameter)
514 3a0ce98e Constantinos Venetsanopoulos
======================  =========================
515 3a0ce98e Constantinos Venetsanopoulos
516 3a0ce98e Constantinos Venetsanopoulos
External systems inside the ``ASTAKOS_COOKIE_DOMAIN`` scope can acquire the
517 3a0ce98e Constantinos Venetsanopoulos
user information by the cookie identified by ``ASTAKOS_COOKIE_NAME`` setting
518 3a0ce98e Constantinos Venetsanopoulos
(set during the login procedure).
519 3a0ce98e Constantinos Venetsanopoulos
520 3a0ce98e Constantinos Venetsanopoulos
Finally, backend systems having acquired a token can use the
521 3a0ce98e Constantinos Venetsanopoulos
:ref:`authenticate-api-label` API call from a private network or through HTTPS.
522 3a0ce98e Constantinos Venetsanopoulos
523 3a0ce98e Constantinos Venetsanopoulos
524 e6d3ee61 Sofia Papagiannaki
File/Object Storage Service (Pithos+)
525 e6d3ee61 Sofia Papagiannaki
====================================
526 e6d3ee61 Sofia Papagiannaki
527 e6d3ee61 Sofia Papagiannaki
Pithos+ is the Synnefo component that implements a storage service and exposes
528 e6d3ee61 Sofia Papagiannaki
the associated OpenStack REST APIs with custom extensions.
529 e6d3ee61 Sofia Papagiannaki
530 e6d3ee61 Sofia Papagiannaki
Pithos+ advanced operations
531 e6d3ee61 Sofia Papagiannaki
---------------------------
532 e6d3ee61 Sofia Papagiannaki
533 e6d3ee61 Sofia Papagiannaki
Enable separate domain for serving user content
534 e6d3ee61 Sofia Papagiannaki
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
535 e6d3ee61 Sofia Papagiannaki
536 e6d3ee61 Sofia Papagiannaki
Since Synnefo v0.15, there is a possibility to serve untrusted user content
537 e6d3ee61 Sofia Papagiannaki
in an isolated domain.
538 e6d3ee61 Sofia Papagiannaki
539 e6d3ee61 Sofia Papagiannaki
Enabling this feature consists of the following steps:
540 e6d3ee61 Sofia Papagiannaki
541 e6d3ee61 Sofia Papagiannaki
#. **Declare new domain in apache server**
542 e6d3ee61 Sofia Papagiannaki
543 e6d3ee61 Sofia Papagiannaki
   In order to enable the apache server to serve several domains it is required
544 e6d3ee61 Sofia Papagiannaki
   to setup several virtual hosts.
545 e6d3ee61 Sofia Papagiannaki
   Therefore, for adding the new domain e.g. "user-content.example.com", append
546 e6d3ee61 Sofia Papagiannaki
   the following in ``/etc/apache2/sites-available/synnefo-ssl``:
547 e6d3ee61 Sofia Papagiannaki
548 e6d3ee61 Sofia Papagiannaki
    .. code-block:: console
549 e6d3ee61 Sofia Papagiannaki
550 e6d3ee61 Sofia Papagiannaki
        <VirtualHost _default_:443>
551 e6d3ee61 Sofia Papagiannaki
            ServerName user-content.example.com
552 e6d3ee61 Sofia Papagiannaki
553 e6d3ee61 Sofia Papagiannaki
            Alias /static "/usr/share/synnefo/static"
554 e6d3ee61 Sofia Papagiannaki
555 e6d3ee61 Sofia Papagiannaki
            #  SetEnv no-gzip
556 e6d3ee61 Sofia Papagiannaki
            #  SetEnv dont-vary
557 e6d3ee61 Sofia Papagiannaki
558 e6d3ee61 Sofia Papagiannaki
           AllowEncodedSlashes On
559 e6d3ee61 Sofia Papagiannaki
560 e6d3ee61 Sofia Papagiannaki
           RequestHeader set X-Forwarded-Protocol "https"
561 e6d3ee61 Sofia Papagiannaki
562 e6d3ee61 Sofia Papagiannaki
        <Proxy * >
563 e6d3ee61 Sofia Papagiannaki
            Order allow,deny
564 e6d3ee61 Sofia Papagiannaki
            Allow from all
565 e6d3ee61 Sofia Papagiannaki
        </Proxy>
566 e6d3ee61 Sofia Papagiannaki
567 e6d3ee61 Sofia Papagiannaki
            SetEnv                proxy-sendchunked
568 e6d3ee61 Sofia Papagiannaki
            SSLProxyEngine        off
569 e6d3ee61 Sofia Papagiannaki
            ProxyErrorOverride    off
570 e6d3ee61 Sofia Papagiannaki
571 e6d3ee61 Sofia Papagiannaki
            ProxyPass        /static !
572 e6d3ee61 Sofia Papagiannaki
            ProxyPass        / http://localhost:8080/ retry=0
573 e6d3ee61 Sofia Papagiannaki
            ProxyPassReverse / http://localhost:8080/
574 e6d3ee61 Sofia Papagiannaki
575 e6d3ee61 Sofia Papagiannaki
            RewriteEngine On
576 e6d3ee61 Sofia Papagiannaki
            RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC]
577 e6d3ee61 Sofia Papagiannaki
            RewriteRule ^(.*)$ - [F,L]
578 e6d3ee61 Sofia Papagiannaki
579 e6d3ee61 Sofia Papagiannaki
            SSLEngine on
580 e6d3ee61 Sofia Papagiannaki
            SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
581 e6d3ee61 Sofia Papagiannaki
            SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
582 e6d3ee61 Sofia Papagiannaki
        </VirtualHost>
583 e6d3ee61 Sofia Papagiannaki
584 e6d3ee61 Sofia Papagiannaki
    .. note:: Consider also to purchase and install a certificate for the new
585 e6d3ee61 Sofia Papagiannaki
              domain.
586 e6d3ee61 Sofia Papagiannaki
587 e6d3ee61 Sofia Papagiannaki
588 e6d3ee61 Sofia Papagiannaki
    Finally, restart the apache server::
589 e6d3ee61 Sofia Papagiannaki
590 e6d3ee61 Sofia Papagiannaki
        pithos-host$ /etc/init.d/apache2 restart
591 e6d3ee61 Sofia Papagiannaki
592 e6d3ee61 Sofia Papagiannaki
#. **Register Pithos+ as an OAuth2 client in Astakos**
593 e6d3ee61 Sofia Papagiannaki
594 e6d3ee61 Sofia Papagiannaki
   Starting from synnefo version 0.15, in order to view the content of a
595 e6d3ee61 Sofia Papagiannaki
   protected resource, Pithos+ (on behalf of the user) has to be granted
596 e6d3ee61 Sofia Papagiannaki
   authorization for the specific resource by Astakos.
597 e6d3ee61 Sofia Papagiannaki
598 e6d3ee61 Sofia Papagiannaki
   During the authorization grant procedure, Pithos+ has to authenticate
599 e6d3ee61 Sofia Papagiannaki
   itself with Astakos since the latter has to prevent serving requests by
600 e6d3ee61 Sofia Papagiannaki
   unknown/unauthorized clients.
601 e6d3ee61 Sofia Papagiannaki
602 e6d3ee61 Sofia Papagiannaki
   Therefore, in the installation guide you were guided to register Pithos+
603 e6d3ee61 Sofia Papagiannaki
   as an OAuth2 client in Astakos.
604 e6d3ee61 Sofia Papagiannaki
605 e6d3ee61 Sofia Papagiannaki
   .. note:: You can see the registered clients by running::
606 e6d3ee61 Sofia Papagiannaki
    astakos-host$ snf-manage oauth2-client-list -o identifier,redirect_urls,is_trusted
607 e6d3ee61 Sofia Papagiannaki
608 e6d3ee61 Sofia Papagiannaki
   However, requests originated from the new domain will be rejected since
609 e6d3ee61 Sofia Papagiannaki
   Astakos is ignorant about the new domain.
610 e6d3ee61 Sofia Papagiannaki
611 e6d3ee61 Sofia Papagiannaki
   Therefore, you need to register a new client pointing to the unsafe domain.
612 e6d3ee61 Sofia Papagiannaki
   To do so, use the following command::
613 e6d3ee61 Sofia Papagiannaki
614 e6d3ee61 Sofia Papagiannaki
        astakos-host$ snf-manage oauth2-client-add pithos-unsafe-domain --secret=<secret> --is-trusted --url https://user-content.example.com/pithos/ui/view
615 e6d3ee61 Sofia Papagiannaki
616 e6d3ee61 Sofia Papagiannaki
617 e6d3ee61 Sofia Papagiannaki
   .. note:: You can also unregister the client pointing to the safe domain,
618 e6d3ee61 Sofia Papagiannaki
       since it will no longer be useful.
619 e6d3ee61 Sofia Papagiannaki
       To do so, run the following::
620 e6d3ee61 Sofia Papagiannaki
621 e6d3ee61 Sofia Papagiannaki
        astakos-host$ snf-manage oauth2-client-remove pithos-view
622 e6d3ee61 Sofia Papagiannaki
623 e6d3ee61 Sofia Papagiannaki
#. **Update Pithos+ configuration**
624 e6d3ee61 Sofia Papagiannaki
625 e6d3ee61 Sofia Papagiannaki
   Respectively, the ``PITHOS_OAUTH2_CLIENT_CREDENTIALS`` setting should be
626 e6d3ee61 Sofia Papagiannaki
   updated to contain the credentials of the client registered in the previous
627 e6d3ee61 Sofia Papagiannaki
   step.
628 e6d3ee61 Sofia Papagiannaki
629 e6d3ee61 Sofia Papagiannaki
   Furthermore, you need to restrict all the requests for user content
630 e6d3ee61 Sofia Papagiannaki
   to be served exclusively by the unsafe domain.
631 e6d3ee61 Sofia Papagiannaki
632 e6d3ee61 Sofia Papagiannaki
   To enable this, set the ``PITHOS_UNSAFE_DOMAIN`` setting to the value
633 e6d3ee61 Sofia Papagiannaki
   of the new domain e.g. "user-content.example.com"
634 e6d3ee61 Sofia Papagiannaki
635 e6d3ee61 Sofia Papagiannaki
   Finally, restart the gunicorn server::
636 e6d3ee61 Sofia Papagiannaki
637 e6d3ee61 Sofia Papagiannaki
        pithos-host$ /etc/init.d/gunicorn restart
638 e6d3ee61 Sofia Papagiannaki
639 e6d3ee61 Sofia Papagiannaki
640 eab73849 Constantinos Venetsanopoulos
Compute/Network/Image Service (Cyclades)
641 eab73849 Constantinos Venetsanopoulos
========================================
642 eab73849 Constantinos Venetsanopoulos
643 6d8a47d0 Christos Stavrakakis
Introduction
644 6d8a47d0 Christos Stavrakakis
------------
645 6d8a47d0 Christos Stavrakakis
646 6d8a47d0 Christos Stavrakakis
Cyclades is the Synnefo component that implements Compute, Network and Image
647 6d8a47d0 Christos Stavrakakis
services and exposes the associated OpenStack REST APIs. By running Cyclades
648 6d8a47d0 Christos Stavrakakis
you can provide a cloud that can handle thousands of virtual servers and
649 6d8a47d0 Christos Stavrakakis
networks.
650 6d8a47d0 Christos Stavrakakis
651 6d8a47d0 Christos Stavrakakis
Cyclades does not include any virtualization software and knows nothing about
652 6d8a47d0 Christos Stavrakakis
the low-level VM management operations, e.g. handling of VM creation or
653 6d8a47d0 Christos Stavrakakis
migrations among physical nodes. Instead, Cyclades is the component that
654 6d8a47d0 Christos Stavrakakis
handles multiple Ganeti backends and exposes the REST APIs. The administrator
655 6d8a47d0 Christos Stavrakakis
can expand the infrastructure dynamically either by adding more Ganeti nodes
656 6d8a47d0 Christos Stavrakakis
or by adding new Ganeti clusters. Cyclades issue VM control commands to Ganeti
657 6d8a47d0 Christos Stavrakakis
via Ganeti's remote API and receive asynchronous notifications from Ganeti
658 6d8a47d0 Christos Stavrakakis
backends whenever the state of a VM changes, due to Synnefo- or
659 6d8a47d0 Christos Stavrakakis
administrator-initiated commands.
660 6d8a47d0 Christos Stavrakakis
661 6d8a47d0 Christos Stavrakakis
Cyclades is the action orchestrator and the API layer on top of multiple Ganeti
662 6d8a47d0 Christos Stavrakakis
clusters. By this decoupled design, Ganeti cluster are self-contained and
663 6d8a47d0 Christos Stavrakakis
the administrator has complete control on them without Cyclades knowing about
664 6d8a47d0 Christos Stavrakakis
it. For example a VM migration to a different physical node is transparent
665 6d8a47d0 Christos Stavrakakis
to Cyclades.
666 6d8a47d0 Christos Stavrakakis
667 eab73849 Constantinos Venetsanopoulos
Working with Cyclades
668 eab73849 Constantinos Venetsanopoulos
---------------------
669 eab73849 Constantinos Venetsanopoulos
670 6d8a47d0 Christos Stavrakakis
Flavors
671 6d8a47d0 Christos Stavrakakis
~~~~~~~
672 6d8a47d0 Christos Stavrakakis
673 6d8a47d0 Christos Stavrakakis
When creating a VM, the user must specify the `flavor` of the virtual server.
674 6d8a47d0 Christos Stavrakakis
Flavors are the virtual hardware templates, and provide a description about
675 6d8a47d0 Christos Stavrakakis
the number of CPUs, the amount of RAM, and the size of the disk of the VM.
676 6d8a47d0 Christos Stavrakakis
Besides the size of the disk, Cyclades flavors describe the storage backend
677 6d8a47d0 Christos Stavrakakis
that will be used for the virtual server.
678 6d8a47d0 Christos Stavrakakis
679 6d8a47d0 Christos Stavrakakis
Flavors are created by the administrator and the user can select one of the
680 06f25e46 Christos Stavrakakis
available flavors. After VM creation, the user can resize his VM, by
681 06f25e46 Christos Stavrakakis
adding/removing CPU and RAM.
682 6d8a47d0 Christos Stavrakakis
683 6d8a47d0 Christos Stavrakakis
Cyclades support different storage backends that are described by the disk
684 6d8a47d0 Christos Stavrakakis
template of the flavor, which is mapped to Ganeti's instance `disk template`.
685 6d8a47d0 Christos Stavrakakis
Currently the available disk templates are the following:
686 6d8a47d0 Christos Stavrakakis
687 6d8a47d0 Christos Stavrakakis
* `file`: regulars file
688 6d8a47d0 Christos Stavrakakis
* `sharedfile`: regular files on a shared directory, e.g. NFS
689 6d8a47d0 Christos Stavrakakis
* `plain`: logical volumes
690 6d8a47d0 Christos Stavrakakis
* `drbd`: drbd on top of lvm volumes
691 6d8a47d0 Christos Stavrakakis
* `rbd`: rbd volumes residing inside a RADOS cluster
692 6d8a47d0 Christos Stavrakakis
* `ext`: disks provided by an external shared storage.
693 6d8a47d0 Christos Stavrakakis
694 6d8a47d0 Christos Stavrakakis
  - `ext_archipelago`: External shared storage provided by
695 6d8a47d0 Christos Stavrakakis
    `Archipelago <http://www.synnefo.org/docs/archipelago/latest/index.html>`_.
696 6d8a47d0 Christos Stavrakakis
697 6d8a47d0 Christos Stavrakakis
Flavors are created by the administrator using `snf-manage flavor-create`
698 6d8a47d0 Christos Stavrakakis
command. The command takes as argument number of CPUs, amount of RAM, the size
699 6d8a47d0 Christos Stavrakakis
of the disks and the disk templates and create the flavors that belong to the
700 6d8a47d0 Christos Stavrakakis
cartesian product of the specified arguments. For example, the following
701 6d8a47d0 Christos Stavrakakis
command will create two flavors of `40G` disk size with `drbd` disk template,
702 6d8a47d0 Christos Stavrakakis
`4G` RAM and `2` or `4` CPUs.
703 6d8a47d0 Christos Stavrakakis
704 6d8a47d0 Christos Stavrakakis
.. code-block:: console
705 6d8a47d0 Christos Stavrakakis
706 0019cd7d Christos Stavrakakis
  $ snf-manage flavor-create 2,4 4096 40 drbd
707 6d8a47d0 Christos Stavrakakis
708 62b76f38 Christos Stavrakakis
To see the available flavors, run `snf-manage flavor-list` command. The
709 62b76f38 Christos Stavrakakis
administrator can delete a flavor by using `flavor-modify` command:
710 6d8a47d0 Christos Stavrakakis
711 6d8a47d0 Christos Stavrakakis
.. code-block:: console
712 6d8a47d0 Christos Stavrakakis
713 0019cd7d Christos Stavrakakis
  $ snf-manage flavor-modify --deleted=True <flavor_id>
714 6d8a47d0 Christos Stavrakakis
715 62b76f38 Christos Stavrakakis
Finally, the administrator can set if new servers can be created from a flavor
716 62b76f38 Christos Stavrakakis
or not, by setting the `allow_create` attribute:
717 62b76f38 Christos Stavrakakis
718 62b76f38 Christos Stavrakakis
.. code-block:: console
719 62b76f38 Christos Stavrakakis
720 62b76f38 Christos Stavrakakis
  $ snf-manage flavor-modify --allow-create=False <flavor_id>
721 62b76f38 Christos Stavrakakis
722 62b76f38 Christos Stavrakakis
Flavors that are marked with `allow_create=False` cannot be used by users to
723 62b76f38 Christos Stavrakakis
create new servers. However, they can still be used to resize existing VMs.
724 62b76f38 Christos Stavrakakis
725 62b76f38 Christos Stavrakakis
726 6d8a47d0 Christos Stavrakakis
Images
727 6d8a47d0 Christos Stavrakakis
~~~~~~
728 6d8a47d0 Christos Stavrakakis
729 6d8a47d0 Christos Stavrakakis
When creating a VM the user must also specify the `image` of the virtual
730 6d8a47d0 Christos Stavrakakis
server. Images are the static templates from which VM instances are
731 6d8a47d0 Christos Stavrakakis
initiated. Cyclades uses Pithos to store system and user-provided images,
732 6d8a47d0 Christos Stavrakakis
taking advantage of all Pithos features, like deduplication and syncing
733 6d8a47d0 Christos Stavrakakis
protocol. An image is a file stored to Pithos with additional metadata that
734 6d8a47d0 Christos Stavrakakis
are describing the image, e.g. the OS family or the root partition. To create
735 6d8a47d0 Christos Stavrakakis
a new image, the administrator or the user has to upload it a file to Pithos,
736 6d8a47d0 Christos Stavrakakis
and then register it as an Image with Cyclades. Then the user can use this
737 6d8a47d0 Christos Stavrakakis
image to spawn new VMs from it.
738 6d8a47d0 Christos Stavrakakis
739 6d8a47d0 Christos Stavrakakis
Images can be private, public or shared between users, exactly like Pithos
740 6d8a47d0 Christos Stavrakakis
files. Since user-provided public images can be untrusted, the administrator
741 6d8a47d0 Christos Stavrakakis
can denote which users are trusted by adding them to the
742 0019cd7d Christos Stavrakakis
``UI_SYSTEM_IMAGES_OWNERS`` setting in the
743 6d8a47d0 Christos Stavrakakis
`/etc/synnefo/20-snf-cyclades-app-ui.conf` file. Images of those users are
744 6d8a47d0 Christos Stavrakakis
properly displayed in the UI.
745 6d8a47d0 Christos Stavrakakis
746 6d8a47d0 Christos Stavrakakis
When creating a new VM, Cyclades pass the location of the image and it's
747 6d8a47d0 Christos Stavrakakis
metadata to Ganeti. After Ganeti creates the instance's disk, `snf-image`
748 6d8a47d0 Christos Stavrakakis
will copy the image to the new disk and perform the image customization
749 6d8a47d0 Christos Stavrakakis
phase. During the phase, `snf-image` sends notifications to Cyclades about
750 6d8a47d0 Christos Stavrakakis
the progress of the image deployment and customization. Customization includes
751 6d8a47d0 Christos Stavrakakis
resizing the root file system, file injection (e.g. SSH keys) and setting
752 6d8a47d0 Christos Stavrakakis
a custom hostname. For better understanding of `snf-image` read the
753 6d8a47d0 Christos Stavrakakis
corresponding `documentation
754 6d8a47d0 Christos Stavrakakis
<http://www.synnefo.org/docs/snf-image/latest/index.html>`_.
755 6d8a47d0 Christos Stavrakakis
756 6d8a47d0 Christos Stavrakakis
For passing sensitive data about the image to Ganeti, like the VMs password,
757 6d8a47d0 Christos Stavrakakis
Cyclades keeps all sensitive data in memory caches (memcache) and never allows
758 6d8a47d0 Christos Stavrakakis
them to hit the disk. The data are exposed to `snf-image` via an one-time URL
759 6d8a47d0 Christos Stavrakakis
that is exposed from the `vmapi` application. So, instead of passing sensitive
760 6d8a47d0 Christos Stavrakakis
data to `snf-image` via Ganeti, Cyclades pass an one-time configuration URL
761 6d8a47d0 Christos Stavrakakis
that contains a random UUID. After `snf-image` gets the sensitive data, the
762 6d8a47d0 Christos Stavrakakis
URL is invalidated so no one else can access them.
763 6d8a47d0 Christos Stavrakakis
764 6d8a47d0 Christos Stavrakakis
The administrator can register images, exactly like users, using a system user
765 0019cd7d Christos Stavrakakis
(a user that is defined in the ``UI_SYSTEM_IMAGES_OWNERS`` setting). For
766 6d8a47d0 Christos Stavrakakis
example, the following command will register the
767 6d8a47d0 Christos Stavrakakis
`pithos://u53r-un1qu3-1d/images/debian_base-6.0-7-x86_64.diskdump` as an
768 6d8a47d0 Christos Stavrakakis
image to Cyclades:
769 6d8a47d0 Christos Stavrakakis
770 6d8a47d0 Christos Stavrakakis
.. code-block:: console
771 6d8a47d0 Christos Stavrakakis
772 f92dffed Christos Stavrakakis
 $ kamaki image register --name="Debian Base" \
773 d3cf0b89 Stavros Sachtouris
        --location=pithos://u53r-un1qu3-1d/images/debian_base-6.0-7-x86_64.diskdump \
774 6d8a47d0 Christos Stavrakakis
        --public \
775 6d8a47d0 Christos Stavrakakis
        --disk-format=diskdump \
776 6d8a47d0 Christos Stavrakakis
        --property OSFAMILY=linux --property ROOT_PARTITION=1 \
777 6d8a47d0 Christos Stavrakakis
        --property description="Debian Squeeze Base System" \
778 6d8a47d0 Christos Stavrakakis
        --property size=451 --property kernel=2.6.32 --property GUI="No GUI" \
779 6d8a47d0 Christos Stavrakakis
        --property sortorder=1 --property USERS=root --property OS=debian
780 6d8a47d0 Christos Stavrakakis
781 6d8a47d0 Christos Stavrakakis
Deletion of an image is done via `kamaki image unregister` command, which will
782 6d8a47d0 Christos Stavrakakis
delete the Cyclades Images but will leave the Pithos file as is (unregister).
783 6d8a47d0 Christos Stavrakakis
784 6d8a47d0 Christos Stavrakakis
Apart from using `kamaki` to see and hangle the available images, the
785 6d8a47d0 Christos Stavrakakis
administrator can use `snf-manage image-list` and `snf-manage image-show`
786 6d8a47d0 Christos Stavrakakis
commands to list and inspect the available public images. Also, the `--user-id`
787 6d8a47d0 Christos Stavrakakis
option can be used the see the images of a specific user.
788 6d8a47d0 Christos Stavrakakis
789 6d8a47d0 Christos Stavrakakis
Virtual Servers
790 6d8a47d0 Christos Stavrakakis
~~~~~~~~~~~~~~~
791 6d8a47d0 Christos Stavrakakis
792 6d8a47d0 Christos Stavrakakis
As mentioned, Cyclades uses Ganeti for management of VMs. The administrator can
793 6d8a47d0 Christos Stavrakakis
handle Cyclades VMs just like any other Ganeti instance, via `gnt-instance`
794 6d8a47d0 Christos Stavrakakis
commands. All Ganeti instances that belong to Synnefo, are separated from
795 6d8a47d0 Christos Stavrakakis
others, by a prefix in their names. This prefix is defined in
796 6d8a47d0 Christos Stavrakakis
``BACKEND_PREFIX_ID`` setting in
797 6d8a47d0 Christos Stavrakakis
``/etc/synnefo/20-snf-cyclades-app-backend.conf``.
798 6d8a47d0 Christos Stavrakakis
799 6d8a47d0 Christos Stavrakakis
Apart from handling Cyclades VM at the Ganeti level, the administrator can
800 6d8a47d0 Christos Stavrakakis
also use the `snf-manage server-*` commands. These command cover the most
801 6d8a47d0 Christos Stavrakakis
common tasks that are relative with VM handling. Below we describe come
802 6d8a47d0 Christos Stavrakakis
of them, but for more information you can use the `--help` option of all
803 6d8a47d0 Christos Stavrakakis
`snf-manage server-* commands`. These command cover the most
804 6d8a47d0 Christos Stavrakakis
805 6d8a47d0 Christos Stavrakakis
The `snf-manage server-create` command can be used to create a new VM for some
806 6d8a47d0 Christos Stavrakakis
user. This command can be useful when the administrator wants to test Cyclades
807 6d8a47d0 Christos Stavrakakis
functionality without starting the API service, e.g. after an upgrade. Also, by
808 6d8a47d0 Christos Stavrakakis
using `--backend-id` option, the VM will be created in the specified backend,
809 6d8a47d0 Christos Stavrakakis
bypassing automatic VM allocation.
810 6d8a47d0 Christos Stavrakakis
811 6d8a47d0 Christos Stavrakakis
.. code-block:: console
812 6d8a47d0 Christos Stavrakakis
813 0019cd7d Christos Stavrakakis
 $ snf-manage server-create --flavor-id=1 --image-id=fc0f6858-f962-42ce-bf9a-1345f89b3d5e \
814 6d8a47d0 Christos Stavrakakis
    --user-id=7cf4d078-67bf-424d-8ff2-8669eb4841ea --backend-id=2 \
815 6d8a47d0 Christos Stavrakakis
    --password='example_passw0rd' --name='test_vm'
816 6d8a47d0 Christos Stavrakakis
817 6d8a47d0 Christos Stavrakakis
The above commnd will create a new VM for user
818 6d8a47d0 Christos Stavrakakis
`7cf4d078-67bf-424d-8ff2-8669eb4841ea` in the Ganeti backend with ID 2. By
819 6d8a47d0 Christos Stavrakakis
default this command will issue a Ganeti job to create the VM
820 6d8a47d0 Christos Stavrakakis
(`OP_INSTANCE_CREATE`) and return. As in other commands, the `--wait=True`
821 6d8a47d0 Christos Stavrakakis
option can be used in order to wait for the successful completion of the job.
822 6d8a47d0 Christos Stavrakakis
823 6d8a47d0 Christos Stavrakakis
`snf-manage server-list` command can be used to list all the available servers.
824 6d8a47d0 Christos Stavrakakis
The command supports some useful options, like listing servers of a user,
825 6d8a47d0 Christos Stavrakakis
listing servers that exist in a Ganeti backend and listing deleted servers.
826 6d8a47d0 Christos Stavrakakis
Also, as in most of `*-list` commands, the `--filter-by` option can be used to
827 6d8a47d0 Christos Stavrakakis
filter the results. For example, the following command will only display the
828 6d8a47d0 Christos Stavrakakis
started servers of a specific flavor:
829 6d8a47d0 Christos Stavrakakis
830 6d8a47d0 Christos Stavrakakis
.. code-block:: console
831 6d8a47d0 Christos Stavrakakis
832 0019cd7d Christos Stavrakakis
 $ snf-manage server-list --filter-by="operstate=STARTED,flavor=<flavor_id>"
833 6d8a47d0 Christos Stavrakakis
834 6d8a47d0 Christos Stavrakakis
Another very useful command is the `server-inspect` command which will display
835 6d8a47d0 Christos Stavrakakis
all available information about the state of the server in DB and the state
836 6d8a47d0 Christos Stavrakakis
of the server in the Ganeti backend. The output will give you an easy overview
837 6d8a47d0 Christos Stavrakakis
about the state of the VM which can be useful for debugging.
838 6d8a47d0 Christos Stavrakakis
839 6d8a47d0 Christos Stavrakakis
Also the administrator can `suspend` a user's VM, using the `server-modify`
840 6d8a47d0 Christos Stavrakakis
command:
841 6d8a47d0 Christos Stavrakakis
842 6d8a47d0 Christos Stavrakakis
.. code-block:: console
843 6d8a47d0 Christos Stavrakakis
844 0019cd7d Christos Stavrakakis
 $ snf-manage server-modify --suspended=True <server_id>
845 6d8a47d0 Christos Stavrakakis
846 6d8a47d0 Christos Stavrakakis
The user is forbidden to do any action on an administratively suspended VM,
847 6d8a47d0 Christos Stavrakakis
which is useful for abuse cases.
848 6d8a47d0 Christos Stavrakakis
849 6d8a47d0 Christos Stavrakakis
Ganeti backends
850 6d8a47d0 Christos Stavrakakis
~~~~~~~~~~~~~~~
851 0768a1df Christos Stavrakakis
852 a1c707c9 Constantinos Venetsanopoulos
Since v0.11, Synnefo is able to manage multiple Ganeti clusters (backends)
853 a1c707c9 Constantinos Venetsanopoulos
making it capable to scale linearly to tens of thousands of VMs. Backends
854 a1c707c9 Constantinos Venetsanopoulos
can be dynamically added or removed via `snf-manage` commands.
855 0768a1df Christos Stavrakakis
856 a1c707c9 Constantinos Venetsanopoulos
Each newly created VM is allocated to a Ganeti backend by the Cyclades backend
857 a1c707c9 Constantinos Venetsanopoulos
allocator. The VM is "pinned" to this backend, and can not change through its
858 a1c707c9 Constantinos Venetsanopoulos
lifetime. The backend allocator decides in which backend to spawn the VM based
859 a1c707c9 Constantinos Venetsanopoulos
on the available resources of each backend, trying to balance the load between
860 edd28bbf Christos Stavrakakis
them. Also, Networks are created to all Ganeti backends, in order to ensure
861 edd28bbf Christos Stavrakakis
that VMs residing on different backends can be connected to the same networks.
862 0768a1df Christos Stavrakakis
863 edd28bbf Christos Stavrakakis
A backend can be marked as `drained` in order to be excluded from automatic
864 edd28bbf Christos Stavrakakis
servers allocation and not receive new servers. Also, a backend can be marked
865 edd28bbf Christos Stavrakakis
as `offline` to denote that the backend is not healthy (e.g. broken master)
866 edd28bbf Christos Stavrakakis
and avoid the penalty of connection timeouts.
867 edd28bbf Christos Stavrakakis
868 edd28bbf Christos Stavrakakis
Finally, Cyclades is able to manage Ganeti backends with different enabled
869 edd28bbf Christos Stavrakakis
hypervisors (`kvm`, `xen`), and different enabled disk templates.
870 0768a1df Christos Stavrakakis
871 a1c707c9 Constantinos Venetsanopoulos
Listing existing backends
872 a1c707c9 Constantinos Venetsanopoulos
`````````````````````````
873 a1c707c9 Constantinos Venetsanopoulos
To list all the Ganeti backends known to Synnefo, we run:
874 90c74332 Christos Stavrakakis
875 0768a1df Christos Stavrakakis
.. code-block:: console
876 0768a1df Christos Stavrakakis
877 0768a1df Christos Stavrakakis
   $ snf-manage backend-list
878 0768a1df Christos Stavrakakis
879 0768a1df Christos Stavrakakis
Adding a new Ganeti backend
880 90c74332 Christos Stavrakakis
```````````````````````````
881 0768a1df Christos Stavrakakis
Backends are dynamically added under the control of Synnefo with `snf-manage
882 0768a1df Christos Stavrakakis
backend-add` command. In this section it is assumed that a Ganeti cluster,
883 a1c707c9 Constantinos Venetsanopoulos
named ``cluster.example.com`` is already up and running and configured to be
884 a1c707c9 Constantinos Venetsanopoulos
able to host Synnefo VMs.
885 0768a1df Christos Stavrakakis
886 a1c707c9 Constantinos Venetsanopoulos
To add this Ganeti cluster, we run:
887 90c74332 Christos Stavrakakis
888 0768a1df Christos Stavrakakis
.. code-block:: console
889 0768a1df Christos Stavrakakis
890 0768a1df Christos Stavrakakis
   $ snf-manage backend-add --clustername=cluster.example.com --user="synnefo_user" --pass="synnefo_pass"
891 0768a1df Christos Stavrakakis
892 46ccbcb9 Christos Stavrakakis
where ``clustername`` is the Cluster hostname of the Ganeti cluster, and
893 46ccbcb9 Christos Stavrakakis
``user`` and ``pass`` are the credentials for the `Ganeti RAPI user
894 b0bdf005 Christos Stavrakakis
<http://docs.ganeti.org/ganeti/2.8/html/rapi.html#users-and-passwords>`_.  All
895 46ccbcb9 Christos Stavrakakis
backend attributes can be also changed dynamically using the `snf-manage
896 46ccbcb9 Christos Stavrakakis
backend-modify` command.
897 0768a1df Christos Stavrakakis
898 edd28bbf Christos Stavrakakis
``snf-manage backend-add`` will also create all existing public networks to
899 a1c707c9 Constantinos Venetsanopoulos
the new backend. You can verify that the backend is added, by running
900 a1c707c9 Constantinos Venetsanopoulos
`snf-manage backend-list`.
901 0768a1df Christos Stavrakakis
902 a1c707c9 Constantinos Venetsanopoulos
Note that no VMs will be spawned to this backend, since by default it is in a
903 edd28bbf Christos Stavrakakis
``drained`` state after addition in order to manually verify the state of the
904 edd28bbf Christos Stavrakakis
backend.
905 a1c707c9 Constantinos Venetsanopoulos
906 edd28bbf Christos Stavrakakis
So, after making sure everything works as expected, make the new backend active
907 edd28bbf Christos Stavrakakis
by un-setting the ``drained`` flag. You can do this by running:
908 a1c707c9 Constantinos Venetsanopoulos
909 a1c707c9 Constantinos Venetsanopoulos
.. code-block:: console
910 a1c707c9 Constantinos Venetsanopoulos
911 46ccbcb9 Christos Stavrakakis
   $ snf-manage backend-modify --drained=False <backend_id>
912 0768a1df Christos Stavrakakis
913 a1c707c9 Constantinos Venetsanopoulos
Allocation of VMs in Ganeti backends
914 a1c707c9 Constantinos Venetsanopoulos
````````````````````````````````````
915 a1c707c9 Constantinos Venetsanopoulos
As already mentioned, the Cyclades backend allocator is responsible for
916 a1c707c9 Constantinos Venetsanopoulos
allocating new VMs to backends. This allocator does not choose the exact Ganeti
917 a1c707c9 Constantinos Venetsanopoulos
node that will host the VM but just the Ganeti backend. The exact node is
918 a1c707c9 Constantinos Venetsanopoulos
chosen by the Ganeti cluster's allocator (hail).
919 0768a1df Christos Stavrakakis
920 0768a1df Christos Stavrakakis
The decision about which backend will host a VM is based on the available
921 0768a1df Christos Stavrakakis
resources. The allocator computes a score for each backend, that shows its load
922 0768a1df Christos Stavrakakis
factor, and the one with the minimum score is chosen. The admin can exclude
923 a1c707c9 Constantinos Venetsanopoulos
backends from the allocation phase by marking them as ``drained`` by running:
924 90c74332 Christos Stavrakakis
925 0768a1df Christos Stavrakakis
.. code-block:: console
926 0768a1df Christos Stavrakakis
927 46ccbcb9 Christos Stavrakakis
   $ snf-manage backend-modify --drained=True <backend_id>
928 0768a1df Christos Stavrakakis
929 0768a1df Christos Stavrakakis
The backend resources are periodically updated, at a period defined by
930 edd28bbf Christos Stavrakakis
the ``BACKEND_REFRESH_MIN`` setting, or by running `snf-manage
931 edd28bbf Christos Stavrakakis
backend-update-status` command. It is advised to have a cron job running this
932 edd28bbf Christos Stavrakakis
command at a smaller interval than ``BACKEND_REFRESH_MIN`` in order to remove
933 edd28bbf Christos Stavrakakis
the load of refreshing the backends stats from the VM creation phase.
934 0768a1df Christos Stavrakakis
935 a1c707c9 Constantinos Venetsanopoulos
Finally, the admin can decide to have a user's VMs being allocated to a
936 a1c707c9 Constantinos Venetsanopoulos
specific backend, with the ``BACKEND_PER_USER`` setting. This is a mapping
937 a1c707c9 Constantinos Venetsanopoulos
between users and backends. If the user is found in ``BACKEND_PER_USER``, then
938 46ccbcb9 Christos Stavrakakis
Synnefo allocates all his/hers VMs to the specific backend in the variable,
939 46ccbcb9 Christos Stavrakakis
even if is marked as drained (useful for testing).
940 0768a1df Christos Stavrakakis
941 30ae7724 Christos Stavrakakis
.. _alloc_disk_templates:
942 30ae7724 Christos Stavrakakis
943 09d07554 Christos Stavrakakis
Allocation based on disk-templates
944 09d07554 Christos Stavrakakis
**********************************
945 09d07554 Christos Stavrakakis
946 09d07554 Christos Stavrakakis
Besides the available resources of each Ganeti backend, the allocator takes
947 09d07554 Christos Stavrakakis
into consideration the disk template of the instance when trying to allocate it
948 09d07554 Christos Stavrakakis
to a Ganeti backend. Specifically, the allocator checks if the flavor of the
949 09d07554 Christos Stavrakakis
instance belongs to the available disk templates of each Ganeti backend.
950 09d07554 Christos Stavrakakis
951 09d07554 Christos Stavrakakis
A Ganeti cluster has a list of enabled disk templates
952 09d07554 Christos Stavrakakis
(`--enabled-disk-templates`) and a list of allowed disk templates for new
953 09d07554 Christos Stavrakakis
instances (`--ipolicy-disk-templates`). See the `gnt-cluster` manpage for more
954 09d07554 Christos Stavrakakis
details about these options.
955 09d07554 Christos Stavrakakis
956 09d07554 Christos Stavrakakis
When Synnefo allocates an instance, it checks whether the disk template of the
957 09d07554 Christos Stavrakakis
new instance belongs both in the enabled and ipolicy disk templates. You can
958 09d07554 Christos Stavrakakis
see the list of the available disk-templates by running `snf-manage
959 09d07554 Christos Stavrakakis
backend-list`. This list should be updated automatically after changing
960 09d07554 Christos Stavrakakis
these options in Ganeti and it can also be updated by running `snf-manage
961 09d07554 Christos Stavrakakis
backend-update-status`.
962 09d07554 Christos Stavrakakis
963 09d07554 Christos Stavrakakis
So the administrator, can route instances on different backends based on their
964 09d07554 Christos Stavrakakis
flavor disk template, by modifying the enabled or ipolicy disk templates of
965 09d07554 Christos Stavrakakis
each backend.  Also, the administrator can route instances between different
966 09d07554 Christos Stavrakakis
nodes of the same Ganeti backend, by modifying the same options at the
967 09d07554 Christos Stavrakakis
nodegroup level (see `gnt-group` manpage for mor details).
968 09d07554 Christos Stavrakakis
969 edd28bbf Christos Stavrakakis
Removing an existing Ganeti backend
970 edd28bbf Christos Stavrakakis
```````````````````````````````````
971 edd28bbf Christos Stavrakakis
In order to remove an existing backend from Synnefo, you must first make
972 edd28bbf Christos Stavrakakis
sure that there are not active servers in the backend, and then run:
973 edd28bbf Christos Stavrakakis
974 edd28bbf Christos Stavrakakis
.. code-block:: console
975 edd28bbf Christos Stavrakakis
976 0019cd7d Christos Stavrakakis
   $ snf-manage backend-remove <backend_id>
977 edd28bbf Christos Stavrakakis
978 edd28bbf Christos Stavrakakis
979 6d8a47d0 Christos Stavrakakis
Virtual Networks
980 6d8a47d0 Christos Stavrakakis
~~~~~~~~~~~~~~~~
981 6d8a47d0 Christos Stavrakakis
982 6d8a47d0 Christos Stavrakakis
Cyclades also implements the Network service and exposes the Quantum Openstack
983 6d8a47d0 Christos Stavrakakis
API. Cyclades supports full IPv4 and IPv6 connectivity to the public internet
984 6d8a47d0 Christos Stavrakakis
for it's VMs. Also, Cyclades provides L2 and L3 virtual private networks,
985 6d8a47d0 Christos Stavrakakis
giving the user freedom to create arbitraty network topologies of
986 6d8a47d0 Christos Stavrakakis
interconnected VMs.
987 6d8a47d0 Christos Stavrakakis
988 6d8a47d0 Christos Stavrakakis
Public networking is desployment specific and must be customized based on the
989 6d8a47d0 Christos Stavrakakis
specific needs of the system administrator. Private virtual networks can be
990 6d8a47d0 Christos Stavrakakis
provided by different network technologies which are exposed as different
991 6d8a47d0 Christos Stavrakakis
network flavors. For better understanding of networking please refer to the
992 6d8a47d0 Christos Stavrakakis
:ref:`Network <networks>` section.
993 6d8a47d0 Christos Stavrakakis
994 6d8a47d0 Christos Stavrakakis
A Cyclades virtual network is an isolated Layer-2 broadcast domain. A network
995 6d8a47d0 Christos Stavrakakis
can also have an associated IPv4 and IPv6 subnet representing the Layer-3
996 6d8a47d0 Christos Stavrakakis
characteristics of the network. Each subnet represents an IP address block
997 6d8a47d0 Christos Stavrakakis
that is used in order to assign addresses to VMs.
998 6d8a47d0 Christos Stavrakakis
999 6d8a47d0 Christos Stavrakakis
To connect a VM to a network, a port must be created, which represent a virtual
1000 6d8a47d0 Christos Stavrakakis
port on a network switch. VMs are connected to networks by attaching a virtual
1001 6d8a47d0 Christos Stavrakakis
interface to a port.
1002 6d8a47d0 Christos Stavrakakis
1003 6d8a47d0 Christos Stavrakakis
Cyclades also supports `floating IPs`, which are public IPv4 addresses that
1004 6d8a47d0 Christos Stavrakakis
can dynamically(hotplug-able) be added and removed to VMs. Floating IPs are
1005 6d8a47d0 Christos Stavrakakis
a quotable resource that is allocated to each user. Unlike other cloud
1006 6d8a47d0 Christos Stavrakakis
platforms, floating IPs are not implemented using 1-1 NAT to a ports private
1007 6d8a47d0 Christos Stavrakakis
IP. Instead, floating IPs are directly assigned to virtual interfaces of VMs.
1008 6d8a47d0 Christos Stavrakakis
1009 6d8a47d0 Christos Stavrakakis
Exactly like VMS, networks can be handled as Ganeti networks via `gnt-network`
1010 6d8a47d0 Christos Stavrakakis
commands. All Ganeti networks that belong to Synnefo are named with the prefix
1011 6d8a47d0 Christos Stavrakakis
`${BACKEND_PREFIX_ID}-net-`. Also, there are a number of `snf-manage` commands
1012 6d8a47d0 Christos Stavrakakis
for handling of `networks`, `subnets`, `ports` and `floating IPs`. Below
1013 6d8a47d0 Christos Stavrakakis
we will present a use case scenario using some of these commands. For better
1014 6d8a47d0 Christos Stavrakakis
understanding of these commands, refer to their help messages.
1015 6d8a47d0 Christos Stavrakakis
1016 6d8a47d0 Christos Stavrakakis
Create a virtual private network for user
1017 6d8a47d0 Christos Stavrakakis
`7cf4d078-67bf-424d-8ff2-8669eb4841ea` using the `PHYSICAL_VLAN` flavor, which
1018 6d8a47d0 Christos Stavrakakis
means that the network will be uniquely assigned a phsyical VLAN. The network
1019 6d8a47d0 Christos Stavrakakis
is assigned an IPv4 subnet, described by it's CIDR and gateway. Also,
1020 0019cd7d Christos Stavrakakis
the `--dhcp=True` option is used, to make `nfdhcpd` response to DHCP queries
1021 6d8a47d0 Christos Stavrakakis
from VMs.
1022 09d07554 Christos Stavrakakis
1023 6d8a47d0 Christos Stavrakakis
.. code-block:: console
1024 9492387a Christos Stavrakakis
1025 0019cd7d Christos Stavrakakis
 $ snf-manage network-create --owner=7cf4d078-67bf-424d-8ff2-8669eb4841ea --name=prv_net-1 \
1026 6d8a47d0 Christos Stavrakakis
    --subnet=192.168.2.0/24 --gateway=192.168.2.1 --dhcp=True --flavor=PHYSICAL_VLAN
1027 9492387a Christos Stavrakakis
1028 6d8a47d0 Christos Stavrakakis
Inspect the state of the network in Cyclades DB and in all the Ganeti backends:
1029 9492387a Christos Stavrakakis
1030 6d8a47d0 Christos Stavrakakis
.. code-block:: console
1031 9492387a Christos Stavrakakis
1032 0019cd7d Christos Stavrakakis
  $ snf-manage network-inspect <network_id>
1033 9492387a Christos Stavrakakis
1034 6d8a47d0 Christos Stavrakakis
Inspect the state of the network's subnet, containg an overview of the
1035 6d8a47d0 Christos Stavrakakis
subnet's IPv4 address allocation pool:
1036 6d8a47d0 Christos Stavrakakis
1037 6d8a47d0 Christos Stavrakakis
.. code-block:: console
1038 6d8a47d0 Christos Stavrakakis
1039 0019cd7d Christos Stavrakakis
  $ snf-manage subnet-inspect <subnet_id>
1040 6d8a47d0 Christos Stavrakakis
1041 6d8a47d0 Christos Stavrakakis
Connect a VM to the created private network. The port will be automatically
1042 6d8a47d0 Christos Stavrakakis
be assigned an IPv4 address from one of the network's available IPs. This
1043 6d8a47d0 Christos Stavrakakis
command will result in sending an `OP_INSTANCE_MODIFY` Ganeti command and
1044 6d8a47d0 Christos Stavrakakis
attaching a NIC to the specified Ganeti instance.
1045 9492387a Christos Stavrakakis
1046 6d8a47d0 Christos Stavrakakis
.. code-block:: console
1047 6d8a47d0 Christos Stavrakakis
1048 0019cd7d Christos Stavrakakis
 $ snf-manage port-create --network=<network_id> --server=<server_id>
1049 a653c059 Christos Stavrakakis
1050 6d8a47d0 Christos Stavrakakis
Inspect the state of the the port in Cyclades DB and in the Ganeti backend:
1051 a653c059 Christos Stavrakakis
1052 6d8a47d0 Christos Stavrakakis
.. code-block:: console
1053 a653c059 Christos Stavrakakis
1054 0019cd7d Christos Stavrakakis
 $ snf-manage port-inspect <port_id>
1055 6d8a47d0 Christos Stavrakakis
1056 6d8a47d0 Christos Stavrakakis
Disconnect the VM from the network and delete the network:
1057 6d8a47d0 Christos Stavrakakis
1058 6d8a47d0 Christos Stavrakakis
.. code-block:: console
1059 6d8a47d0 Christos Stavrakakis
1060 0019cd7d Christos Stavrakakis
 $ snf-manage port-remove <port_id>
1061 0019cd7d Christos Stavrakakis
 $ snf-manage network-remove <network_id>
1062 0019cd7d Christos Stavrakakis
1063 0019cd7d Christos Stavrakakis
1064 0019cd7d Christos Stavrakakis
Enabling DHCP
1065 0019cd7d Christos Stavrakakis
`````````````
1066 0019cd7d Christos Stavrakakis
1067 0019cd7d Christos Stavrakakis
When connecting a VM to a network, Cyclades will automatically assign an IPv4
1068 0019cd7d Christos Stavrakakis
address from the IPv4 or/and IPv6 subnets of the network. If the network has
1069 0019cd7d Christos Stavrakakis
no subnets, then it will not be assigned any IP address.
1070 0019cd7d Christos Stavrakakis
1071 0019cd7d Christos Stavrakakis
If the network has DHCP enabled, then `nfdhcpd` daemon, which must be running
1072 0019cd7d Christos Stavrakakis
on all Ganeti nodes, will respond to DHCP queries from VMs and assign to them
1073 0019cd7d Christos Stavrakakis
the IP address that was allocated by Cyclades. DCHP can be enabled/disabled
1074 0019cd7d Christos Stavrakakis
using the `--dhcp` option of `network-create` command.
1075 0019cd7d Christos Stavrakakis
1076 0019cd7d Christos Stavrakakis
1077 0019cd7d Christos Stavrakakis
Public network connectivity
1078 0019cd7d Christos Stavrakakis
```````````````````````````
1079 0019cd7d Christos Stavrakakis
1080 0019cd7d Christos Stavrakakis
Since v0.14, users are able to dynamically connect and disconnect their VMs
1081 0019cd7d Christos Stavrakakis
from public networks. In order to do that, they have to use a `floating IP`.
1082 0019cd7d Christos Stavrakakis
Floating IPs are basically public IPv4 addresses that can be dynamically
1083 0019cd7d Christos Stavrakakis
attached and detached from VMs. The user creates a floating IP address from a
1084 0019cd7d Christos Stavrakakis
network that has set the `floating_ip_pool` attribute. The floating IP is
1085 0019cd7d Christos Stavrakakis
accounted to the user, who can then connect his VMs to public networks by
1086 0019cd7d Christos Stavrakakis
creating ports that they are using this floating IP. Performing this work-flow
1087 0019cd7d Christos Stavrakakis
from `snf-manage` would look like this:
1088 0019cd7d Christos Stavrakakis
1089 0019cd7d Christos Stavrakakis
.. code-block:: console
1090 0019cd7d Christos Stavrakakis
1091 0019cd7d Christos Stavrakakis
 $ snf-manage network-list --filter-by="floating_ip_pool=True"
1092 0019cd7d Christos Stavrakakis
 id      name  user.uuid   state  public  subnet.ipv4  gateway.ipv4  drained  floating_ip_pool
1093 0019cd7d Christos Stavrakakis
 ---------------------------------------------------------------------------------------------
1094 0019cd7d Christos Stavrakakis
  1  Internet       None  ACTIVE    True  10.2.1.0/24      10.2.1.1    False              True
1095 0019cd7d Christos Stavrakakis
1096 0019cd7d Christos Stavrakakis
 $ snf-manage floating-ip-create --owner=7cf4d078-67bf-424d-8ff2-8669eb4841ea --network=1
1097 0019cd7d Christos Stavrakakis
1098 0019cd7d Christos Stavrakakis
 $ snf-manage floating-ip-list --user=7cf4d078-67bf-424d-8ff2-8669eb4841ea
1099 0019cd7d Christos Stavrakakis
 id   address       network                             user.uuid  server
1100 0019cd7d Christos Stavrakakis
 ------------------------------------------------------------------------
1101 0019cd7d Christos Stavrakakis
 38  10.2.1.2             1  7cf4d078-67bf-424d-8ff2-8669eb4841ea      42
1102 0019cd7d Christos Stavrakakis
1103 0019cd7d Christos Stavrakakis
 $ snf-manage port-create --owner=7cf4d078-67bf-424d-8ff2-8669eb4841ea --network=1 \
1104 0019cd7d Christos Stavrakakis
                          --ipv4-address=10.2.1.2 --floating-ip=38
1105 0019cd7d Christos Stavrakakis
1106 0019cd7d Christos Stavrakakis
 $ snf-manage port-list --user=7cf4d078-67bf-424d-8ff2-8669eb4841ea
1107 0019cd7d Christos Stavrakakis
 id                            user.uuid        mac_address  network  server_id  fixed_ips   state
1108 0019cd7d Christos Stavrakakis
 --------------------------------------------------------------------------------------------------
1109 0019cd7d Christos Stavrakakis
 163 7cf4d078-67bf-424d-8ff2-8669eb4841ea  aa:00:00:45:13:98       1         77   10.2.1.2  ACTIVE
1110 0019cd7d Christos Stavrakakis
1111 0019cd7d Christos Stavrakakis
 $ snf-manage port-remove 163
1112 0019cd7d Christos Stavrakakis
 $ snf-manage floating-ip-remove 38
1113 0019cd7d Christos Stavrakakis
1114 0019cd7d Christos Stavrakakis
Users do not have permission to connect and disconnect VMs from public
1115 0019cd7d Christos Stavrakakis
networks without using a floating IP address. However, the administrator
1116 0019cd7d Christos Stavrakakis
have the ability to perform this tasks, using `port-create` and `port-remove`
1117 0019cd7d Christos Stavrakakis
commands.
1118 0019cd7d Christos Stavrakakis
1119 0019cd7d Christos Stavrakakis
Network connectivity for newly created servers
1120 0019cd7d Christos Stavrakakis
``````````````````````````````````````````````
1121 0019cd7d Christos Stavrakakis
1122 0019cd7d Christos Stavrakakis
When creating a virtual server, the user can specify the networks that the
1123 0019cd7d Christos Stavrakakis
newly created server will be connected to. Beyond this, the administrator can
1124 0019cd7d Christos Stavrakakis
define a list of networks that every new server will be forced to connect to.
1125 0019cd7d Christos Stavrakakis
For example, you can enforce all VMs to be connected to a public network
1126 0019cd7d Christos Stavrakakis
containing a metadata server. The networks must be specified in the
1127 0019cd7d Christos Stavrakakis
``CYCLADES_FORCED_SERVER_NETWORKS`` that exists in the
1128 0019cd7d Christos Stavrakakis
``/etc/synnefo/20-snf-cyclades-app-api.conf``. For the networks in this
1129 0019cd7d Christos Stavrakakis
setting, no access control or quota policy are enforced!
1130 0019cd7d Christos Stavrakakis
1131 0019cd7d Christos Stavrakakis
Finally, the administrator can define a list of networks that new servers will
1132 0019cd7d Christos Stavrakakis
be connected, *if the user has not* specified networks in the request to create
1133 0019cd7d Christos Stavrakakis
the server. Access control and quota policy are enforced, just as if the user
1134 0019cd7d Christos Stavrakakis
had specified these networks. The list of these networks is defined in the
1135 0019cd7d Christos Stavrakakis
``CYCLADES_DEFAULT_SERVER_NETWORKS`` that exists in the
1136 0019cd7d Christos Stavrakakis
``/etc/synnefo/20-snf-cyclades-app-api.conf``. This setting should only
1137 0019cd7d Christos Stavrakakis
be used if Cyclades are being accessed by external clients that are
1138 0019cd7d Christos Stavrakakis
unaware of the `Neutron API extensions` in the `Compute API`.
1139 0019cd7d Christos Stavrakakis
1140 0019cd7d Christos Stavrakakis
Each member of the above mentioned settings can be:
1141 0019cd7d Christos Stavrakakis
1142 0019cd7d Christos Stavrakakis
* a network UUID
1143 0019cd7d Christos Stavrakakis
* a tuple of network UUIDs: the server will be connected to only one of these
1144 0019cd7d Christos Stavrakakis
  networks, e.g. one that has a free IPv4 address
1145 0019cd7d Christos Stavrakakis
* `SNF:ANY_PUBLIC_IPV4`: the server will be connected to any network with
1146 0019cd7d Christos Stavrakakis
  an IPv4 subnet defined
1147 0019cd7d Christos Stavrakakis
* `SNF:ANY_PUBLIC_IPV6`: the server will be connected to any network with
1148 0019cd7d Christos Stavrakakis
  only an IPv6 subnet defined.
1149 0019cd7d Christos Stavrakakis
* `SNF:ANY_PUBLIC`: the server will be connected to any public network.
1150 0019cd7d Christos Stavrakakis
1151 0019cd7d Christos Stavrakakis
Public IP accounting
1152 0019cd7d Christos Stavrakakis
````````````````````
1153 0019cd7d Christos Stavrakakis
1154 0019cd7d Christos Stavrakakis
There are many use cases, e.g. abuse ports, where you need to find which user
1155 0019cd7d Christos Stavrakakis
or which server had a public IP address. For this reason, Cyclades keeps track
1156 0019cd7d Christos Stavrakakis
usage of public IPv4/IPv6 addresses. Specifically, it keeps the date and time
1157 0019cd7d Christos Stavrakakis
that each public IP address was allocated and released from a virtual server.
1158 0019cd7d Christos Stavrakakis
This information can be found using `ip-list` command:
1159 0019cd7d Christos Stavrakakis
1160 0019cd7d Christos Stavrakakis
.. code-block:: console
1161 0019cd7d Christos Stavrakakis
1162 0019cd7d Christos Stavrakakis
 $ snf-manage ip-list
1163 0019cd7d Christos Stavrakakis
1164 0019cd7d Christos Stavrakakis
 Show usage of a specific address:
1165 0019cd7d Christos Stavrakakis
 $ snf-manage ip-list --address=192.168.2.1
1166 0019cd7d Christos Stavrakakis
1167 0019cd7d Christos Stavrakakis
 Show public IPs of a specific server:
1168 0019cd7d Christos Stavrakakis
 $ snf-manage ip-list --server=<server_id>
1169 0019cd7d Christos Stavrakakis
1170 a653c059 Christos Stavrakakis
1171 9c98c6fc Christos Stavrakakis
Managing Network Resources
1172 a1c707c9 Constantinos Venetsanopoulos
``````````````````````````
1173 9c98c6fc Christos Stavrakakis
1174 a1c707c9 Constantinos Venetsanopoulos
Proper operation of the Cyclades Network Service depends on the unique
1175 a1c707c9 Constantinos Venetsanopoulos
assignment of specific resources to each type of virtual network. Specifically,
1176 a1c707c9 Constantinos Venetsanopoulos
these resources are:
1177 9c98c6fc Christos Stavrakakis
1178 a1c707c9 Constantinos Venetsanopoulos
* IP addresses. Cyclades creates a Pool of IPs for each Network, and assigns a
1179 a1c707c9 Constantinos Venetsanopoulos
  unique IP address to each VM, thus connecting it to this Network. You can see
1180 6d8a47d0 Christos Stavrakakis
  the IP pool of each network by running `snf-manage subnet-inspect
1181 6d8a47d0 Christos Stavrakakis
  <subnet_ID>`. IP pools are automatically created and managed by Cyclades,
1182 a1c707c9 Constantinos Venetsanopoulos
  depending on the subnet of the Network.
1183 9492387a Christos Stavrakakis
* Bridges corresponding to physical VLANs, which are required for networks of
1184 a1c707c9 Constantinos Venetsanopoulos
  type `PRIVATE_PHYSICAL_VLAN`.
1185 a1c707c9 Constantinos Venetsanopoulos
* One Bridge corresponding to one physical VLAN which is required for networks of
1186 a1c707c9 Constantinos Venetsanopoulos
  type `PRIVATE_MAC_PREFIX`.
1187 9c98c6fc Christos Stavrakakis
1188 4573511a Christos Stavrakakis
IPv4 addresses
1189 4573511a Christos Stavrakakis
**************
1190 4573511a Christos Stavrakakis
1191 4573511a Christos Stavrakakis
An allocation pool of IPv4 addresses is automatically created for every network
1192 9a1b6564 Christos Stavrakakis
with an IPv4 subnet. By default, the allocation pool contains the range of IP
1193 9a1b6564 Christos Stavrakakis
addresses that are included in the subnet, except from the gateway and the
1194 9a1b6564 Christos Stavrakakis
broadcast address of the network. The range of IP addresses can be restricted
1195 9a1b6564 Christos Stavrakakis
using the `--allocation-pool` option of `snf-manage network-create` command.
1196 9a1b6564 Christos Stavrakakis
The admin can externally reserve IP addresses to exclude them from automatic
1197 4573511a Christos Stavrakakis
allocation with the `--add-reserved-ips` option of `snf-manage network-modify`
1198 9a1b6564 Christos Stavrakakis
command. For example the following command will reserve two IP addresses from
1199 9a1b6564 Christos Stavrakakis
network with ID `42`:
1200 9c98c6fc Christos Stavrakakis
1201 4573511a Christos Stavrakakis
.. code-block:: console
1202 4573511a Christos Stavrakakis
1203 4573511a Christos Stavrakakis
 snf-manage network-modify --add-reserved-ips=10.0.0.21,10.0.0.22 42
1204 4573511a Christos Stavrakakis
1205 4573511a Christos Stavrakakis
.. warning:: Externally reserving IP addresses is also available at the Ganeti.
1206 4573511a Christos Stavrakakis
 However, when using Cyclades with multiple Ganeti backends, the handling of
1207 4573511a Christos Stavrakakis
 IP pools must be performed from Cyclades!
1208 4573511a Christos Stavrakakis
1209 4573511a Christos Stavrakakis
Bridges
1210 4573511a Christos Stavrakakis
*******
1211 4573511a Christos Stavrakakis
1212 4573511a Christos Stavrakakis
As already mentioned Cyclades use a pool of Bridges that must correspond
1213 4573511a Christos Stavrakakis
to Physical VLAN at the Ganeti level. A bridge from the pool is assigned to
1214 4573511a Christos Stavrakakis
each network of flavor `PHYSICAL_VLAN`. Creation of this pool is done
1215 4573511a Christos Stavrakakis
using `snf-manage pool-create` command. For example the following command
1216 4573511a Christos Stavrakakis
will create a pool containing the brdiges from `prv1` to `prv21`.
1217 90c74332 Christos Stavrakakis
1218 9c98c6fc Christos Stavrakakis
.. code-block:: console
1219 9c98c6fc Christos Stavrakakis
1220 9c98c6fc Christos Stavrakakis
   # snf-manage pool-create --type=bridge --base=prv --size=20
1221 9c98c6fc Christos Stavrakakis
1222 9c98c6fc Christos Stavrakakis
You can verify the creation of the pool, and check its contents by running:
1223 90c74332 Christos Stavrakakis
1224 9c98c6fc Christos Stavrakakis
.. code-block:: console
1225 9c98c6fc Christos Stavrakakis
1226 9c98c6fc Christos Stavrakakis
   # snf-manage pool-list
1227 9c98c6fc Christos Stavrakakis
   # snf-manage pool-show --type=bridge 1
1228 9c98c6fc Christos Stavrakakis
1229 4573511a Christos Stavrakakis
Finally you can use the `pool-modify` management command in order to externally
1230 4573511a Christos Stavrakakis
reserve the values from pool, extend or shrink the pool if possible.
1231 4573511a Christos Stavrakakis
1232 4573511a Christos Stavrakakis
MAC Prefixes
1233 4573511a Christos Stavrakakis
************
1234 4573511a Christos Stavrakakis
1235 4573511a Christos Stavrakakis
Cyclades also use a pool of MAC prefixes to assign to networks of flavor
1236 4573511a Christos Stavrakakis
`MAC_FILTERED`. Handling of this pool is done exactly as with pool of bridges,
1237 4573511a Christos Stavrakakis
except that the type option must be set to mac-prefix:
1238 90c74332 Christos Stavrakakis
1239 9c98c6fc Christos Stavrakakis
.. code-block:: console
1240 9c98c6fc Christos Stavrakakis
1241 9c98c6fc Christos Stavrakakis
   # snf-manage pool-create --type=mac-prefix --base=aa:00:0 --size=65536
1242 9c98c6fc Christos Stavrakakis
1243 4573511a Christos Stavrakakis
The above command will create a pool of MAC prefixes from ``aa:00:1`` to
1244 4573511a Christos Stavrakakis
``b9:ff:f``. The MAC prefix pool is responsible for providing only unicast and
1245 4573511a Christos Stavrakakis
locally administered MAC addresses, so many of these prefixes will be
1246 4573511a Christos Stavrakakis
externally reserved, to exclude from allocation.
1247 4573511a Christos Stavrakakis
1248 0a3027c3 Christos Stavrakakis
Quotas
1249 0a3027c3 Christos Stavrakakis
~~~~~~
1250 0a3027c3 Christos Stavrakakis
1251 0a3027c3 Christos Stavrakakis
Handling of quotas for Cyclades resources is powered by Astakos quota
1252 0a3027c3 Christos Stavrakakis
mechanism. During registration of Cyclades service to Astakos, the Cyclades
1253 0a3027c3 Christos Stavrakakis
resources are also imported to Astakos for accounting and presentation.
1254 0a3027c3 Christos Stavrakakis
1255 0a3027c3 Christos Stavrakakis
Upon a request that will result in a resource creation or removal, Cyclades
1256 0a3027c3 Christos Stavrakakis
will communicate with Astakos to ensure that user quotas are within limits and
1257 0a3027c3 Christos Stavrakakis
update the corresponding usage. If a limit is reached, the request will be
1258 0a3027c3 Christos Stavrakakis
denied with an `overLimit(413)` fault.
1259 4573511a Christos Stavrakakis
1260 0a3027c3 Christos Stavrakakis
The resources that are exported by Cyclades are the following:
1261 0768a1df Christos Stavrakakis
1262 0a3027c3 Christos Stavrakakis
* `cyclades.vm`: Number of virtual machines
1263 0a3027c3 Christos Stavrakakis
* `cyclades.total_cpu`: Number of virtual machine processors
1264 0a3027c3 Christos Stavrakakis
* `cyclades.cpu`: Number of virtual machine processors of running VMs
1265 0a3027c3 Christos Stavrakakis
* `cyclades.total_ram`: Virtual machine memory size
1266 0a3027c3 Christos Stavrakakis
* `cyclades.ram`: Virtual machine memory size of running VMs
1267 0a3027c3 Christos Stavrakakis
* `cyclades.disk`: Virtual machine disk size
1268 0a3027c3 Christos Stavrakakis
* `cyclades.floating_ip`: Number of floating IP addresses
1269 0a3027c3 Christos Stavrakakis
* `cyclades.network.private`: Number of private virtual networks
1270 426d4ae3 Constantinos Venetsanopoulos
1271 e67e1d92 Giorgos Korfiatis
Enforcing quotas
1272 e67e1d92 Giorgos Korfiatis
~~~~~~~~~~~~~~~~
1273 e67e1d92 Giorgos Korfiatis
1274 e67e1d92 Giorgos Korfiatis
User quota can get overlimit, for example when a user is removed from a
1275 e67e1d92 Giorgos Korfiatis
project granting Cyclades resources. However, no action is automatically
1276 e67e1d92 Giorgos Korfiatis
taken to restrict users to their new limits. There is a special tool for
1277 e67e1d92 Giorgos Korfiatis
quota enforcement:
1278 e67e1d92 Giorgos Korfiatis
1279 e67e1d92 Giorgos Korfiatis
.. code-block:: console
1280 e67e1d92 Giorgos Korfiatis
1281 e67e1d92 Giorgos Korfiatis
  # snf-manage enforce-resources-cyclades
1282 e67e1d92 Giorgos Korfiatis
1283 e67e1d92 Giorgos Korfiatis
This command will check and report which users are overlimit on their
1284 e67e1d92 Giorgos Korfiatis
Cyclades quota; it will also suggest actions to be taken in order to enforce
1285 e67e1d92 Giorgos Korfiatis
quota limits, dependent on the overlimit resource:
1286 e67e1d92 Giorgos Korfiatis
1287 e67e1d92 Giorgos Korfiatis
* `cyclades.vm`: Delete VMs
1288 e67e1d92 Giorgos Korfiatis
* `cyclades.total_cpu`: Delete VMs
1289 e67e1d92 Giorgos Korfiatis
* `cyclades.cpu`: Shutdown VMs
1290 e67e1d92 Giorgos Korfiatis
* `cyclades.total_ram`: Delete VMs
1291 e67e1d92 Giorgos Korfiatis
* `cyclades.ram`: Shutdown VMs
1292 e67e1d92 Giorgos Korfiatis
* `cyclades.disk`: Delete VMs
1293 e67e1d92 Giorgos Korfiatis
* `cyclades.floating_ip`: Detach and remove IPs
1294 e67e1d92 Giorgos Korfiatis
1295 e67e1d92 Giorgos Korfiatis
VMs to be deleted/shutdown are chosen first by state in the following order:
1296 e67e1d92 Giorgos Korfiatis
ERROR, BUILD, STOPPED, STARTED or RESIZE and then by decreasing ID. When
1297 e67e1d92 Giorgos Korfiatis
needing to remove IPs, we first choose IPs that are free, then those
1298 e67e1d92 Giorgos Korfiatis
attached to VMs, using the same VM ordering.
1299 e67e1d92 Giorgos Korfiatis
1300 e67e1d92 Giorgos Korfiatis
By default, the command checks only the following resources: `cyclades.cpu`,
1301 e67e1d92 Giorgos Korfiatis
`cyclades.ram`, and `cyclades.floating_ip`; that is, the less dangerous
1302 e67e1d92 Giorgos Korfiatis
ones, those that do not result in *deleting* any VM. One can change the
1303 e67e1d92 Giorgos Korfiatis
default behavior by specifying the desired resources with option
1304 e67e1d92 Giorgos Korfiatis
``--resources``. It is also possible to specify users to be checked or
1305 e67e1d92 Giorgos Korfiatis
excluded.
1306 e67e1d92 Giorgos Korfiatis
1307 e67e1d92 Giorgos Korfiatis
Actual enforcement is done with option ``--fix``. In order to control the
1308 e67e1d92 Giorgos Korfiatis
load that quota enforcement may cause on Cyclades, one can limit the number
1309 e67e1d92 Giorgos Korfiatis
of operations per backend. For example,
1310 e67e1d92 Giorgos Korfiatis
1311 e67e1d92 Giorgos Korfiatis
.. code-block:: console
1312 e67e1d92 Giorgos Korfiatis
1313 e67e1d92 Giorgos Korfiatis
  # snf-manage enforce-resources-cyclades --fix --max-operations 10
1314 e67e1d92 Giorgos Korfiatis
1315 e67e1d92 Giorgos Korfiatis
will apply only the first 10 listed actions per backend. One can repeat the
1316 e67e1d92 Giorgos Korfiatis
operation, until nothing is left to be done.
1317 e67e1d92 Giorgos Korfiatis
1318 29e3919d Giorgos Korfiatis
To control load a timeout can also be set for shutting down VMs (using
1319 29e3919d Giorgos Korfiatis
option ``--shutdown-timeout <sec>``). This may be needed to avoid
1320 29e3919d Giorgos Korfiatis
expensive operations triggered by shutdown, such as Windows updates.
1321 29e3919d Giorgos Korfiatis
1322 30b1d10d Giorgos Korfiatis
The command outputs the list of applied actions and reports whether each
1323 30b1d10d Giorgos Korfiatis
action succeeded or not. Failure is reported if for any reason cyclades
1324 30b1d10d Giorgos Korfiatis
failed to process the job and submit it to the backend.
1325 30b1d10d Giorgos Korfiatis
1326 eab73849 Constantinos Venetsanopoulos
Cyclades advanced operations
1327 eab73849 Constantinos Venetsanopoulos
----------------------------
1328 eab73849 Constantinos Venetsanopoulos
1329 0a3027c3 Christos Stavrakakis
Reconciliation mechanism
1330 0a3027c3 Christos Stavrakakis
~~~~~~~~~~~~~~~~~~~~~~~~
1331 0a3027c3 Christos Stavrakakis
1332 0a3027c3 Christos Stavrakakis
Cyclades - Ganeti reconciliation
1333 0a3027c3 Christos Stavrakakis
````````````````````````````````
1334 0a3027c3 Christos Stavrakakis
1335 0a3027c3 Christos Stavrakakis
On certain occasions, such as a Ganeti or RabbitMQ failure, the state of
1336 0a3027c3 Christos Stavrakakis
Cyclades database may differ from the real state of VMs and networks in the
1337 0a3027c3 Christos Stavrakakis
Ganeti backends. The reconciliation process is designed to synchronize the
1338 0a3027c3 Christos Stavrakakis
state of the Cyclades DB with Ganeti. There are two management commands for
1339 0a3027c3 Christos Stavrakakis
reconciling VMs and Networks that will detect stale, orphans and out-of-sync
1340 0a3027c3 Christos Stavrakakis
VMs and networks. To fix detected inconsistencies, use the `--fix-all`.
1341 0a3027c3 Christos Stavrakakis
1342 0a3027c3 Christos Stavrakakis
.. code-block:: console
1343 0a3027c3 Christos Stavrakakis
1344 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-servers
1345 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-servers --fix-all
1346 0a3027c3 Christos Stavrakakis
1347 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-networks
1348 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-networks --fix-all
1349 0a3027c3 Christos Stavrakakis
1350 0a3027c3 Christos Stavrakakis
Please see ``snf-manage reconcile-servers --help`` and ``snf-manage
1351 0a3027c3 Christos Stavrakakis
reconcile--networks --help`` for all the details.
1352 0a3027c3 Christos Stavrakakis
1353 0a3027c3 Christos Stavrakakis
1354 0a3027c3 Christos Stavrakakis
Cyclades - Astakos reconciliation
1355 0a3027c3 Christos Stavrakakis
`````````````````````````````````
1356 0a3027c3 Christos Stavrakakis
1357 0a3027c3 Christos Stavrakakis
As already mentioned, Cyclades communicates with Astakos for resource
1358 0a3027c3 Christos Stavrakakis
accounting and quota enforcement. In rare cases, e.g. unexpected
1359 0a3027c3 Christos Stavrakakis
failures, the two services may get unsynchronized. For this reason there
1360 0a3027c3 Christos Stavrakakis
are the `reconcile-commissions-cyclades` and `reconcile-resources-cyclades`
1361 0a3027c3 Christos Stavrakakis
command that will synchronize the state of the two services. The first
1362 0a3027c3 Christos Stavrakakis
command will detect any pending commissions, while the second command will
1363 0a3027c3 Christos Stavrakakis
detect that the usage that is reported by Astakos is correct.
1364 0a3027c3 Christos Stavrakakis
To fix detected inconsistencies, use the `--fix` option.
1365 0a3027c3 Christos Stavrakakis
1366 0a3027c3 Christos Stavrakakis
.. code-block:: console
1367 0a3027c3 Christos Stavrakakis
1368 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-commissions-cyclades
1369 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-commissions-cyclades --fix
1370 0a3027c3 Christos Stavrakakis
1371 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-resources-cyclades
1372 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-resources-cyclades --fix
1373 0a3027c3 Christos Stavrakakis
1374 0a3027c3 Christos Stavrakakis
1375 0a3027c3 Christos Stavrakakis
Cyclades resources reconciliation
1376 0a3027c3 Christos Stavrakakis
`````````````````````````````````
1377 0a3027c3 Christos Stavrakakis
1378 0a3027c3 Christos Stavrakakis
Reconciliation of pools will check the consistency of available pools by
1379 0a3027c3 Christos Stavrakakis
checking that the values from each pool are not used more than once, and also
1380 0a3027c3 Christos Stavrakakis
that the only reserved values in a pool are the ones used. Pool reconciliation
1381 0a3027c3 Christos Stavrakakis
will check pools of bridges, MAC prefixes, and IPv4 addresses for all networks.
1382 0a3027c3 Christos Stavrakakis
To fix detected inconsistencies, use the `--fix` option.
1383 0a3027c3 Christos Stavrakakis
1384 0a3027c3 Christos Stavrakakis
1385 0a3027c3 Christos Stavrakakis
.. code-block:: console
1386 0a3027c3 Christos Stavrakakis
1387 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-pools
1388 0a3027c3 Christos Stavrakakis
  $ snf-manage reconcile-pools --fix
1389 0a3027c3 Christos Stavrakakis
1390 62c0a9e1 Stratos Psomadakis
.. _admin-guide-stats:
1391 62c0a9e1 Stratos Psomadakis
1392 62c0a9e1 Stratos Psomadakis
VM stats collecting
1393 62c0a9e1 Stratos Psomadakis
~~~~~~~~~~~~~~~~~~~
1394 62c0a9e1 Stratos Psomadakis
1395 62c0a9e1 Stratos Psomadakis
snf-cyclades-gtools comes with a collectd plugin to collect CPU and network
1396 62c0a9e1 Stratos Psomadakis
stats for Ganeti VMs and an example collectd configuration. snf-stats-app is a
1397 62c0a9e1 Stratos Psomadakis
Django (snf-webproject) app that serves the VM stats graphs by reading the VM
1398 62c0a9e1 Stratos Psomadakis
stats (from RRD files) and serves graphs.
1399 62c0a9e1 Stratos Psomadakis
1400 62c0a9e1 Stratos Psomadakis
The snf-stats-app was originally written by `GRNET NOC <http://noc.grnet.gr>`_
1401 62c0a9e1 Stratos Psomadakis
as a WSGI Python app and was ported to a Synnefo (snf-webproject) app.
1402 62c0a9e1 Stratos Psomadakis
1403 62c0a9e1 Stratos Psomadakis
snf-stats-app configuration
1404 62c0a9e1 Stratos Psomadakis
```````````````````````````
1405 62c0a9e1 Stratos Psomadakis
1406 62c0a9e1 Stratos Psomadakis
The snf-stats-app node should have collectd installed. The collectd
1407 62c0a9e1 Stratos Psomadakis
configuration should enable the network plugin, assuming the server role, and
1408 62c0a9e1 Stratos Psomadakis
the RRD plugin / backend, to store the incoming stats. Your
1409 62c0a9e1 Stratos Psomadakis
``/etc/collectd/collectd.conf`` should look like:
1410 62c0a9e1 Stratos Psomadakis
1411 62c0a9e1 Stratos Psomadakis
.. code-block:: console
1412 62c0a9e1 Stratos Psomadakis
1413 62c0a9e1 Stratos Psomadakis
    FQDNLookup true
1414 62c0a9e1 Stratos Psomadakis
    LoadPlugin syslog
1415 62c0a9e1 Stratos Psomadakis
    <Plugin syslog>
1416 62c0a9e1 Stratos Psomadakis
        LogLevel info
1417 62c0a9e1 Stratos Psomadakis
    </Plugin>
1418 62c0a9e1 Stratos Psomadakis
1419 62c0a9e1 Stratos Psomadakis
    LoadPlugin network
1420 62c0a9e1 Stratos Psomadakis
    LoadPlugin rrdtool
1421 62c0a9e1 Stratos Psomadakis
    <Plugin network>
1422 62c0a9e1 Stratos Psomadakis
        TimeToLive 128
1423 62c0a9e1 Stratos Psomadakis
        <Listen "okeanos.io" "25826">
1424 62c0a9e1 Stratos Psomadakis
            SecurityLevel "Sign"
1425 62c0a9e1 Stratos Psomadakis
            AuthFile "/etc/collectd/passwd"
1426 62c0a9e1 Stratos Psomadakis
        </Listen>
1427 62c0a9e1 Stratos Psomadakis
1428 62c0a9e1 Stratos Psomadakis
        ReportStats false
1429 62c0a9e1 Stratos Psomadakis
        MaxPacketSize 65535
1430 62c0a9e1 Stratos Psomadakis
    </Plugin>
1431 62c0a9e1 Stratos Psomadakis
1432 62c0a9e1 Stratos Psomadakis
1433 62c0a9e1 Stratos Psomadakis
    <Plugin rrdtool>
1434 62c0a9e1 Stratos Psomadakis
        DataDir "/var/lib/collectd/rrd"
1435 62c0a9e1 Stratos Psomadakis
        CacheTimeout 120
1436 62c0a9e1 Stratos Psomadakis
        CacheFlush 900
1437 62c0a9e1 Stratos Psomadakis
        WritesPerSecond 30
1438 62c0a9e1 Stratos Psomadakis
        RandomTimeout 0
1439 62c0a9e1 Stratos Psomadakis
    </Plugin>
1440 62c0a9e1 Stratos Psomadakis
1441 62c0a9e1 Stratos Psomadakis
    Include "/etc/collectd/filters.conf"
1442 62c0a9e1 Stratos Psomadakis
    Include "/etc/collectd/thresholds.conf"
1443 62c0a9e1 Stratos Psomadakis
1444 62c0a9e1 Stratos Psomadakis
1445 62c0a9e1 Stratos Psomadakis
An example collectd config file is provided in
1446 62c0a9e1 Stratos Psomadakis
``/usr/share/doc/snf-stats-app/examples/stats-colletcd.conf``.
1447 62c0a9e1 Stratos Psomadakis
1448 62c0a9e1 Stratos Psomadakis
The recommended deployment is to run snf-stats-app using gunicorn with an
1449 62c0a9e1 Stratos Psomadakis
Apache2 or nginx reverse proxy (using the same configuration as the other
1450 62c0a9e1 Stratos Psomadakis
Synnefo services / apps). An example gunicorn config file is provided in
1451 62c0a9e1 Stratos Psomadakis
``/usr/share/doc/snf-stats-app/examples/stats.gunicorn``.
1452 62c0a9e1 Stratos Psomadakis
1453 62c0a9e1 Stratos Psomadakis
Make sure to edit the settings under
1454 62c0a9e1 Stratos Psomadakis
``/etc/synnefo/20-snf-stats-app-settings.conf`` to match your deployment.
1455 62c0a9e1 Stratos Psomadakis
More specifically, you should change the ``STATS_BASE_URL`` setting (refer
1456 62c0a9e1 Stratos Psomadakis
to previous documentation on the BASE_URL settings used by the other Synnefo
1457 62c0a9e1 Stratos Psomadakis
services / apps) and the ``RRD_PREFIX`` and ``GRAPH_PREFIX`` settings.
1458 62c0a9e1 Stratos Psomadakis
1459 62c0a9e1 Stratos Psomadakis
You should also set the ``STATS_SECRET_KEY`` to a random string and make sure
1460 62c0a9e1 Stratos Psomadakis
it's the same at the ``CYCLADES_STATS_SECRET_KEY`` on the Cyclades host (see
1461 62c0a9e1 Stratos Psomadakis
below).
1462 62c0a9e1 Stratos Psomadakis
1463 62c0a9e1 Stratos Psomadakis
``RRD_PREFIX`` is the directory where collectd stores the RRD files. The
1464 62c0a9e1 Stratos Psomadakis
default setting matches the default RRD directory for the collectd RRDtool
1465 62c0a9e1 Stratos Psomadakis
plugin. In a more complex setup, the collectd daemon could run on a separate
1466 62c0a9e1 Stratos Psomadakis
host and export the RRD directory to the snf-stats-app node via e.g. NFS.
1467 62c0a9e1 Stratos Psomadakis
1468 62c0a9e1 Stratos Psomadakis
``GRAPH_PREFIX`` is the directory where collectd stores the resulting
1469 62c0a9e1 Stratos Psomadakis
stats graphs. You should create it manually, in case it doesn't exist.
1470 62c0a9e1 Stratos Psomadakis
1471 62c0a9e1 Stratos Psomadakis
.. code-block::
1472 62c0a9e1 Stratos Psomadakis
1473 62c0a9e1 Stratos Psomadakis
    # mkdir /var/cache/snf-stats-app/
1474 62c0a9e1 Stratos Psomadakis
    # chown www-data:wwwdata /var/cache/snf-stats-app/
1475 62c0a9e1 Stratos Psomadakis
1476 62c0a9e1 Stratos Psomadakis
The snf-stats-app will typically run as the ``www-data`` user. In that case,
1477 62c0a9e1 Stratos Psomadakis
make sure that the ``www-data`` user should have read access to the
1478 62c0a9e1 Stratos Psomadakis
``RRD_PREFIX`` directory and read / write access to the ``GRAPH_PREFIX``
1479 62c0a9e1 Stratos Psomadakis
directory.
1480 62c0a9e1 Stratos Psomadakis
1481 62c0a9e1 Stratos Psomadakis
snf-stats-app, based on the ``STATS_BASE_URL`` setting will export the
1482 62c0a9e1 Stratos Psomadakis
following URL 'endpoints`:
1483 62c0a9e1 Stratos Psomadakis
 * CPU stats bar: ``STATS_BASE_URL``/v1.0/cpu-bar/<encrypted VM hostname>
1484 62c0a9e1 Stratos Psomadakis
 * Network stats bar: ``STATS_BASE_URL``/v1.0/net-bar/<encrypted VM hostname>
1485 62c0a9e1 Stratos Psomadakis
 * CPU stats daily graph: ``STATS_BASE_URL``/v1.0/cpu-ts/<encrypted VM hostname>
1486 62c0a9e1 Stratos Psomadakis
 * Network stats daily graph: ``STATS_BASE_URL``/v1.0/net-ts/<encrypted VM hostname>
1487 62c0a9e1 Stratos Psomadakis
 * CPU stats weekly graph: ``STATS_BASE_URL``/v1.0/cpu-ts-w/<encrypted VM hostname>
1488 62c0a9e1 Stratos Psomadakis
 * Network stats weekly graph: ``STATS_BASE_URL``/v1.0/net-ts-w/<encrypted VM hostname>
1489 62c0a9e1 Stratos Psomadakis
1490 62c0a9e1 Stratos Psomadakis
You can verify that these endpoints are exported by issuing:
1491 62c0a9e1 Stratos Psomadakis
1492 62c0a9e1 Stratos Psomadakis
.. code-block::
1493 62c0a9e1 Stratos Psomadakis
1494 62c0a9e1 Stratos Psomadakis
    # snf-manage show_urls
1495 62c0a9e1 Stratos Psomadakis
1496 62c0a9e1 Stratos Psomadakis
snf-cyclades-gtools configuration
1497 62c0a9e1 Stratos Psomadakis
`````````````````````````````````
1498 62c0a9e1 Stratos Psomadakis
1499 62c0a9e1 Stratos Psomadakis
To enable VM stats collecting, you will need to:
1500 62c0a9e1 Stratos Psomadakis
 * Install collectd on the every Ganeti (VM-capable) node.
1501 62c0a9e1 Stratos Psomadakis
 * Enable the Ganeti stats plugin in your collectd configuration. This can be
1502 62c0a9e1 Stratos Psomadakis
   achived by either copying the example collectd conf file that comes with
1503 62c0a9e1 Stratos Psomadakis
   snf-cyclades-gtools
1504 62c0a9e1 Stratos Psomadakis
   (``/usr/share/doc/snf-cyclades-gtools/examples/ganeti-stats-collectd.conf``)
1505 62c0a9e1 Stratos Psomadakis
   or by adding the following line to your existing (or default) collectd
1506 62c0a9e1 Stratos Psomadakis
   conf file:
1507 62c0a9e1 Stratos Psomadakis
1508 62c0a9e1 Stratos Psomadakis
       Include /etc/collectd/ganeti-stats.conf
1509 0019cd7d Christos Stavrakakis
1510 62c0a9e1 Stratos Psomadakis
   In the latter case, make sure to configure collectd to send the collected
1511 62c0a9e1 Stratos Psomadakis
   stats to your collectd server (via the network plugin). For more details on
1512 62c0a9e1 Stratos Psomadakis
   how to do this, check the collectd example config file provided by the
1513 0019cd7d Christos Stavrakakis
   package and the collectd documentation.
1514 62c0a9e1 Stratos Psomadakis
1515 62c0a9e1 Stratos Psomadakis
snf-cyclades-app configuration
1516 62c0a9e1 Stratos Psomadakis
``````````````````````````````
1517 62c0a9e1 Stratos Psomadakis
1518 62c0a9e1 Stratos Psomadakis
At this point, stats collecting should be enabled and working. You can check
1519 62c0a9e1 Stratos Psomadakis
that everything is ok by checking the contents of ``/var/lib/collectd/rrd/``
1520 62c0a9e1 Stratos Psomadakis
directory (it will gradually get populated with directories containing RRD
1521 62c0a9e1 Stratos Psomadakis
files / stats for every Synnefo instances).
1522 62c0a9e1 Stratos Psomadakis
1523 62c0a9e1 Stratos Psomadakis
You should also check that gunicorn and Apache2 are configured correctly by
1524 62c0a9e1 Stratos Psomadakis
accessing the graph URLs for a VM (whose stats have been populated in
1525 62c0a9e1 Stratos Psomadakis
``/var/lib/collectd/rrd``).
1526 62c0a9e1 Stratos Psomadakis
1527 62c0a9e1 Stratos Psomadakis
Cyclades uses the ``CYCLADES_STATS_SECRET_KEY`` setting in
1528 62c0a9e1 Stratos Psomadakis
``20-snf-cyclades-app`` to encrypt the instance hostname in the stats graph
1529 62c0a9e1 Stratos Psomadakis
URL. This settings should be set to a random value and match the
1530 62c0a9e1 Stratos Psomadakis
``STATS_SECRET_KEY`` on the Stats host.
1531 62c0a9e1 Stratos Psomadakis
1532 62c0a9e1 Stratos Psomadakis
Cyclades (snf-cyclades-app) fetches the stat graphs for VMs based on four
1533 62c0a9e1 Stratos Psomadakis
settings in ``20-snf-cyclades-app-api.conf``. The settings are:
1534 62c0a9e1 Stratos Psomadakis
1535 62c0a9e1 Stratos Psomadakis
 * CPU_BAR_GRAPH_URL = 'https://stats.host/stats/v1.0/cpu-bar/%s'
1536 62c0a9e1 Stratos Psomadakis
 * CPU_TIMESERIES_GRAPH_URL = 'https://stats.host/stats/v1.0/cpu-ts/%s'
1537 62c0a9e1 Stratos Psomadakis
 * NET_BAR_GRAPH_URL = 'https://stats.host/stats/v1.0/net-bar/%s'
1538 62c0a9e1 Stratos Psomadakis
 * NET_TIMESERIES_GRAPH_URL = 'https://stats.host/stats/v1.0/net-ts/%s'
1539 62c0a9e1 Stratos Psomadakis
1540 62c0a9e1 Stratos Psomadakis
Make sure that you change this settings to match your ``STATS_BASE_URL``
1541 62c0a9e1 Stratos Psomadakis
(and generally the Apache2 / gunicorn deployment on your stats host).
1542 62c0a9e1 Stratos Psomadakis
1543 62c0a9e1 Stratos Psomadakis
Cyclades will pass these URLs to the Cyclades UI and the user's browser will
1544 62c0a9e1 Stratos Psomadakis
fetch them when needed.
1545 62c0a9e1 Stratos Psomadakis
1546 eab73849 Constantinos Venetsanopoulos
1547 2467655e Christos Stavrakakis
Helpdesk
1548 2467655e Christos Stavrakakis
--------
1549 2467655e Christos Stavrakakis
1550 2467655e Christos Stavrakakis
Helpdesk application provides the ability to view the virtual servers and
1551 2467655e Christos Stavrakakis
networks of all users, along with the ability to perform some basic actions
1552 2467655e Christos Stavrakakis
like administratively suspending a server. You can perform look-ups by
1553 2467655e Christos Stavrakakis
user UUID or email, by server ID (vm-$id) or by an IPv4 address.
1554 2467655e Christos Stavrakakis
1555 2467655e Christos Stavrakakis
If you want to activate the helpdesk application you can set to `True` the
1556 2467655e Christos Stavrakakis
`HELPDESK_ENABLED` setting. Access to helpdesk views (under
1557 2467655e Christos Stavrakakis
`$BASE_URL/helpdesk`) is only to allowed to users that belong to Astakos
1558 2467655e Christos Stavrakakis
groups defined in the `HELPDESK_PERMITTED_GROUPS` setting, which by default
1559 2467655e Christos Stavrakakis
contains the `helpdesk` group. For example, to allow <user_id>
1560 2467655e Christos Stavrakakis
to access helpdesk view, you should run the following command in the Astakos
1561 2467655e Christos Stavrakakis
node:
1562 2467655e Christos Stavrakakis
1563 2467655e Christos Stavrakakis
.. code-block:: console
1564 2467655e Christos Stavrakakis
1565 2467655e Christos Stavrakakis
 snf-manage group-add helpdesk
1566 2467655e Christos Stavrakakis
 snf-manage user-modify --add-group=helpdesk <user_id>
1567 2467655e Christos Stavrakakis
1568 2467655e Christos Stavrakakis
1569 426d4ae3 Constantinos Venetsanopoulos
Cyclades internals
1570 426d4ae3 Constantinos Venetsanopoulos
------------------
1571 426d4ae3 Constantinos Venetsanopoulos
1572 426d4ae3 Constantinos Venetsanopoulos
Asynchronous communication with Ganeti backends
1573 426d4ae3 Constantinos Venetsanopoulos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1574 426d4ae3 Constantinos Venetsanopoulos
Synnefo uses Google Ganeti backends for VM cluster management. In order for
1575 426d4ae3 Constantinos Venetsanopoulos
Cyclades to be able to handle thousands of user requests, Cyclades and Ganeti
1576 426d4ae3 Constantinos Venetsanopoulos
communicate asynchronously. Briefly, requests are submitted to Ganeti through
1577 426d4ae3 Constantinos Venetsanopoulos
Ganeti's RAPI/HTTP interface, and then asynchronous notifications about the
1578 426d4ae3 Constantinos Venetsanopoulos
progress of Ganeti jobs are being created and pushed upwards to Cyclades. The
1579 426d4ae3 Constantinos Venetsanopoulos
architecture and communication with a Ganeti backend is shown in the graph
1580 426d4ae3 Constantinos Venetsanopoulos
below:
1581 426d4ae3 Constantinos Venetsanopoulos
1582 426d4ae3 Constantinos Venetsanopoulos
.. image:: images/cyclades-ganeti-communication.png
1583 9c9525e3 Christos Stavrakakis
   :width: 40%
1584 426d4ae3 Constantinos Venetsanopoulos
   :target: _images/cyclades-ganeti-communication.png
1585 426d4ae3 Constantinos Venetsanopoulos
1586 426d4ae3 Constantinos Venetsanopoulos
The Cyclades API server is responsible for handling user requests. Read-only
1587 426d4ae3 Constantinos Venetsanopoulos
requests are directly served by looking up the Cyclades DB. If the request
1588 426d4ae3 Constantinos Venetsanopoulos
needs an action in the Ganeti backend, Cyclades submit jobs to the Ganeti
1589 426d4ae3 Constantinos Venetsanopoulos
master using the `Ganeti RAPI interface
1590 b0bdf005 Christos Stavrakakis
<http://docs.ganeti.org/ganeti/2.8/html/rapi.html>`_.
1591 426d4ae3 Constantinos Venetsanopoulos
1592 5135245b Christos Stavrakakis
While Ganeti executes the job, `snf-ganeti-eventd`, and `snf-progress-monitor`
1593 5135245b Christos Stavrakakis
are monitoring the progress of the job and send corresponding messages to the
1594 5135245b Christos Stavrakakis
RabbitMQ servers. These components are part of `snf-cyclades-gtools` and must
1595 5135245b Christos Stavrakakis
be installed on all Ganeti nodes. Specially:
1596 426d4ae3 Constantinos Venetsanopoulos
1597 426d4ae3 Constantinos Venetsanopoulos
* *snf-ganeti-eventd* sends messages about operations affecting the operating
1598 426d4ae3 Constantinos Venetsanopoulos
  state of instances and networks. Works by monitoring the Ganeti job queue.
1599 426d4ae3 Constantinos Venetsanopoulos
* *snf-progress_monitor* sends messages about the progress of the Image deployment
1600 426d4ae3 Constantinos Venetsanopoulos
  phase which is done by the Ganeti OS Definition `snf-image`.
1601 426d4ae3 Constantinos Venetsanopoulos
1602 426d4ae3 Constantinos Venetsanopoulos
Finally, `snf-dispatcher` consumes messages from the RabbitMQ queues, processes
1603 426d4ae3 Constantinos Venetsanopoulos
these messages and properly updates the state of the Cyclades DB. Subsequent
1604 426d4ae3 Constantinos Venetsanopoulos
requests to the Cyclades API, will retrieve the updated state from the DB.
1605 426d4ae3 Constantinos Venetsanopoulos
1606 426d4ae3 Constantinos Venetsanopoulos
1607 f936cac5 Constantinos Venetsanopoulos
List of all Synnefo components
1608 f936cac5 Constantinos Venetsanopoulos
==============================
1609 f936cac5 Constantinos Venetsanopoulos
1610 f936cac5 Constantinos Venetsanopoulos
They are also available from our apt repository: ``apt.dev.grnet.gr``
1611 f936cac5 Constantinos Venetsanopoulos
1612 f936cac5 Constantinos Venetsanopoulos
 * `snf-common <http://www.synnefo.org/docs/snf-common/latest/index.html>`_
1613 f936cac5 Constantinos Venetsanopoulos
 * `snf-webproject <http://www.synnefo.org/docs/snf-webproject/latest/index.html>`_
1614 f936cac5 Constantinos Venetsanopoulos
 * `snf-astakos-app <http://www.synnefo.org/docs/astakos/latest/index.html>`_
1615 f936cac5 Constantinos Venetsanopoulos
 * `snf-pithos-backend <http://www.synnefo.org/docs/pithos/latest/backends.html>`_
1616 f936cac5 Constantinos Venetsanopoulos
 * `snf-pithos-app <http://www.synnefo.org/docs/pithos/latest/index.html>`_
1617 f936cac5 Constantinos Venetsanopoulos
 * `snf-pithos-webclient <http://www.synnefo.org/docs/pithos-webclient/latest/index.html>`_
1618 f936cac5 Constantinos Venetsanopoulos
 * `snf-cyclades-app <http://www.synnefo.org/docs/snf-cyclades-app/latest/index.html>`_
1619 f936cac5 Constantinos Venetsanopoulos
 * `snf-cyclades-gtools <http://www.synnefo.org/docs/snf-cyclades-gtools/latest/index.html>`_
1620 f936cac5 Constantinos Venetsanopoulos
 * `astakosclient <http://www.synnefo.org/docs/astakosclient/latest/index.html>`_
1621 f936cac5 Constantinos Venetsanopoulos
 * `snf-vncauthproxy <https://code.grnet.gr/projects/vncauthproxy>`_
1622 f936cac5 Constantinos Venetsanopoulos
 * `snf-image <http://www.synnefo.org/docs/snf-image/latest/index.html/>`_
1623 f936cac5 Constantinos Venetsanopoulos
 * `snf-image-creator <http://www.synnefo.org/docs/snf-image-creator/latest/index.html>`_
1624 f936cac5 Constantinos Venetsanopoulos
 * `snf-occi <http://www.synnefo.org/docs/snf-occi/latest/index.html>`_
1625 f936cac5 Constantinos Venetsanopoulos
 * `snf-cloudcms <http://www.synnefo.org/docs/snf-cloudcms/latest/index.html>`_
1626 f936cac5 Constantinos Venetsanopoulos
 * `nfdhcpd <https://code.grnet.gr/projects/nfdhcpd>`_
1627 f936cac5 Constantinos Venetsanopoulos
1628 f936cac5 Constantinos Venetsanopoulos
1629 e81ad3e5 Constantinos Venetsanopoulos
Synnefo management commands ("snf-manage")
1630 e81ad3e5 Constantinos Venetsanopoulos
==========================================
1631 e81ad3e5 Constantinos Venetsanopoulos
1632 e81ad3e5 Constantinos Venetsanopoulos
Each Synnefo service, Astakos, Pithos and Cyclades are controlled by the
1633 e81ad3e5 Constantinos Venetsanopoulos
administrator using the "snf-manage" admin tool. This tool is an extension of
1634 e81ad3e5 Constantinos Venetsanopoulos
the Django command-line management utility. It is run on the host that runs
1635 e81ad3e5 Constantinos Venetsanopoulos
each service and provides different types of commands depending the services
1636 e81ad3e5 Constantinos Venetsanopoulos
running on the host. If you are running more than one service on the same host
1637 e81ad3e5 Constantinos Venetsanopoulos
"snf-manage" adds all the corresponding commands for each service dynamically,
1638 e81ad3e5 Constantinos Venetsanopoulos
providing a unified admin environment.
1639 e81ad3e5 Constantinos Venetsanopoulos
1640 e81ad3e5 Constantinos Venetsanopoulos
To run "snf-manage" you just type:
1641 e81ad3e5 Constantinos Venetsanopoulos
1642 e81ad3e5 Constantinos Venetsanopoulos
.. code-block:: console
1643 e81ad3e5 Constantinos Venetsanopoulos
1644 e81ad3e5 Constantinos Venetsanopoulos
   # snf-manage <command> [arguments]
1645 e81ad3e5 Constantinos Venetsanopoulos
1646 e81ad3e5 Constantinos Venetsanopoulos
on the corresponding host that runs the service. For example, if you have all
1647 e81ad3e5 Constantinos Venetsanopoulos
services running on different physical hosts you would do:
1648 e81ad3e5 Constantinos Venetsanopoulos
1649 e81ad3e5 Constantinos Venetsanopoulos
.. code-block:: console
1650 e81ad3e5 Constantinos Venetsanopoulos
1651 e81ad3e5 Constantinos Venetsanopoulos
   root@astakos-host # snf-manage <astakos-command> [argument]
1652 e81ad3e5 Constantinos Venetsanopoulos
   root@pithos-host # snf-manage <pithos-command> [argument]
1653 e81ad3e5 Constantinos Venetsanopoulos
   root@cyclades-host # snf-manage <cyclades-command> [argument]
1654 e81ad3e5 Constantinos Venetsanopoulos
1655 e81ad3e5 Constantinos Venetsanopoulos
If you have all services running on the same host you would do:
1656 e81ad3e5 Constantinos Venetsanopoulos
1657 e81ad3e5 Constantinos Venetsanopoulos
.. code-block:: console
1658 e81ad3e5 Constantinos Venetsanopoulos
1659 e81ad3e5 Constantinos Venetsanopoulos
   root@synnefo-host # snf-manage <{astakos,pithos,cyclades}-command> [argument]
1660 e81ad3e5 Constantinos Venetsanopoulos
1661 e81ad3e5 Constantinos Venetsanopoulos
Note that you cannot execute a service's command on a host that is not running
1662 e81ad3e5 Constantinos Venetsanopoulos
this service. For example, the following will return an error if Astakos and
1663 e81ad3e5 Constantinos Venetsanopoulos
Cyclades are installed on different physical hosts:
1664 e81ad3e5 Constantinos Venetsanopoulos
1665 e81ad3e5 Constantinos Venetsanopoulos
.. code-block:: console
1666 e81ad3e5 Constantinos Venetsanopoulos
1667 e81ad3e5 Constantinos Venetsanopoulos
   root@astakos-host # snf-manage <cyclades-command> [argument]
1668 e81ad3e5 Constantinos Venetsanopoulos
   Unknown command: 'cyclades-command'
1669 e81ad3e5 Constantinos Venetsanopoulos
   Type 'snf-manage help' for usage.
1670 e81ad3e5 Constantinos Venetsanopoulos
1671 e81ad3e5 Constantinos Venetsanopoulos
This is the complete list of "snf-manage" commands for each service.
1672 e81ad3e5 Constantinos Venetsanopoulos
1673 e81ad3e5 Constantinos Venetsanopoulos
Astakos snf-manage commands
1674 e81ad3e5 Constantinos Venetsanopoulos
---------------------------
1675 e81ad3e5 Constantinos Venetsanopoulos
1676 e81ad3e5 Constantinos Venetsanopoulos
============================  ===========================
1677 e81ad3e5 Constantinos Venetsanopoulos
Name                          Description
1678 e81ad3e5 Constantinos Venetsanopoulos
============================  ===========================
1679 e81ad3e5 Constantinos Venetsanopoulos
fix-superusers                Transform superusers created by syncdb into AstakosUser instances
1680 5e1ea6f7 Giorgos Korfiatis
cleanup-full                  Cleanup sessions and session catalog
1681 a4451f59 Giorgos Korfiatis
commission-list               List pending commissions
1682 a4451f59 Giorgos Korfiatis
commission-show               Show details for a pending commission
1683 252eef38 Giorgos Korfiatis
component-add                 Register a component
1684 252eef38 Giorgos Korfiatis
component-list                List components
1685 252eef38 Giorgos Korfiatis
component-modify              Modify component attributes
1686 6ef1e2eb Giorgos Korfiatis
component-show                Show component details
1687 e81ad3e5 Constantinos Venetsanopoulos
project-control               Manage projects and applications
1688 e81ad3e5 Constantinos Venetsanopoulos
project-list                  List projects
1689 e81ad3e5 Constantinos Venetsanopoulos
project-show                  Show project details
1690 a69ad12b Giorgos Korfiatis
quota-list                    List user quota
1691 a69ad12b Giorgos Korfiatis
quota-verify                  Check the integrity of user quota
1692 e81ad3e5 Constantinos Venetsanopoulos
reconcile-resources-astakos   Reconcile resource usage of Quotaholder with Astakos DB
1693 e81ad3e5 Constantinos Venetsanopoulos
resource-list                 List resources
1694 5e1ea6f7 Giorgos Korfiatis
resource-modify               Modify a resource's default base quota and boolean flags
1695 90e7da53 Giorgos Korfiatis
service-export-astakos        Export Astakos services and resources in JSON format
1696 bd1f667b Giorgos Korfiatis
service-import                Register services
1697 e81ad3e5 Constantinos Venetsanopoulos
service-list                  List services
1698 5e1ea6f7 Giorgos Korfiatis
service-show                  Show service details
1699 e81ad3e5 Constantinos Venetsanopoulos
term-add                      Add approval terms
1700 e81ad3e5 Constantinos Venetsanopoulos
user-activation-send          Send user activation
1701 e81ad3e5 Constantinos Venetsanopoulos
user-add                      Add user
1702 9577d199 Kostas Papadimitriou
authpolicy-add                Create a new authentication provider policy profile
1703 9577d199 Kostas Papadimitriou
authpolicy-list               List existing authentication provider policy profiles
1704 9577d199 Kostas Papadimitriou
authpolicy-remove             Remove an authentication provider policy
1705 9577d199 Kostas Papadimitriou
authpolicy-set                Assign an existing authentication provider policy profile to a user or group
1706 9577d199 Kostas Papadimitriou
authpolicy-show               Show authentication provider profile details
1707 9577d199 Kostas Papadimitriou
group-add                     Create a group with the given name
1708 9577d199 Kostas Papadimitriou
group-list                    List available groups
1709 e81ad3e5 Constantinos Venetsanopoulos
user-list                     List users
1710 e81ad3e5 Constantinos Venetsanopoulos
user-modify                   Modify user
1711 e81ad3e5 Constantinos Venetsanopoulos
user-show                     Show user details
1712 5547485e Sofia Papagiannaki
oauth2-client-add             Create an oauth2 client
1713 5547485e Sofia Papagiannaki
oauth2-client-list            List oauth2 clients
1714 5547485e Sofia Papagiannaki
oauth2-client-remove          Remove an oauth2 client along with its registered redirect urls
1715 e81ad3e5 Constantinos Venetsanopoulos
============================  ===========================
1716 e81ad3e5 Constantinos Venetsanopoulos
1717 e81ad3e5 Constantinos Venetsanopoulos
Pithos snf-manage commands
1718 e81ad3e5 Constantinos Venetsanopoulos
--------------------------
1719 e81ad3e5 Constantinos Venetsanopoulos
1720 e81ad3e5 Constantinos Venetsanopoulos
============================  ===========================
1721 e81ad3e5 Constantinos Venetsanopoulos
Name                          Description
1722 e81ad3e5 Constantinos Venetsanopoulos
============================  ===========================
1723 3506f6a0 Sofia Papagiannaki
reconcile-commissions-pithos  Display unresolved commissions and trigger their recovery
1724 90e7da53 Giorgos Korfiatis
service-export-pithos         Export Pithos services and resources in JSON format
1725 3506f6a0 Sofia Papagiannaki
reconcile-resources-pithos    Detect unsynchronized usage between Astakos and Pithos DB resources and synchronize them if specified so.
1726 c598a8a7 Sofia Papagiannaki
file-show                     Display object information
1727 e81ad3e5 Constantinos Venetsanopoulos
============================  ===========================
1728 e81ad3e5 Constantinos Venetsanopoulos
1729 e81ad3e5 Constantinos Venetsanopoulos
Cyclades snf-manage commands
1730 e81ad3e5 Constantinos Venetsanopoulos
----------------------------
1731 e81ad3e5 Constantinos Venetsanopoulos
1732 bf57a264 Christos Stavrakakis
============================== ===========================
1733 bf57a264 Christos Stavrakakis
Name                           Description
1734 bf57a264 Christos Stavrakakis
============================== ===========================
1735 bf57a264 Christos Stavrakakis
backend-add                    Add a new Ganeti backend
1736 bf57a264 Christos Stavrakakis
backend-list                   List backends
1737 bf57a264 Christos Stavrakakis
backend-modify                 Modify a backend
1738 bf57a264 Christos Stavrakakis
backend-update-status          Update backend statistics for instance allocation
1739 bf57a264 Christos Stavrakakis
backend-remove                 Remove a Ganeti backend
1740 d14155e3 Giorgos Korfiatis
enforce-resources-cyclades     Check and fix quota violations for Cyclades resources
1741 bf57a264 Christos Stavrakakis
server-create                  Create a new server
1742 bf57a264 Christos Stavrakakis
server-show                    Show server details
1743 bf57a264 Christos Stavrakakis
server-list                    List servers
1744 bf57a264 Christos Stavrakakis
server-modify                  Modify a server
1745 bf57a264 Christos Stavrakakis
server-import                  Import an existing Ganeti VM into synnefo
1746 bf57a264 Christos Stavrakakis
server-inspect                 Inspect a server in DB and Ganeti
1747 bf57a264 Christos Stavrakakis
network-create                 Create a new network
1748 bf57a264 Christos Stavrakakis
network-list                   List networks
1749 bf57a264 Christos Stavrakakis
network-modify                 Modify a network
1750 bf57a264 Christos Stavrakakis
network-inspect                Inspect network state in DB and Ganeti
1751 bf57a264 Christos Stavrakakis
network-remove                 Delete a network
1752 bf57a264 Christos Stavrakakis
flavor-create                  Create a new flavor
1753 bf57a264 Christos Stavrakakis
flavor-list                    List flavors
1754 bf57a264 Christos Stavrakakis
flavor-modify                  Modify a flavor
1755 bf57a264 Christos Stavrakakis
image-list                     List images
1756 bf57a264 Christos Stavrakakis
image-show                     Show image details
1757 bf57a264 Christos Stavrakakis
pool-create                    Create a bridge or mac-prefix pool
1758 bf57a264 Christos Stavrakakis
pool-show                      Show pool details
1759 bf57a264 Christos Stavrakakis
pool-list                      List pools
1760 bf57a264 Christos Stavrakakis
pool-modify                    Modify a pool
1761 bf57a264 Christos Stavrakakis
pool-remove                    Delete a pool
1762 f61f3fa7 Christos Stavrakakis
port-create                    Create a port connecting a server to a network
1763 f61f3fa7 Christos Stavrakakis
port-inspect                   Inspect the state of a port in DB and Ganeti
1764 f61f3fa7 Christos Stavrakakis
port-list                      List ports
1765 f61f3fa7 Christos Stavrakakis
port-remove                    Delete a port
1766 f61f3fa7 Christos Stavrakakis
floating-ip-create             Create a new floating IP
1767 f61f3fa7 Christos Stavrakakis
floating-ip-attach             Attach a floating IP to a server
1768 6d86f5b3 Christos Stavrakakis
floating-ip-detach             Detach a floating IP from a server
1769 f61f3fa7 Christos Stavrakakis
floating-ip-list               List floating IPs
1770 f61f3fa7 Christos Stavrakakis
floating-ip-remove             Delete a floating IP
1771 bf57a264 Christos Stavrakakis
queue-inspect                  Inspect the messages of a RabbitMQ queue
1772 bf57a264 Christos Stavrakakis
queue-retry                    Resend messages from Dead Letter queues to original exchanges
1773 90e7da53 Giorgos Korfiatis
service-export-cyclades        Export Cyclades services and resources in JSON format
1774 aab200c6 Dionysis Grigoropoulos
subnet-create                  Create a subnet
1775 aab200c6 Dionysis Grigoropoulos
subnet-inspect                 Inspect a subnet in DB
1776 aab200c6 Dionysis Grigoropoulos
subnet-list                    List subnets
1777 aab200c6 Dionysis Grigoropoulos
subnet-modify                  Modify a subnet
1778 bf57a264 Christos Stavrakakis
reconcile-servers              Reconcile servers of Synnefo DB with state of Ganeti backend
1779 bf57a264 Christos Stavrakakis
reconcile-networks             Reconcile networks of Synnefo DB with state of Ganeti backend
1780 bf57a264 Christos Stavrakakis
reconcile-pools                Check consistency of pool resources
1781 bf57a264 Christos Stavrakakis
reconcile-commissions-cyclades Detect and resolve pending commissions to Quotaholder
1782 bf57a264 Christos Stavrakakis
reconcile-resources-cyclades   Reconcile resource usage of Astakos with Cyclades DB.
1783 bf57a264 Christos Stavrakakis
============================== ===========================
1784 e81ad3e5 Constantinos Venetsanopoulos
1785 44cc2a6a Constantinos Venetsanopoulos
1786 11716a83 Giorgos Korfiatis
Astakos helper scripts
1787 11716a83 Giorgos Korfiatis
======================
1788 11716a83 Giorgos Korfiatis
1789 11716a83 Giorgos Korfiatis
Astakos includes two scripts to facilitate the installation procedure.
1790 11716a83 Giorgos Korfiatis
Running:
1791 11716a83 Giorgos Korfiatis
1792 11716a83 Giorgos Korfiatis
.. code-block:: console
1793 11716a83 Giorgos Korfiatis
1794 b4109758 Giorgos Korfiatis
   snf-component-register [<component_name>]
1795 11716a83 Giorgos Korfiatis
1796 11716a83 Giorgos Korfiatis
automates the registration of the standard Synnefo components (astakos,
1797 11716a83 Giorgos Korfiatis
cyclades, and pithos) in astakos database. It internally uses the script:
1798 11716a83 Giorgos Korfiatis
1799 11716a83 Giorgos Korfiatis
.. code-block:: console
1800 11716a83 Giorgos Korfiatis
1801 11716a83 Giorgos Korfiatis
   snf-service-export <component_name> <base_url>
1802 11716a83 Giorgos Korfiatis
1803 11716a83 Giorgos Korfiatis
which simulates the export of service and resource definitions of the
1804 11716a83 Giorgos Korfiatis
standard Synnefo components.
1805 11716a83 Giorgos Korfiatis
1806 44cc2a6a Constantinos Venetsanopoulos
1807 3506f6a0 Sofia Papagiannaki
Pithos managing accounts
1808 3506f6a0 Sofia Papagiannaki
========================
1809 3506f6a0 Sofia Papagiannaki
1810 3506f6a0 Sofia Papagiannaki
Pithos provides a utility tool for managing accounts.
1811 3506f6a0 Sofia Papagiannaki
To run you just type:
1812 3506f6a0 Sofia Papagiannaki
1813 3506f6a0 Sofia Papagiannaki
.. code-block:: console
1814 3506f6a0 Sofia Papagiannaki
1815 3506f6a0 Sofia Papagiannaki
   # pithos-manage-accounts <command> [arguments]
1816 3506f6a0 Sofia Papagiannaki
1817 3506f6a0 Sofia Papagiannaki
This is the list of the available commands:
1818 3506f6a0 Sofia Papagiannaki
1819 3506f6a0 Sofia Papagiannaki
============================  ===========================
1820 3506f6a0 Sofia Papagiannaki
Name                          Description
1821 3506f6a0 Sofia Papagiannaki
============================  ===========================
1822 3506f6a0 Sofia Papagiannaki
delete                        Remove an account from the Pithos DB
1823 3506f6a0 Sofia Papagiannaki
export-quota                  Export account quota in a file
1824 3506f6a0 Sofia Papagiannaki
list                          List existing/dublicate accounts
1825 3506f6a0 Sofia Papagiannaki
merge                         Move an account contents in another account
1826 3506f6a0 Sofia Papagiannaki
set-container-quota           Set container quota for all or a specific account
1827 3506f6a0 Sofia Papagiannaki
============================  ===========================
1828 3506f6a0 Sofia Papagiannaki
1829 e81ad3e5 Constantinos Venetsanopoulos
1830 bc055d09 Constantinos Venetsanopoulos
The "kamaki" API client
1831 eab73849 Constantinos Venetsanopoulos
=======================
1832 bc055d09 Constantinos Venetsanopoulos
1833 bc055d09 Constantinos Venetsanopoulos
To upload, register or modify an image you will need the **kamaki** tool.
1834 bc055d09 Constantinos Venetsanopoulos
Before proceeding make sure that it is configured properly. Verify that
1835 dd04efac Stavros Sachtouris
*image.url*, *file.url*, *user.url* and *token* are set as needed:
1836 bc055d09 Constantinos Venetsanopoulos
1837 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1838 bc055d09 Constantinos Venetsanopoulos
1839 bc055d09 Constantinos Venetsanopoulos
   $ kamaki config list
1840 bc055d09 Constantinos Venetsanopoulos
1841 73ebcd68 Constantinos Venetsanopoulos
To change a setting use ``kamaki config set``:
1842 bc055d09 Constantinos Venetsanopoulos
1843 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1844 bc055d09 Constantinos Venetsanopoulos
1845 9190b227 Stavros Sachtouris
   $ kamaki config set cloud.default.url https://example.com/identity/v2.0
1846 9190b227 Stavros Sachtouris
   $ kamaki config set cloud.default.token ...
1847 bc055d09 Constantinos Venetsanopoulos
1848 c0d88cf3 Constantinos Venetsanopoulos
To test that everything works, try authenticating the current account with
1849 c0d88cf3 Constantinos Venetsanopoulos
kamaki:
1850 dd04efac Stavros Sachtouris
1851 dd04efac Stavros Sachtouris
.. code-block:: console
1852 dd04efac Stavros Sachtouris
1853 dd04efac Stavros Sachtouris
  $ kamaki user authenticate
1854 dd04efac Stavros Sachtouris
1855 c0d88cf3 Constantinos Venetsanopoulos
This will output user information.
1856 dd04efac Stavros Sachtouris
1857 bc055d09 Constantinos Venetsanopoulos
Upload Image
1858 bc055d09 Constantinos Venetsanopoulos
------------
1859 bc055d09 Constantinos Venetsanopoulos
1860 c0d88cf3 Constantinos Venetsanopoulos
By convention, images are stored in a container called ``images``. Check if the
1861 c0d88cf3 Constantinos Venetsanopoulos
container exists, by listing all containers in your account:
1862 bc055d09 Constantinos Venetsanopoulos
1863 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1864 bc055d09 Constantinos Venetsanopoulos
1865 9190b227 Stavros Sachtouris
   $ kamaki file list /images
1866 bc055d09 Constantinos Venetsanopoulos
1867 dd04efac Stavros Sachtouris
If the container ``images`` does not exist, create it:
1868 bc055d09 Constantinos Venetsanopoulos
1869 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1870 bc055d09 Constantinos Venetsanopoulos
1871 9190b227 Stavros Sachtouris
  $ kamaki container create images
1872 bc055d09 Constantinos Venetsanopoulos
1873 c0d88cf3 Constantinos Venetsanopoulos
You are now ready to upload an image to container ``images``. You can upload it
1874 e5d8df8c Constantinos Venetsanopoulos
with a Pithos client, or use kamaki directly:
1875 bc055d09 Constantinos Venetsanopoulos
1876 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1877 bc055d09 Constantinos Venetsanopoulos
1878 9190b227 Stavros Sachtouris
   $ kamaki file upload ubuntu.iso /images
1879 bc055d09 Constantinos Venetsanopoulos
1880 e5d8df8c Constantinos Venetsanopoulos
You can use any Pithos client to verify that the image was uploaded correctly,
1881 c0d88cf3 Constantinos Venetsanopoulos
or you can list the contents of the container with kamaki:
1882 bc055d09 Constantinos Venetsanopoulos
1883 dd04efac Stavros Sachtouris
.. code-block:: console
1884 dd04efac Stavros Sachtouris
1885 9190b227 Stavros Sachtouris
  $ kamaki file list /images
1886 bc055d09 Constantinos Venetsanopoulos
1887 bc055d09 Constantinos Venetsanopoulos
The full Pithos URL for the previous example will be
1888 c0d88cf3 Constantinos Venetsanopoulos
``pithos://u53r-un1qu3-1d/images/ubuntu.iso`` where ``u53r-un1qu3-1d`` is the
1889 c0d88cf3 Constantinos Venetsanopoulos
unique user id (uuid).
1890 bc055d09 Constantinos Venetsanopoulos
1891 bc055d09 Constantinos Venetsanopoulos
Register Image
1892 bc055d09 Constantinos Venetsanopoulos
--------------
1893 bc055d09 Constantinos Venetsanopoulos
1894 9190b227 Stavros Sachtouris
To register an image you will need to use the full or the relative Pithos URL.
1895 9190b227 Stavros Sachtouris
To register as a public image the one from the previous example use:
1896 bc055d09 Constantinos Venetsanopoulos
1897 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1898 bc055d09 Constantinos Venetsanopoulos
1899 9190b227 Stavros Sachtouris
   $ kamaki image register --name=Ubuntu --location=/images/ubuntu.iso --public
1900 bc055d09 Constantinos Venetsanopoulos
1901 bc055d09 Constantinos Venetsanopoulos
The ``--public`` flag is important, if missing the registered image will not
1902 dd04efac Stavros Sachtouris
be listed by ``kamaki image list``.
1903 bc055d09 Constantinos Venetsanopoulos
1904 dd04efac Stavros Sachtouris
Use ``kamaki image register`` with no arguments to see a list of available
1905 bc055d09 Constantinos Venetsanopoulos
options. A more complete example would be the following:
1906 bc055d09 Constantinos Venetsanopoulos
1907 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1908 bc055d09 Constantinos Venetsanopoulos
1909 9190b227 Stavros Sachtouris
   $ kamaki image register --name Ubuntu --location /images/ubuntu.iso \
1910 bc055d09 Constantinos Venetsanopoulos
            --public --disk-format diskdump --property kernel=3.1.2
1911 bc055d09 Constantinos Venetsanopoulos
1912 bc055d09 Constantinos Venetsanopoulos
To verify that the image was registered successfully use:
1913 bc055d09 Constantinos Venetsanopoulos
1914 bc055d09 Constantinos Venetsanopoulos
.. code-block:: console
1915 bc055d09 Constantinos Venetsanopoulos
1916 9190b227 Stavros Sachtouris
   $ kamaki image list --name-like ubuntu
1917 bc055d09 Constantinos Venetsanopoulos
1918 eab73849 Constantinos Venetsanopoulos
1919 eab73849 Constantinos Venetsanopoulos
Miscellaneous
1920 eab73849 Constantinos Venetsanopoulos
=============
1921 eab73849 Constantinos Venetsanopoulos
1922 08ad5b01 Constantinos Venetsanopoulos
.. _branding:
1923 9c2edbf1 Olga Brani
1924 42e767d4 Olga Brani
Branding
1925 08ad5b01 Constantinos Venetsanopoulos
--------
1926 9c2edbf1 Olga Brani
1927 08ad5b01 Constantinos Venetsanopoulos
Since Synnefo v0.14, you are able to adapt the Astakos, Pithos and Cyclades Web
1928 08ad5b01 Constantinos Venetsanopoulos
UI to your company’s visual identity. This is possible using the snf-branding
1929 08ad5b01 Constantinos Venetsanopoulos
component, which is automatically installed on the nodes running the API
1930 0019cd7d Christos Stavrakakis
servers for Astakos, Pithos and Cyclades.
1931 9c2edbf1 Olga Brani
1932 9c2edbf1 Olga Brani
Configuration
1933 9c2edbf1 Olga Brani
~~~~~~~~~~~~~
1934 9c2edbf1 Olga Brani
1935 77186edf Kostas Papadimitriou
This can be done by modifing the settings provided by the snf-branding component
1936 77186edf Kostas Papadimitriou
to match your service identity. The settings for the snf-branding application
1937 77186edf Kostas Papadimitriou
can be found inside the configuration file ``/etc/synnefo/15-snf-branding.conf``
1938 77186edf Kostas Papadimitriou
on the nodes that have Astakos, Pithos and Cyclades installed.
1939 9c2edbf1 Olga Brani
1940 08ad5b01 Constantinos Venetsanopoulos
By default, the global service name is "Synnefo" and the company name is
1941 08ad5b01 Constantinos Venetsanopoulos
"GRNET". These names and their respective logos and URLs are used throughout
1942 08ad5b01 Constantinos Venetsanopoulos
the Astakos, Pithos and Cyclades UI.
1943 9c2edbf1 Olga Brani
1944 08ad5b01 Constantinos Venetsanopoulos
**Names and URLs:**
1945 9c2edbf1 Olga Brani
1946 08ad5b01 Constantinos Venetsanopoulos
The first group of branding customization refers to the service's and company's
1947 08ad5b01 Constantinos Venetsanopoulos
information.
1948 9c2edbf1 Olga Brani
1949 08ad5b01 Constantinos Venetsanopoulos
You can overwrite the company and the service name and URL respectively by
1950 08ad5b01 Constantinos Venetsanopoulos
uncommenting and setting the following:
1951 9c2edbf1 Olga Brani
1952 77186edf Kostas Papadimitriou
.. code-block:: python
1953 0019cd7d Christos Stavrakakis
1954 77186edf Kostas Papadimitriou
  # setting used in Astakos Dashboard/Projects pages
1955 77186edf Kostas Papadimitriou
  BRANDING_SERVICE_NAME = 'My cloud'
1956 77186edf Kostas Papadimitriou
  BRANDING_SERVICE_URL = 'http://www.mycloud.synnefo.org/'
1957 9c2edbf1 Olga Brani
1958 0019cd7d Christos Stavrakakis
  # settings used in Astakos, Pithos, Cyclades footer only if
1959 77186edf Kostas Papadimitriou
  # BRANDING_SHOW_COPYRIGHT is set to True
1960 77186edf Kostas Papadimitriou
  BRANDING_SHOW_COPYRIGHT = True
1961 77186edf Kostas Papadimitriou
  BRANDING_COMPANY_NAME = 'Company LTD'
1962 77186edf Kostas Papadimitriou
  BRANDING_COMPANY_URL = 'https://www.company-ltd.synnefo.org/'
1963 9c2edbf1 Olga Brani
1964 9c2edbf1 Olga Brani
1965 97a096f1 Olga Brani
**Copyright and footer options:**
1966 9c2edbf1 Olga Brani
1967 08ad5b01 Constantinos Venetsanopoulos
By default, no Copyright message is shown in the UI footer. If you want to make
1968 08ad5b01 Constantinos Venetsanopoulos
it visible in the footer of Astakos, Pithos and Cyclades UI, you can uncomment
1969 77186edf Kostas Papadimitriou
and set to ``True`` the ``BRANDING_SHOW_COPYRIGHT`` setting:
1970 9c2edbf1 Olga Brani
1971 77186edf Kostas Papadimitriou
.. code-block:: python
1972 9c2edbf1 Olga Brani
1973 9c2edbf1 Olga Brani
  #BRANDING_SHOW_COPYRIGHT = False
1974 9c2edbf1 Olga Brani
1975 77186edf Kostas Papadimitriou
Copyright message defaults to 'Copyright (c) 2011-<current_year>
1976 08ad5b01 Constantinos Venetsanopoulos
<BRANDING_COMPANY_NAME>.' but you can overwrite it to a completely custom one by
1977 08ad5b01 Constantinos Venetsanopoulos
setting the following option:
1978 9c2edbf1 Olga Brani
1979 77186edf Kostas Papadimitriou
.. code-block:: python
1980 77186edf Kostas Papadimitriou
1981 77186edf Kostas Papadimitriou
  BRANDING_COPYRIGHT_MESSAGE = 'Copyright (c) 2011-2013 GRNET'
1982 9c2edbf1 Olga Brani
1983 0019cd7d Christos Stavrakakis
If you want to include a custom message in the footer, you can uncomment and
1984 0019cd7d Christos Stavrakakis
set the ``BRANDING_FOOTER_EXTRA_MESSAGE`` setting. You can use html markup.
1985 0019cd7d Christos Stavrakakis
Your custom message will appear  above Copyright message at the Compute
1986 97a096f1 Olga Brani
templates and the Dashboard UI.
1987 97a096f1 Olga Brani
1988 97a096f1 Olga Brani
.. code-block:: python
1989 97a096f1 Olga Brani
1990 97a096f1 Olga Brani
  #BRANDING_FOOTER_EXTRA_MESSAGE = ''
1991 97a096f1 Olga Brani
1992 9c2edbf1 Olga Brani
1993 9c2edbf1 Olga Brani
**Images:**
1994 9c2edbf1 Olga Brani
1995 08ad5b01 Constantinos Venetsanopoulos
The Astakos, Pithos and Cyclades Web UI has some logos and images.
1996 0019cd7d Christos Stavrakakis
1997 9c2edbf1 Olga Brani
The branding-related images are presented in  the following table:
1998 9c2edbf1 Olga Brani
1999 9c2edbf1 Olga Brani
===============  ============================  =========
2000 9c2edbf1 Olga Brani
Image            Name/extension  convention    Usage
2001 9c2edbf1 Olga Brani
===============  ============================  =========
2002 9c2edbf1 Olga Brani
Favicon          favicon.ico                   Favicon for all services
2003 9c2edbf1 Olga Brani
Dashboard logo   dashboard_logo.png            Visible in all Astakos UI pages
2004 9c2edbf1 Olga Brani
Compute logo     compute_logo.png              Visible in all Cyclades UI pages
2005 08ad5b01 Constantinos Venetsanopoulos
Console logo     console_logo.png              Visible in the Cyclades Console Window
2006 08ad5b01 Constantinos Venetsanopoulos
Storage logo     storage_logo.png              Visible in all Pithos UI pages
2007 9c2edbf1 Olga Brani
===============  ============================  =========
2008 9c2edbf1 Olga Brani
2009 0019cd7d Christos Stavrakakis
There are two methods  available for replacing all, or individual,
2010 263cb456 Olga Brani
branding-related images:
2011 9c2edbf1 Olga Brani
2012 77186edf Kostas Papadimitriou
1. Create a new directory inside ``/usr/share/synnefo/static/`` (e.g.
2013 77186edf Kostas Papadimitriou
   ``mybranding``) and place there some or all of your images.
2014 9c2edbf1 Olga Brani
2015 08ad5b01 Constantinos Venetsanopoulos
   If you want to replace all of your images, keep the name/extension
2016 77186edf Kostas Papadimitriou
   conventions as indicated in the above table and change the
2017 77186edf Kostas Papadimitriou
   ``BRANDING_IMAGE_MEDIA_URL`` setting accordingly:
2018 9c2edbf1 Olga Brani
2019 77186edf Kostas Papadimitriou
   .. code-block:: python
2020 0019cd7d Christos Stavrakakis
2021 77186edf Kostas Papadimitriou
      # using relative path
2022 0019cd7d Christos Stavrakakis
      BRANDING_IMAGE_MEDIA_URL= '/static/mybranding/images/'
2023 9c2edbf1 Olga Brani
2024 77186edf Kostas Papadimitriou
      # or if you already host them in a separate domain (e.g. cdn)
2025 77186edf Kostas Papadimitriou
      BRANDING_IMAGE_MEDIA_URL= 'https://cdn.synnefo.org/branding/images/'
2026 9c2edbf1 Olga Brani
2027 9c2edbf1 Olga Brani
2028 08ad5b01 Constantinos Venetsanopoulos
   If you wish to replace individual images, **do not uncomment**
2029 08ad5b01 Constantinos Venetsanopoulos
   ``BRANDING_IMAGE_MEDIA_URL``, but instead provide a relative path, pointing to
2030 08ad5b01 Constantinos Venetsanopoulos
   the file inside your directory for each ``BRANDING_<image>_URL`` that you wish
2031 08ad5b01 Constantinos Venetsanopoulos
   to replace.
2032 9c2edbf1 Olga Brani
2033 0019cd7d Christos Stavrakakis
2. Upload some or all of your images to a server and replace each
2034 08ad5b01 Constantinos Venetsanopoulos
   ``BRANDING_<image>_URL`` with the absolute url of the image (i.e.
2035 77186edf Kostas Papadimitriou
   ``BRANDING_DASHBOARD_URL = 'https://www.synnefo.com/images/my_dashboard.jpg'``).
2036 9c2edbf1 Olga Brani
2037 0019cd7d Christos Stavrakakis
   Note that the alternative text  for each image tag inside html documents is
2038 08ad5b01 Constantinos Venetsanopoulos
   alt=“BRANDING_SERVICE_NAME {Dashboard, Compute. Console, Storage}” respectively.
2039 9c2edbf1 Olga Brani
2040 42e767d4 Olga Brani
.. note:: Retina optimized images:
2041 9c2edbf1 Olga Brani
2042 0019cd7d Christos Stavrakakis
   Synnefo UI is optimized for Retina displays. As far as images are concerned,
2043 08ad5b01 Constantinos Venetsanopoulos
   `retina.js <http://retinajs.com/>`_ is used.
2044 9c2edbf1 Olga Brani
2045 0019cd7d Christos Stavrakakis
   Retina.js checks each image on a page to see if there is a high-resolution
2046 0019cd7d Christos Stavrakakis
   version of that image on your server. If a high-resolution variant exists,
2047 08ad5b01 Constantinos Venetsanopoulos
   the script will swap in that image in-place.
2048 9c2edbf1 Olga Brani
2049 08ad5b01 Constantinos Venetsanopoulos
   The script assumes you use  `Apple's prescribed high-resolution modifier (@2x)
2050 08ad5b01 Constantinos Venetsanopoulos
   <http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/
2051 08ad5b01 Constantinos Venetsanopoulos
   DrawingPrintingiOS/SupportingHiResScreensInViews/SupportingHiResScreensInViews
2052 0019cd7d Christos Stavrakakis
   .html#//apple_ref/doc/uid/TP40010156-CH15-SW1>`_ to denote high-resolution
2053 08ad5b01 Constantinos Venetsanopoulos
   image variants on your server.
2054 9c2edbf1 Olga Brani
2055 0019cd7d Christos Stavrakakis
   For each of the images that you wish the script to  replace, you must have a
2056 0019cd7d Christos Stavrakakis
   high-resolution variant in the same folder  named correctly and it will be
2057 0019cd7d Christos Stavrakakis
   detected automatically. For example if your image is in <my_directory> and is
2058 0019cd7d Christos Stavrakakis
   named "my_image.jpg" the script will look in the same directory for an image
2059 08ad5b01 Constantinos Venetsanopoulos
   named "my_image@2x.jpg".
2060 9c2edbf1 Olga Brani
2061 0019cd7d Christos Stavrakakis
   In case that you don’t want to use a high-resolution image, the
2062 08ad5b01 Constantinos Venetsanopoulos
   normal-resolution image will be visible.
2063 9c2edbf1 Olga Brani
2064 08ad5b01 Constantinos Venetsanopoulos
More branding
2065 08ad5b01 Constantinos Venetsanopoulos
~~~~~~~~~~~~~
2066 9c2edbf1 Olga Brani
2067 08ad5b01 Constantinos Venetsanopoulos
Although, it is not 100% branding-related, further verbal customization is
2068 0019cd7d Christos Stavrakakis
feasible.
2069 9c2edbf1 Olga Brani
2070 9c2edbf1 Olga Brani
**EMAILS**
2071 9c2edbf1 Olga Brani
2072 77186edf Kostas Papadimitriou
The output of all email `*`.txt files will be already customized to contain your
2073 77186edf Kostas Papadimitriou
company and service names but you can further alter their content if you feel it
2074 7d4bc8d8 Olga Brani
best fits your needs.
2075 017b7d20 Olga Brani
2076 0019cd7d Christos Stavrakakis
In order to overwrite one or more email-templates you need to place your
2077 77186edf Kostas Papadimitriou
modified <email-file>.txt files respecting the following structure:
2078 0019cd7d Christos Stavrakakis
2079 77186edf Kostas Papadimitriou
  **/etc/synnefo/templates/**
2080 77186edf Kostas Papadimitriou
      **im/**
2081 017b7d20 Olga Brani
          | activation_email.txt
2082 017b7d20 Olga Brani
          | email.txt
2083 017b7d20 Olga Brani
          | invitation.txt
2084 017b7d20 Olga Brani
          | switch_accounts_email.txt
2085 017b7d20 Olga Brani
          | welcome_email.txt
2086 77186edf Kostas Papadimitriou
          **projects/**
2087 017b7d20 Olga Brani
              | project_approval_notification.txt
2088 0019cd7d Christos Stavrakakis
              | project_denial_notification.txt
2089 017b7d20 Olga Brani
              | project_membership_change_notification.txt
2090 017b7d20 Olga Brani
              | project_membership_enroll_notification.txt
2091 017b7d20 Olga Brani
              | project_membership_leave_request_notification.txt
2092 017b7d20 Olga Brani
              | project_membership_request_notification.txt
2093 017b7d20 Olga Brani
              | project_suspension_notification.txt
2094 017b7d20 Olga Brani
              | project_termination_notification.txt
2095 77186edf Kostas Papadimitriou
      **registration/**
2096 017b7d20 Olga Brani
          | email_change_email.txt
2097 017b7d20 Olga Brani
          | password_email.txt
2098 017b7d20 Olga Brani
2099 017b7d20 Olga Brani
Feel free to omit any of the above files you do not wish to overwrite.
2100 017b7d20 Olga Brani
2101 0019cd7d Christos Stavrakakis
Below is a list of all emails sent by Synnefo to users along with a short
2102 9c2edbf1 Olga Brani
description and a link to their content:
2103 9c2edbf1 Olga Brani
2104 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/email.txt``
2105 08ad5b01 Constantinos Venetsanopoulos
  Base email template. Contains a contact email and a “thank you” message.
2106 08ad5b01 Constantinos Venetsanopoulos
  (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/email.txt>`_)
2107 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/activation_email.txt`` Email sent to
2108 08ad5b01 Constantinos Venetsanopoulos
  user that prompts  him/her to click on a link provided to activate the account.
2109 08ad5b01 Constantinos Venetsanopoulos
  Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/activation_email.txt>`_)
2110 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/invitation.txt`` Email sent to an
2111 08ad5b01 Constantinos Venetsanopoulos
  invited user. He/she has to click on a link provided to activate the account.
2112 08ad5b01 Constantinos Venetsanopoulos
  Extends “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/invitation.txt>`_)
2113 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/switch_accounts_email.txt`` Email
2114 08ad5b01 Constantinos Venetsanopoulos
  sent to user upon his/her request to associate this email address with a
2115 08ad5b01 Constantinos Venetsanopoulos
  shibboleth account. He/she has to click on a link provided to activate the
2116 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2117 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/welcome_email.txt`` Email sent to
2118 08ad5b01 Constantinos Venetsanopoulos
  inform the user that his/ her account has been activated. Extends “email.txt”
2119 08ad5b01 Constantinos Venetsanopoulos
  (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/welcome_email.txt>`_)
2120 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/registration/email_change_email.txt``
2121 08ad5b01 Constantinos Venetsanopoulos
  Email sent to user when he/she has requested new email address assignment. The
2122 08ad5b01 Constantinos Venetsanopoulos
  user has to click on a link provided to validate this action. Extends
2123 08ad5b01 Constantinos Venetsanopoulos
  “email.txt” (`Link <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/registration/email_change_email.txt>`_)
2124 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/registration/password_email.txt`` Email
2125 08ad5b01 Constantinos Venetsanopoulos
  sent for resetting password purpose. The user has to click on a link provided
2126 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2127 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_approval_notification.txt``
2128 08ad5b01 Constantinos Venetsanopoulos
  Informs  the project owner that his/her project has been approved. Extends
2129 08ad5b01 Constantinos Venetsanopoulos
  “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>`_)
2130 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_denial_notification.txt``
2131 08ad5b01 Constantinos Venetsanopoulos
  Informs the project owner that his/her  project application has been denied
2132 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2133 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_change_notification.txt``
2134 08ad5b01 Constantinos Venetsanopoulos
  An email is sent to a user containing information about his project membership
2135 08ad5b01 Constantinos Venetsanopoulos
  (whether he has been accepted, rejected or removed). Extends “email.txt” (`Link
2136 08ad5b01 Constantinos Venetsanopoulos
  <https://code.grnet.gr/projects/synnefo/repository/revisions/master/changes/snf-astakos-app/astakos/im/templates/im/projects/project_membership_change_notification.txt>`_)
2137 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_enroll_notification.txt``
2138 08ad5b01 Constantinos Venetsanopoulos
  Informs a user that he/she  has been enrolled to a project. Extends
2139 08ad5b01 Constantinos Venetsanopoulos
  “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>`_)
2140 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_leave_request_notification.txt``
2141 08ad5b01 Constantinos Venetsanopoulos
  An email is sent to the project owner to make him aware of a  user having
2142 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2143 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_membership_request_notification.txt``
2144 08ad5b01 Constantinos Venetsanopoulos
  An email is sent to the project owner to make him/her aware of a user having
2145 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2146 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_suspension_notification.txt``
2147 08ad5b01 Constantinos Venetsanopoulos
  An email is sent to the project owner to make him/her aware of his/her project
2148 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2149 08ad5b01 Constantinos Venetsanopoulos
* ``snf-astakos-app/astakos/im/templates/im/projects/project_termination_notification.txt``
2150 08ad5b01 Constantinos Venetsanopoulos
  An email is sent to the project owner to make him/her aware of his/her project
2151 08ad5b01 Constantinos Venetsanopoulos
  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>`_)
2152 9c2edbf1 Olga Brani
2153 9c2edbf1 Olga Brani
.. warning:: Django templates language:
2154 9c2edbf1 Olga Brani
2155 0019cd7d Christos Stavrakakis
  If you choose to  overwrite these email templates, be mindful of the necessary
2156 0019cd7d Christos Stavrakakis
  information contained in django template variables that must not be omitted,
2157 0019cd7d Christos Stavrakakis
  such as the activation link for activating one’s account and many more.
2158 263cb456 Olga Brani
  These variables are contained into {{}} inside the templates.
2159 9c2edbf1 Olga Brani
2160 7d4bc8d8 Olga Brani
**Astakos landing page**
2161 7d4bc8d8 Olga Brani
2162 7d4bc8d8 Olga Brani
Astakos generates sensible default values used to display component-
2163 7d4bc8d8 Olga Brani
specific details in several places across views (dashboard, cloudbar
2164 7d4bc8d8 Olga Brani
etc.). One of these places is Astakos landing page where Synnefo components are
2165 7d4bc8d8 Olga Brani
featured.
2166 7d4bc8d8 Olga Brani
2167 7d4bc8d8 Olga Brani
In case those values doesn't seem to suit your deployment, Astakos allows
2168 7d4bc8d8 Olga Brani
you to override any of them using ``ASTAKOS_COMPONENTS_META`` setting
2169 7d4bc8d8 Olga Brani
in your ``/etc/synnefo/20-snf-astakos-app-settings.conf`` configuration file.
2170 7d4bc8d8 Olga Brani
2171 7d4bc8d8 Olga Brani
So, for example if you want to add your own image for Astakos service and in the
2172 7d4bc8d8 Olga Brani
same time hide Cyclades service from Astakos landing page you can
2173 7d4bc8d8 Olga Brani
add the following line to your configuration file:
2174 7d4bc8d8 Olga Brani
2175 7d4bc8d8 Olga Brani
.. code-block:: python
2176 7d4bc8d8 Olga Brani
2177 7d4bc8d8 Olga Brani
  ASTAKOS_COMPONENTS_META = {
2178 7d4bc8d8 Olga Brani
    'astakos': {
2179 7d4bc8d8 Olga Brani
      'dashboard': {
2180 7d4bc8d8 Olga Brani
        'icon': '<path-to-your-icon>'
2181 7d4bc8d8 Olga Brani
      }
2182 7d4bc8d8 Olga Brani
    },
2183 7d4bc8d8 Olga Brani
    'cyclades': {
2184 7d4bc8d8 Olga Brani
      'dashboard': {
2185 7d4bc8d8 Olga Brani
        'show': False
2186 7d4bc8d8 Olga Brani
      }
2187 7d4bc8d8 Olga Brani
    }
2188 7d4bc8d8 Olga Brani
  }
2189 7d4bc8d8 Olga Brani
2190 7d4bc8d8 Olga Brani
A complete list of available keys is shown below:
2191 7d4bc8d8 Olga Brani
2192 7d4bc8d8 Olga Brani
.. code-block:: python
2193 7d4bc8d8 Olga Brani
2194 7d4bc8d8 Olga Brani
  '<component-name>' = {
2195 7d4bc8d8 Olga Brani
    'order': 1,
2196 7d4bc8d8 Olga Brani
    'dashboard': {
2197 7d4bc8d8 Olga Brani
      'order': 1,
2198 7d4bc8d8 Olga Brani
      'show': True,
2199 7d4bc8d8 Olga Brani
      'description': '<component-description>',
2200 7d4bc8d8 Olga Brani
      'icon': '<component-icon-path>',
2201 7d4bc8d8 Olga Brani
    },
2202 7d4bc8d8 Olga Brani
    'cloudbar': {
2203 7d4bc8d8 Olga Brani
      'show': True
2204 7d4bc8d8 Olga Brani
    }
2205 7d4bc8d8 Olga Brani
  }
2206 7d4bc8d8 Olga Brani
2207 7d4bc8d8 Olga Brani
2208 7d4bc8d8 Olga Brani
**403, 404 and 500 pages**
2209 7d4bc8d8 Olga Brani
2210 7d4bc8d8 Olga Brani
Feel free to add your own 403 (HTTP Forbidden), 404 (Page not found) and
2211 7d4bc8d8 Olga Brani
500 (server error) pages.
2212 7d4bc8d8 Olga Brani
To override the default Synnefo error views, you must write and include any of
2213 7d4bc8d8 Olga Brani
the files 403.html, 404.html and 500.html in your
2214 7d4bc8d8 Olga Brani
**/etc/synnefo/templates/** directory.
2215 7d4bc8d8 Olga Brani
2216 7d4bc8d8 Olga Brani
Their content is up to you, but you may use as guides the default error pages
2217 7d4bc8d8 Olga Brani
found in:
2218 7d4bc8d8 Olga Brani
2219 7d4bc8d8 Olga Brani
  **/synnefo/snf-webproject/synnefo/webproject/templates/**
2220 7d4bc8d8 Olga Brani
    | 403.html
2221 7d4bc8d8 Olga Brani
    | 404.html
2222 7d4bc8d8 Olga Brani
    | 500.html
2223 7d4bc8d8 Olga Brani
2224 7d4bc8d8 Olga Brani
2225 9c2edbf1 Olga Brani
2226 9b659162 Christos Stavrakakis
.. RabbitMQ
2227 a1c707c9 Constantinos Venetsanopoulos
2228 9b659162 Christos Stavrakakis
RabbitMQ Broker
2229 9b659162 Christos Stavrakakis
---------------
2230 9b659162 Christos Stavrakakis
2231 9b659162 Christos Stavrakakis
Queue nodes run the RabbitMQ sofware, which provides AMQP functionality. To
2232 9b659162 Christos Stavrakakis
guarantee high-availability, more than one Queue nodes should be deployed, each
2233 9b659162 Christos Stavrakakis
of them belonging to the same `RabbitMQ cluster
2234 a1c707c9 Constantinos Venetsanopoulos
<http://www.rabbitmq.com/clustering.html>`_. Synnefo uses the RabbitMQ
2235 a1c707c9 Constantinos Venetsanopoulos
active/active `High Available Queues <http://www.rabbitmq.com/ha.html>`_ which
2236 a1c707c9 Constantinos Venetsanopoulos
are mirrored between two nodes within a RabbitMQ cluster.
2237 a1c707c9 Constantinos Venetsanopoulos
2238 a1c707c9 Constantinos Venetsanopoulos
The RabbitMQ nodes that form the cluster, are declared to Synnefo through the
2239 a1c707c9 Constantinos Venetsanopoulos
`AMQP_HOSTS` setting. Each time a Synnefo component needs to connect to
2240 a1c707c9 Constantinos Venetsanopoulos
RabbitMQ, one of these nodes is chosen in a random way. The client that Synnefo
2241 a1c707c9 Constantinos Venetsanopoulos
uses to connect to RabbitMQ, handles connection failures transparently and
2242 a1c707c9 Constantinos Venetsanopoulos
tries to reconnect to a different node. As long as one of these nodes are up
2243 a1c707c9 Constantinos Venetsanopoulos
and running, functionality of Synnefo should not be downgraded by the RabbitMQ
2244 a1c707c9 Constantinos Venetsanopoulos
node failures.
2245 9b659162 Christos Stavrakakis
2246 9b659162 Christos Stavrakakis
All the queues that are being used are declared as durable, meaning that
2247 a1c707c9 Constantinos Venetsanopoulos
messages are persistently stored to RabbitMQ, until they get successfully
2248 a1c707c9 Constantinos Venetsanopoulos
processed by a client.
2249 9b659162 Christos Stavrakakis
2250 9b659162 Christos Stavrakakis
Currently, RabbitMQ is used by the following components:
2251 9b659162 Christos Stavrakakis
2252 5135245b Christos Stavrakakis
* `snf-ganeti-eventd` and `snf-progress-monitor`:
2253 9b659162 Christos Stavrakakis
  These components send messages concerning the status and progress of
2254 9b659162 Christos Stavrakakis
  jobs in the Ganeti backend.
2255 a1c707c9 Constantinos Venetsanopoulos
* `snf-dispatcher`: This daemon, consumes the messages that are sent from
2256 a1c707c9 Constantinos Venetsanopoulos
  the above components, and updates the Cyclades DB accordingly.
2257 9b659162 Christos Stavrakakis
2258 e4404297 Christos Stavrakakis
2259 9b659162 Christos Stavrakakis
Installation
2260 301294a9 Constantinos Venetsanopoulos
~~~~~~~~~~~~
2261 301294a9 Constantinos Venetsanopoulos
2262 a1c707c9 Constantinos Venetsanopoulos
Please check the RabbitMQ documentation which covers extensively the
2263 a1c707c9 Constantinos Venetsanopoulos
`installation of RabbitMQ server <http://www.rabbitmq.com/download.html>`_ and
2264 a1c707c9 Constantinos Venetsanopoulos
the setup of a `RabbitMQ cluster <http://www.rabbitmq.com/clustering.html>`_.
2265 a1c707c9 Constantinos Venetsanopoulos
Also, check out the `web management plugin
2266 a1c707c9 Constantinos Venetsanopoulos
<http://www.rabbitmq.com/management.html>`_ that can be useful for managing and
2267 a1c707c9 Constantinos Venetsanopoulos
monitoring RabbitMQ.
2268 9b659162 Christos Stavrakakis
2269 9b659162 Christos Stavrakakis
For a basic installation of RabbitMQ on two nodes (node1 and node2) you can do
2270 a1c707c9 Constantinos Venetsanopoulos
the following:
2271 9b659162 Christos Stavrakakis
2272 a1c707c9 Constantinos Venetsanopoulos
On both nodes, install rabbitmq-server and create a Synnefo user:
2273 9b659162 Christos Stavrakakis
2274 9b659162 Christos Stavrakakis
.. code-block:: console
2275 9b659162 Christos Stavrakakis
2276 9b659162 Christos Stavrakakis
  $ apt-get install rabbitmq-server
2277 9b659162 Christos Stavrakakis
  $ rabbitmqctl add_user synnefo "example_pass"
2278 9b659162 Christos Stavrakakis
  $ rabbitmqctl set_permissions synnefo  ".*" ".*" ".*"
2279 9b659162 Christos Stavrakakis
2280 a1c707c9 Constantinos Venetsanopoulos
Also guarantee that both nodes share the same cookie, by running:
2281 9b659162 Christos Stavrakakis
2282 9b659162 Christos Stavrakakis
.. code-block:: console
2283 9b659162 Christos Stavrakakis
2284 9b659162 Christos Stavrakakis
  $ scp node1:/var/lib/rabbitmq/.erlang.cookie node2:/var/lib/rabbitmq/.erlang.cookie
2285 9b659162 Christos Stavrakakis
2286 9b659162 Christos Stavrakakis
and restart the nodes:
2287 9b659162 Christos Stavrakakis
2288 9b659162 Christos Stavrakakis
.. code-block:: console
2289 9b659162 Christos Stavrakakis
2290 9b659162 Christos Stavrakakis
  $ /etc/init.d/rabbitmq-server restart
2291 9b659162 Christos Stavrakakis
2292 9b659162 Christos Stavrakakis
2293 9b659162 Christos Stavrakakis
To setup the RabbitMQ cluster run:
2294 9b659162 Christos Stavrakakis
2295 9b659162 Christos Stavrakakis
.. code-block:: console
2296 9b659162 Christos Stavrakakis
2297 9b659162 Christos Stavrakakis
  root@node2: rabbitmqctl stop_app
2298 9b659162 Christos Stavrakakis
  root@node2: rabbitmqctl reset
2299 9b659162 Christos Stavrakakis
  root@node2: rabbitmqctl cluster rabbit@node1 rabbit@node2
2300 9b659162 Christos Stavrakakis
  root@node2: rabbitmqctl start_app
2301 9b659162 Christos Stavrakakis
2302 9b659162 Christos Stavrakakis
You can verify that the cluster is set up correctly by running:
2303 9b659162 Christos Stavrakakis
2304 9b659162 Christos Stavrakakis
.. code-block:: console
2305 9b659162 Christos Stavrakakis
2306 9b659162 Christos Stavrakakis
  root@node2: rabbitmqctl cluster_status
2307 9b659162 Christos Stavrakakis
2308 9b659162 Christos Stavrakakis
2309 bc055d09 Constantinos Venetsanopoulos
Logging
2310 bc055d09 Constantinos Venetsanopoulos
-------
2311 bc055d09 Constantinos Venetsanopoulos
2312 bc055d09 Constantinos Venetsanopoulos
Logging in Synnefo is using Python's logging module. The module is configured
2313 bc055d09 Constantinos Venetsanopoulos
using dictionary configuration, whose format is described here:
2314 bc055d09 Constantinos Venetsanopoulos
2315 bc055d09 Constantinos Venetsanopoulos
http://docs.python.org/release/2.7.1/library/logging.html#logging-config-dictschema
2316 bc055d09 Constantinos Venetsanopoulos
2317 4be65f1f Christos Stavrakakis
The logging configuration dictionary is defined in
2318 a1c707c9 Constantinos Venetsanopoulos
``/etc/synnefo/10-snf-webproject-logging.conf``
2319 bc055d09 Constantinos Venetsanopoulos
2320 6d8a47d0 Christos Stavrakakis
The administrator can have logging control by modifying the ``LOGGING_SETUP``
2321 6d8a47d0 Christos Stavrakakis
dictionary, and defining subloggers with different handlers and log levels.
2322 bc055d09 Constantinos Venetsanopoulos
2323 d189d11c Constantinos Venetsanopoulos
2324 21d3d487 Constantinos Venetsanopoulos
.. _scale-up:
2325 21d3d487 Constantinos Venetsanopoulos
2326 bc055d09 Constantinos Venetsanopoulos
Scaling up to multiple nodes
2327 bc055d09 Constantinos Venetsanopoulos
============================
2328 bc055d09 Constantinos Venetsanopoulos
2329 301294a9 Constantinos Venetsanopoulos
Here we will describe how should a large scale Synnefo deployment look like. Make
2330 301294a9 Constantinos Venetsanopoulos
sure you are familiar with Synnefo and Ganeti before proceeding with this section.
2331 301294a9 Constantinos Venetsanopoulos
This means you should at least have already set up successfully a working Synnefo
2332 ff6ba888 Constantinos Venetsanopoulos
deployment as described in the :ref:`Admin's Installation Guide
2333 301294a9 Constantinos Venetsanopoulos
<quick-install-admin-guide>` and also read the Administrator's Guide until this
2334 301294a9 Constantinos Venetsanopoulos
section.
2335 2f6143c9 Constantinos Venetsanopoulos
2336 301294a9 Constantinos Venetsanopoulos
Graph of a scale-out Synnefo deployment
2337 301294a9 Constantinos Venetsanopoulos
---------------------------------------
2338 2f6143c9 Constantinos Venetsanopoulos
2339 301294a9 Constantinos Venetsanopoulos
Each box in the following graph corresponds to a distinct physical node:
2340 2f6143c9 Constantinos Venetsanopoulos
2341 301294a9 Constantinos Venetsanopoulos
.. image:: images/synnefo-arch2-roles.png
2342 301294a9 Constantinos Venetsanopoulos
   :width: 100%
2343 301294a9 Constantinos Venetsanopoulos
   :target: _images/synnefo-arch2-roles.png
2344 301294a9 Constantinos Venetsanopoulos
2345 301294a9 Constantinos Venetsanopoulos
The above graph is actually the same with the one at the beginning of this
2346 301294a9 Constantinos Venetsanopoulos
:ref:`guide <admin-guide>`, with the only difference that here we show the
2347 301294a9 Constantinos Venetsanopoulos
Synnefo roles of each physical node. These roles are described in the
2348 301294a9 Constantinos Venetsanopoulos
following section.
2349 301294a9 Constantinos Venetsanopoulos
2350 21d3d487 Constantinos Venetsanopoulos
.. _physical-node-roles:
2351 21d3d487 Constantinos Venetsanopoulos
2352 301294a9 Constantinos Venetsanopoulos
Physical Node roles
2353 301294a9 Constantinos Venetsanopoulos
-------------------
2354 301294a9 Constantinos Venetsanopoulos
2355 301294a9 Constantinos Venetsanopoulos
As appears in the previous graph, a scale-out Synnefo deployment consists of
2356 301294a9 Constantinos Venetsanopoulos
multiple physical nodes that have the following roles:
2357 301294a9 Constantinos Venetsanopoulos
2358 301294a9 Constantinos Venetsanopoulos
* **WEBSERVER**: A web server running in front of gunicorn (e.g.: Apache, nginx)
2359 301294a9 Constantinos Venetsanopoulos
* **ASTAKOS**: The Astakos application (gunicorn)
2360 301294a9 Constantinos Venetsanopoulos
* **ASTAKOS_DB**: The Astakos database (postgresql)
2361 301294a9 Constantinos Venetsanopoulos
* **PITHOS**: The Pithos application (gunicorn)
2362 301294a9 Constantinos Venetsanopoulos
* **PITHOS_DB**: The Pithos database (postgresql)
2363 301294a9 Constantinos Venetsanopoulos
* **CYCLADES**: The Cyclades application (gunicorn)
2364 301294a9 Constantinos Venetsanopoulos
* **CYCLADES_DB**: The Cyclades database (postgresql)
2365 301294a9 Constantinos Venetsanopoulos
* **MQ**: The message queue (RabbitMQ)
2366 301294a9 Constantinos Venetsanopoulos
* **GANETI_MASTER**: The Ganeti master of a Ganeti cluster
2367 301294a9 Constantinos Venetsanopoulos
* **GANETI_NODE** : A VM-capable Ganeti node of a Ganeti cluster
2368 2f6143c9 Constantinos Venetsanopoulos
2369 301294a9 Constantinos Venetsanopoulos
You will probably also have:
2370 2f6143c9 Constantinos Venetsanopoulos
2371 301294a9 Constantinos Venetsanopoulos
* **CMS**: The CMS used as a frotend portal for the Synnefo services
2372 21d3d487 Constantinos Venetsanopoulos
* **NS**: A nameserver serving all other Synnefo nodes and resolving Synnefo FQDNs
2373 301294a9 Constantinos Venetsanopoulos
* **CLIENT**: A machine that runs the Synnefo clients (e.g.: kamaki, Web UI),
2374 301294a9 Constantinos Venetsanopoulos
              most of the times, the end user's local machine
2375 301294a9 Constantinos Venetsanopoulos
2376 301294a9 Constantinos Venetsanopoulos
From this point we will also refer to the following groups of roles:
2377 301294a9 Constantinos Venetsanopoulos
2378 301294a9 Constantinos Venetsanopoulos
* **SYNNEFO**: [ **ASTAKOS**, **ASTAKOS_DB**, **PITHOS**, **PITHOS_DB**, **CYCLADES**, **CYCLADES_DB**, **MQ**, **CMS**]
2379 301294a9 Constantinos Venetsanopoulos
* **G_BACKEND**: [**GANETI_MASTER**, **GANETI_NODE**]
2380 301294a9 Constantinos Venetsanopoulos
2381 301294a9 Constantinos Venetsanopoulos
Of course, when deploying Synnefo you can combine multiple of the above roles on a
2382 301294a9 Constantinos Venetsanopoulos
single physical node, but if you are trying to scale out, the above separation
2383 301294a9 Constantinos Venetsanopoulos
gives you significant advantages.
2384 301294a9 Constantinos Venetsanopoulos
2385 301294a9 Constantinos Venetsanopoulos
So, in the next section we will take a look on what components you will have to
2386 301294a9 Constantinos Venetsanopoulos
install on each physical node depending on its Synnefo role. We assume the graph's
2387 301294a9 Constantinos Venetsanopoulos
architecture.
2388 301294a9 Constantinos Venetsanopoulos
2389 301294a9 Constantinos Venetsanopoulos
Components for each role
2390 301294a9 Constantinos Venetsanopoulos
------------------------
2391 2f6143c9 Constantinos Venetsanopoulos
2392 301294a9 Constantinos Venetsanopoulos
When deploying Synnefo in large scale, you need to install different Synnefo
2393 301294a9 Constantinos Venetsanopoulos
or/and third party components on different physical nodes according to their
2394 301294a9 Constantinos Venetsanopoulos
Synnefo role, as stated in the previous section.
2395 301294a9 Constantinos Venetsanopoulos
2396 301294a9 Constantinos Venetsanopoulos
Specifically:
2397 301294a9 Constantinos Venetsanopoulos
2398 301294a9 Constantinos Venetsanopoulos
Role **WEBSERVER**
2399 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `None`
2400 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Apache
2401 301294a9 Constantinos Venetsanopoulos
Role **ASTAKOS**
2402 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `snf-webproject`, `snf-astakos-app`
2403 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Django, Gunicorn
2404 301294a9 Constantinos Venetsanopoulos
Role **ASTAKOS_DB**
2405 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `None`
2406 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: PostgreSQL
2407 301294a9 Constantinos Venetsanopoulos
Role **PITHOS**
2408 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `snf-webproject`, `snf-pithos-app`, `snf-pithos-webclient`
2409 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Django, Gunicorn
2410 301294a9 Constantinos Venetsanopoulos
Role **PITHOS_DB**
2411 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `None`
2412 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: PostgreSQL
2413 301294a9 Constantinos Venetsanopoulos
Role **CYCLADES**
2414 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `snf-webproject`, `snf-cyclades-app`, `snf-vncauthproxy`
2415 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Django Gunicorn
2416 301294a9 Constantinos Venetsanopoulos
Role **CYCLADES_DB**
2417 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `None`
2418 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: PostgreSQL
2419 301294a9 Constantinos Venetsanopoulos
Role **MQ**
2420 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `None`
2421 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: RabbitMQ
2422 301294a9 Constantinos Venetsanopoulos
Role **GANETI_MASTER**
2423 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `snf-cyclades-gtools`
2424 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Ganeti
2425 301294a9 Constantinos Venetsanopoulos
Role **GANETI_NODE**
2426 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `snf-cyclades-gtools`, `snf-network`, `snf-image`, `nfdhcpd`
2427 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Ganeti
2428 301294a9 Constantinos Venetsanopoulos
Role **CMS**
2429 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `snf-webproject`, `snf-cloudcms`
2430 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: Django, Gunicorn
2431 301294a9 Constantinos Venetsanopoulos
Role **NS**
2432 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `None`
2433 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: BIND
2434 301294a9 Constantinos Venetsanopoulos
Role **CLIENT**
2435 301294a9 Constantinos Venetsanopoulos
    * Synnefo components: `kamaki`, `snf-image-creator`
2436 301294a9 Constantinos Venetsanopoulos
    * 3rd party components: `None`
2437 301294a9 Constantinos Venetsanopoulos
2438 301294a9 Constantinos Venetsanopoulos
Example scale out installation
2439 301294a9 Constantinos Venetsanopoulos
------------------------------
2440 301294a9 Constantinos Venetsanopoulos
2441 301294a9 Constantinos Venetsanopoulos
In this section we describe an example of a medium scale installation which
2442 301294a9 Constantinos Venetsanopoulos
combines multiple roles on 10 different physical nodes. We also provide a
2443 301294a9 Constantinos Venetsanopoulos
:ref:`guide <i-synnefo>` to help with such an install.
2444 301294a9 Constantinos Venetsanopoulos
2445 301294a9 Constantinos Venetsanopoulos
We assume that we have the following 10 physical nodes with the corresponding
2446 301294a9 Constantinos Venetsanopoulos
roles:
2447 301294a9 Constantinos Venetsanopoulos
2448 301294a9 Constantinos Venetsanopoulos
Node1:
2449 301294a9 Constantinos Venetsanopoulos
    **WEBSERVER**, **ASTAKOS**
2450 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2451 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2452 301294a9 Constantinos Venetsanopoulos
        * :ref:`gunicorn <i-gunicorn>`
2453 301294a9 Constantinos Venetsanopoulos
        * :ref:`apache <i-apache>`
2454 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-webproject <i-webproject>`
2455 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-astakos-app <i-astakos>`
2456 301294a9 Constantinos Venetsanopoulos
Node2:
2457 301294a9 Constantinos Venetsanopoulos
    **WEBSERVER**, **PITHOS**
2458 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2459 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2460 301294a9 Constantinos Venetsanopoulos
        * :ref:`gunicorn <i-gunicorn>`
2461 301294a9 Constantinos Venetsanopoulos
        * :ref:`apache <i-apache>`
2462 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-webproject <i-webproject>`
2463 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-pithos-app <i-pithos>`
2464 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-pithos-webclient <i-pithos>`
2465 301294a9 Constantinos Venetsanopoulos
Node3:
2466 301294a9 Constantinos Venetsanopoulos
    **WEBSERVER**, **CYCLADES**
2467 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2468 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2469 301294a9 Constantinos Venetsanopoulos
        * :ref:`gunicorn <i-gunicorn>`
2470 301294a9 Constantinos Venetsanopoulos
        * :ref:`apache <i-apache>`
2471 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-webproject <i-webproject>`
2472 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-cyclades-app <i-cyclades>`
2473 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-vncauthproxy <i-cyclades>`
2474 301294a9 Constantinos Venetsanopoulos
Node4:
2475 301294a9 Constantinos Venetsanopoulos
    **WEBSERVER**, **CMS**
2476 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2477 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2478 301294a9 Constantinos Venetsanopoulos
        * :ref:`gunicorn <i-gunicorn>`
2479 301294a9 Constantinos Venetsanopoulos
        * :ref:`apache <i-apache>`
2480 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-webproject <i-webproject>`
2481 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-cloudcms <i-cms>`
2482 301294a9 Constantinos Venetsanopoulos
Node5:
2483 301294a9 Constantinos Venetsanopoulos
    **ASTAKOS_DB**, **PITHOS_DB**, **CYCLADES_DB**
2484 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2485 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2486 301294a9 Constantinos Venetsanopoulos
        * :ref:`postgresql <i-db>`
2487 301294a9 Constantinos Venetsanopoulos
Node6:
2488 301294a9 Constantinos Venetsanopoulos
    **MQ**
2489 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2490 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2491 301294a9 Constantinos Venetsanopoulos
        * :ref:`rabbitmq <i-mq>`
2492 301294a9 Constantinos Venetsanopoulos
Node7:
2493 301294a9 Constantinos Venetsanopoulos
    **GANETI_MASTER**, **GANETI_NODE**
2494 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2495 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2496 301294a9 Constantinos Venetsanopoulos
        * :ref:`general <i-backends>`
2497 301294a9 Constantinos Venetsanopoulos
        * :ref:`ganeti <i-ganeti>`
2498 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-cyclades-gtools <i-gtools>`
2499 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-network <i-network>`
2500 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-image <i-image>`
2501 301294a9 Constantinos Venetsanopoulos
        * :ref:`nfdhcpd <i-network>`
2502 301294a9 Constantinos Venetsanopoulos
Node8:
2503 301294a9 Constantinos Venetsanopoulos
    **GANETI_NODE**
2504 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2505 301294a9 Constantinos Venetsanopoulos
        * :ref:`apt <i-apt>`
2506 301294a9 Constantinos Venetsanopoulos
        * :ref:`general <i-backends>`
2507 301294a9 Constantinos Venetsanopoulos
        * :ref:`ganeti <i-ganeti>`
2508 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-cyclades-gtools <i-gtools>`
2509 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-network <i-network>`
2510 301294a9 Constantinos Venetsanopoulos
        * :ref:`snf-image <i-image>`
2511 301294a9 Constantinos Venetsanopoulos
        * :ref:`nfdhcpd <i-network>`
2512 301294a9 Constantinos Venetsanopoulos
Node9:
2513 301294a9 Constantinos Venetsanopoulos
    **GANETI_NODE**
2514 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2515 301294a9 Constantinos Venetsanopoulos
        `Same as Node8`
2516 301294a9 Constantinos Venetsanopoulos
Node10:
2517 301294a9 Constantinos Venetsanopoulos
    **GANETI_NODE**
2518 301294a9 Constantinos Venetsanopoulos
      Guide sections:
2519 301294a9 Constantinos Venetsanopoulos
        `Same as Node8`
2520 301294a9 Constantinos Venetsanopoulos
2521 301294a9 Constantinos Venetsanopoulos
All sections: :ref:`Scale out Guide <i-synnefo>`
2522 547c78f6 Constantinos Venetsanopoulos
2523 bc055d09 Constantinos Venetsanopoulos
2524 bbcd3dd1 Constantinos Venetsanopoulos
Upgrade Notes
2525 bbcd3dd1 Constantinos Venetsanopoulos
=============
2526 bc055d09 Constantinos Venetsanopoulos
2527 457fe4fc Georgios D. Tsoukalas
.. toctree::
2528 457fe4fc Georgios D. Tsoukalas
   :maxdepth: 1
2529 457fe4fc Georgios D. Tsoukalas
2530 1cd3daa1 Constantinos Venetsanopoulos
   v0.12 -> v0.13 <upgrade/upgrade-0.13>
2531 09974606 Georgios D. Tsoukalas
   v0.13 -> v0.14 <upgrade/upgrade-0.14>
2532 15151f83 Christos Stavrakakis
   v0.14 -> v0.14.2 <upgrade/upgrade-0.14.2>
2533 0d14df99 Christos Stavrakakis
   v0.14.5 -> v0.14.6 <upgrade/upgrade-0.14.6>
2534 d3840a05 Constantinos Venetsanopoulos
   v0.14.7 -> v0.14.8 <upgrade/upgrade-0.14.8>
2535 0ab857d0 Constantinos Venetsanopoulos
   v0.14.9 -> v0.14.10 <upgrade/upgrade-0.14.10>
2536 774f683b Giorgos Korfiatis
   v0.14 -> v0.15 <upgrade/upgrade-0.15>
2537 457fe4fc Georgios D. Tsoukalas
2538 bbcd3dd1 Constantinos Venetsanopoulos
2539 3045e739 Constantinos Venetsanopoulos
Changelog, NEWS
2540 bbcd3dd1 Constantinos Venetsanopoulos
===============
2541 bbcd3dd1 Constantinos Venetsanopoulos
2542 15151f83 Christos Stavrakakis
2543 a1d0bacb Christos Stavrakakis
* v0.15rc6 :ref:`Changelog <Changelog-0.15rc6>`
2544 408cd6a5 Christos Stavrakakis
* v0.15rc5 :ref:`Changelog <Changelog-0.15rc5>`
2545 408cd6a5 Christos Stavrakakis
* v0.15rc4 :ref:`Changelog <Changelog-0.15rc4>`
2546 9a80de55 Christos Stavrakakis
* v0.14.10 :ref:`Changelog <Changelog-0.14.10>`, :ref:`NEWS <NEWS-0.14.10>`
2547 033321fb Christos Stavrakakis
* v0.14.9 :ref:`Changelog <Changelog-0.14.9>`, :ref:`NEWS <NEWS-0.14.9>`
2548 833880fd Christos Stavrakakis
* v0.14.8 :ref:`Changelog <Changelog-0.14.8>`, :ref:`NEWS <NEWS-0.14.8>`
2549 833880fd Christos Stavrakakis
* v0.14.7 :ref:`Changelog <Changelog-0.14.7>`, :ref:`NEWS <NEWS-0.14.7>`
2550 7a59cb8f Christos Stavrakakis
* v0.14.6 :ref:`Changelog <Changelog-0.14.6>`, :ref:`NEWS <NEWS-0.14.6>`
2551 d6a19bac Christos Stavrakakis
* v0.14.5 :ref:`Changelog <Changelog-0.14.5>`, :ref:`NEWS <NEWS-0.14.5>`
2552 38be3b6e Christos Stavrakakis
* v0.14.4 :ref:`Changelog <Changelog-0.14.4>`, :ref:`NEWS <NEWS-0.14.4>`
2553 cda13b21 Christos Stavrakakis
* v0.14.3 :ref:`Changelog <Changelog-0.14.3>`, :ref:`NEWS <NEWS-0.14.3>`
2554 15151f83 Christos Stavrakakis
* v0.14.2 :ref:`Changelog <Changelog-0.14.2>`, :ref:`NEWS <NEWS-0.14.2>`
2555 a0f672f1 Stratos Psomadakis
* v0.14 :ref:`Changelog <Changelog-0.14>`, :ref:`NEWS <NEWS-0.14>`
2556 bbcd3dd1 Constantinos Venetsanopoulos
* v0.13 :ref:`Changelog <Changelog-0.13>`, :ref:`NEWS <NEWS-0.13>`