Revision c3945370

b/snf-app/docs/index.rst
11 11

  
12 12
synnefo comprises the following major components:
13 13

  
14
.. todo:: turn all of the following to links to the documentation
14
.. todo:: turn all of the following to links to the documentation, with
15
   with intersphinx links.
15 16

  
16 17
.. toctree::
17 18
   :maxdepth: 1
18 19

  
19
   compute (name TBD): Compute Service <src/snf-compute.rst>
20
   compute (name TBD): Compute Service <src/compute.rst>
20 21
   pithos+: File storage service <http://docs.dev.grnet.gr/pithos>
21 22
   plankton: Image registry <src/snf-plankton.rst>
22 23
   archipelagos: Volume storage service <http://docs.dev.grnet.gr/archipelagos>
b/snf-app/docs/src/admin-guide.rst
1
.. _deployment:
1
.. _snf-compute-admin-guide:
2 2

  
3 3
Administrator Guide
4 4
===================
5 5

  
6
This is the snf-compute administrator's guide.
6
This is the snf-compute administrator guide.
7 7

  
8 8
It contains instructions on how to download, install and configure
9
synnefo components. It also covers maintenance issues, e.g.,
10
upgrades of existing synnefo deployments.
9
the synnefo components necessary to deploy the Compute Service. It also covers
10
maintenance issues, e.g., upgrades of existing deployments.
11 11

  
12 12
The guide assumes you are familiar with all aspects of downloading, installing
13 13
and configuring packages for the Linux distribution of your choice.
......
16 16
--------
17 17

  
18 18
This guide covers the following:
19
synnefo architecture
20
    The node types needed for a complete synnefo deployment, and their roles.
21
    Throughout this guide, `node` refers to a physical machine in the
19
Compute architecture
20
    Node types needed for a complete deployment of snf-compute,
21
    and their roles. Throughout this guide, `node` refers to a physical machine
22
    in the deployment.
23
Installation
24
    The installation of services and synnefo software components for a working
25
    deployment of snf-compute, either from source packages or the provided
26
    packages for Debian Squeeze.
27
Configuration
28
    Configuration of the various software components comprising an snf-compute
22 29
    deployment.
23
synnefo packages
24
installation
25
configuration
26
upgrades
27
changelogs
30
Upgrades
31
Changelogs
28 32

  
29 33
.. todo:: describe prerequisites -- e.g., Debian
30 34
.. todo:: describe setup of nginx, flup, synnefo packages, etc.
31 35

  
32
synnefo architecture
33
--------------------
36
Architecture
37
------------
34 38

  
35 39
Nodes in a synnefo deployment belong in one of the following types.
36 40
For every type, we list the services that execute on corresponding nodes.
......
39 43

  
40 44
DB
41 45
**
46

  
42 47
A node [or more than one nodes, if using an HA configuration], running a DB
43 48
engine supported by the Django ORM layer. The DB is the single source of
44
truth for the servicing of API requests by synnefo.
49
truth for the servicing of API requests by snf-compute.
45 50

  
46 51
_Services:_ PostgreSQL / MySQL
47 52

  
......
102 107

  
103 108
WEBAPP
104 109
******
105
A WEBAPP node runs the :ref:`snf-app <snf-app>` web application bundled within
106
the synnefo package.
107

  
110
A WEBAPP node runs the web application provided by the synnefo component
111
:ref:`snf-app <snf-app>`.
108 112

  
109 113
Installation
110 114
------------
b/snf-app/docs/src/api.rst
1
OpenStack API Implementation
2
****************************
1
API Guide
2
*********
3

  
4
.. todo:: Document the relation of the API to the OpenStack API v1.1.
5

  
6
This is the guide to the REST API of the synnefo Compute Service.
7
It is meant for users wishing to make calls to the REST API directly.
8

  
9
The :ref:`kamaki <http://docs.dev.grnet.gr/kamaki>` command-line client
10
and associated python library can be used instead of making direct calls to
11
:ref:`snf-compute <snf-compute>`.
3 12

  
4 13
Overview
5 14
========
6 15

  
7
* It is not defined if requests for invalid URLs should return 404 or a Fault. We return a BadRequest Fault.
8
* It is not defined if requests with a wrong HTTP method should return 405 or a Fault. We return a BadRequest Fault.
16
* It is not defined if requests for invalid URLs should return 404 or a Fault.
17
  We return a BadRequest Fault.
18
* It is not defined if requests with a wrong HTTP method should return 405 or a
19
  Fault. We return a BadRequest Fault.
9 20

  
10 21

  
11 22
General API Information
......
20 31
Request/Response Types
21 32
----------------------
22 33

  
23
* We only support JSON Requests and JSON/XML Responses. XML Requests are not supported for now.
34
* We only support JSON Requests and JSON/XML Responses. XML Requests are not
35
  supported for now.
24 36

  
25 37

  
26 38
Content Compression
......
32 44
Persistent Connections
33 45
----------------------
34 46

  
35
* Deployment note: "To prevent abuse, HTTP sessions have a timeout of 20 seconds before being closed."
47
* Deployment note: "To prevent abuse, HTTP sessions have a timeout of 20
48
  seconds before being closed."
36 49

  
37 50

  
38 51
Links and References
......
63 76
Efficient Polling with the Changes-Since Parameter
64 77
--------------------------------------------------
65 78

  
66
* We only support the changes-since parameter in **List Servers** and **List Images**.
67
* We assume that garbage collection of deleted servers will only affect servers deleted **POLL_TIME** seconds in the past or earlier. Else we lose the information of a server getting deleted.
79
* We only support the changes-since parameter in **List Servers** and **List
80
  Images**.
81
* We assume that garbage collection of deleted servers will only affect servers
82
  deleted ``POLL_TIME`` seconds in the past or earlier. Else we lose the
83
  information of a server getting deleted.
68 84
* Images do not support a deleted state, so we can not track deletions.
69 85

  
70 86

  
......
73 89

  
74 90
* Version MIME type support is missing.
75 91
* Versionless requests are not supported.
76
* We hardcode the *updated* field in versions list
92
* We hardcode the ``updated`` field in versions list
77 93
* Deployment note: The Atom metadata need to be fixed
78 94

  
79 95

  
......
93 109
Servers
94 110
-------
95 111

  
96
* *hostId* is always empty.
97
* *affinityId* is not returned.
98
* *progress* is always returned.
99
* *self* and *bookmark* atom links are not returned.
112
* ``hostId`` is always empty.
113
* ``affinityId`` is not returned.
114
* ``progress`` is always returned.
115
* ``self`` and ``bookmark`` atom links are not returned.
100 116
* **Get Server Details** will also return servers with a DELETED state.
101
* **Create Server** ignores *personality* of requests.
117
* **Create Server** ignores ``personality`` of requests.
102 118
* **Create Server** ignores the disk size of the flavor.
103 119
* **Create Server** hardcodes the OS.
104 120
* **Create Server** does not support setting the password in the request.
......
106 122
List Servers
107 123
............
108 124

  
109
* **List Servers** returns just *id* and *name* if details is not requested.
110
* **List Servers** can return 304 (even though not explicitly stated) when *changes-since* is given.
125
* **List Servers** returns just ``id`` and ``name`` if details are not
126
  requested.
127
* **List Servers** can return 304 (even though not explicitly stated) when
128
  ``changes-since`` is given.
111 129

  
112
**Example List Servers: JSON**::
130
**Example List Servers: JSON**
131

  
132
.. code-block:: javascript
113 133

  
114 134
  {
115 135
      'servers':
......
169 189

  
170 190
**Normal Response Code**: 200
171 191

  
172
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)
192
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
193
unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)
173 194

  
174
This operation returns URLs to graphs showing CPU and Network statistics. A *refresh* attribute is returned as well that is the recommended refresh rate of the stats for the clients.
195
This operation returns URLs to graphs showing CPU and Network statistics. A
196
``refresh`` attribute is returned as well that is the recommended refresh rate
197
of the stats for the clients.
175 198

  
176 199
This operation does not require a request body.
177 200

  
178
**Example Get Server Stats Response: JSON**::
201
**Example Get Server Stats Response: JSON**:
202

  
203
.. code-block:: javascript
179 204

  
180 205
  {
181 206
      "stats": {
......
188 213
      }
189 214
  }
190 215

  
191
**Example Get Network Details Response: XML**::
216
**Example Get Network Details Response: XML**:
217

  
218
.. code-block:: xml
192 219

  
193 220
  <?xml version="1.0" encoding="UTF-8"?>
194 221
  <stats xmlns="http://docs.openstack.org/compute/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom"
......
225 252

  
226 253
The start function transitions a server from an ACTIVE to a STOPPED state.
227 254

  
228
**Example Action Start: JSON**::
255
**Example Action Start: JSON**:
256

  
257
.. code-block:: javascript
229 258

  
230 259
  {
231 260
      "start": {}
......
243 272

  
244 273
The start function transitions a server from a STOPPED to an ACTIVE state.
245 274

  
246
**Example Action Shutdown: JSON**::
275
**Example Action Shutdown: JSON**:
276

  
277
.. code-block:: javascript
247 278

  
248 279
  {
249 280
      "shutdown": {}
......
262 293
    
263 294
It uses a running instance of vncauthproxy to setup proper VNC forwarding with a random password, then returns the necessary VNC connection info to the caller.
264 295

  
265
**Example Action Console: JSON**::
296
**Example Action Console: JSON**:
297

  
298
.. code-block:: javascript
266 299

  
267 300
  {
268 301
      "console": {
......
270 303
      }
271 304
  }
272 305

  
273
**Example Action Console Response: JSON**::
306
**Example Action Console Response: JSON**:
307

  
308
.. code-block:: javascript
274 309

  
275 310
  {
276 311
      "console": {
......
281 316
      }
282 317
  }
283 318

  
284
**Example Action Console Response: XML**::
319
**Example Action Console Response: XML**:
320

  
321
.. code-block:: xml
285 322

  
286 323
  <?xml version="1.0" encoding="UTF-8"?>
287 324
  <console xmlns="http://docs.openstack.org/compute/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom"
......
297 334

  
298 335
**Normal Response Code**: 202
299 336

  
300
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404), buildInProgress (409), overLimit (413)
337
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
338
unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404),
339
buildInProgress (409), overLimit (413)
301 340

  
302
The firewallProfile function sets a firewall profile for the public interface of a server.
341
The firewallProfile function sets a firewall profile for the public interface
342
of a server.
303 343

  
304 344
The allowed profiles are: **ENABLED**, **DISABLED** and **PROTECTED**.
305 345

  
306
**Example Action firewallProfile: JSON**::
346
**Example Action firewallProfile: JSON**:
347

  
348
.. code-block:: javascript
307 349

  
308 350
  {
309 351
      "firewallProfile": {
......
317 359
Flavors
318 360
-------
319 361

  
320
* *self* and *bookmark* atom links are not returned.
321
* **List Flavors** returns just *id* and *name* if details is not requested.
362
* ``self`` and ``bookmark`` atom links are not returned.
363
* **List Flavors** returns just ``id`` and ``name`` if details is not requested.
322 364

  
323 365

  
324 366
Images
325 367
------
326 368

  
327
* *progress* is always returned.
328
* *self* and *bookmark* atom links are not returned.
329
* **List Images** returns just *id* and *name* if details is not requested.
330
* **List Images** can return 304 (even though not explicitly stated) when *changes-since* is given. 
331
* **List Images** does not return deleted images when *changes-since* is given.
369
* ``progress`` is always returned.
370
* ``self`` and ``bookmark`` atom links are not returned.
371
* **List Images** returns just ``id`` and ``name`` if details are not requested.
372
* **List Images** can return 304 (even though not explicitly stated) when
373
  ``changes-since`` is given. 
374
* **List Images** does not return deleted images when ``changes-since`` is given.
332 375

  
333 376

  
334 377
Metadata
335 378
--------
336 379

  
337
* **Update Server Metadata** and **Update Image Metadata** will only return the metadata that were updated (some could have been skipped).
380
* **Update Server Metadata** and **Update Image Metadata** will only return the
381
  metadata that were updated (some could have been skipped).
338 382

  
339 383

  
340 384
Networks
......
342 386

  
343 387
This is an extension to the OpenStack API.
344 388

  
345
A Server can connect to one or more networks identified by a numeric id. Each user has access only to networks created by himself. When a network is deleted, all connections to it are deleted. Likewise, when a server is deleted, all connections of that server are deleted.
389
A Server can connect to one or more networks identified by a numeric id. Each
390
user has access only to networks created by himself. When a network is deleted,
391
all connections to it are deleted. Likewise, when a server is deleted, all
392
connections of that server are deleted.
346 393

  
347
There is a special **public** network with the id *public* that can be accessed at */networks/public*. All servers are connected to **public** by default and this network can not be deleted or modified in any way.
394
There is a special **public** network with the id *public* that can be accessed
395
at */networks/public*. All servers are connected to **public** by default and
396
this network can not be deleted or modified in any way.
348 397

  
349 398

  
350 399
List Networks
......
356 405

  
357 406
**Normal Response Codes**: 200, 203
358 407

  
359
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), overLimit (413)
408
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
409
unauthorized (401), badRequest (400), overLimit (413)
360 410

  
361 411
This operation provides a list of private networks associated with your account.
362 412

  
363 413
This operation does not require a request body.
364 414

  
365
**Example Networks List Response: JSON (detail)**::
415
**Example Networks List Response: JSON (detail)**:
416

  
417
.. code-block:: javascript
366 418

  
367 419
  {
368 420
      "networks": {
......
389 441
      }
390 442
  }
391 443

  
392
**Example Networks List Response: XML (detail)**::
444
**Example Networks List Response: XML (detail)**:
445

  
446
.. code-block:: xml
393 447

  
394 448
  <?xml version="1.0" encoding="UTF-8"?>
395 449
  <networks xmlns="http://docs.openstack.org/compute/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom">
......
415 469

  
416 470
**Normal Response Code**: 202
417 471

  
418
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badMediaType(415), badRequest (400), overLimit (413)
472
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
473
unauthorized (401), badMediaType(415), badRequest (400), overLimit (413)
419 474

  
420 475
This operation asynchronously provisions a new private network.
421 476

  
422
**Example Create Network Request: JSON**::
477
**Example Create Network Request: JSON**:
478

  
479
.. code-block:: javascript
423 480

  
424 481
  {
425 482
      "network": {
......
427 484
      }
428 485
  }
429 486

  
430
**Example Create Network Response: JSON**::
487
**Example Create Network Response: JSON**:
488

  
489
.. code-block:: javascript
431 490

  
432 491
  {
433 492
      "network": {
......
440 499
      }
441 500
  }
442 501

  
443
**Example Create Network Response: XML**::
502
**Example Create Network Response: XML**:
503

  
504
.. code-block:: xml
444 505

  
445 506
  <?xml version="1.0" encoding="UTF-8"?>
446 507
  <network xmlns="http://docs.openstack.org/compute/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom"
......
457 518

  
458 519
**Normal Response Codes**: 200, 203
459 520

  
460
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)
521
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
522
unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)
461 523

  
462 524
This operation returns the details of a specific network by its id.
463 525

  
464 526
This operation does not require a request body.
465 527

  
466
**Example Get Network Details Response: JSON**::
528
**Example Get Network Details Response: JSON**:
529

  
530
.. code-block:: javascript
467 531

  
468 532
  {
469 533
      "network": {
......
494 558

  
495 559
**Normal Response Code**: 204
496 560

  
497
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404), overLimit (413) 
561
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
562
unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404),
563
overLimit (413) 
498 564

  
499 565
This operation changes the name of the network in the Compute system.
500 566

  
501 567
**Example Update Network Name Request: JSON**::
502 568

  
569
.. code-block:: javascript
570

  
503 571
  {
504 572
      "network": {
505 573
          "name": "new_name"
......
516 584

  
517 585
**Normal Response Code**: 204
518 586

  
519
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), itemNotFound (404), unauthorized (401), overLimit (413) 
587
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
588
unauthorized (401), itemNotFound (404), unauthorized (401), overLimit (413) 
520 589

  
521 590
This operation deletes a network from the system.
522 591

  
......
533 602

  
534 603
**Normal Response Code**: 202
535 604

  
536
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404), overLimit (413)
605
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
606
unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404),
607
overLimit (413)
537 608

  
538 609
This operation adds a server to the specified network.
539 610

  
540
**Example Action Add: JSON**::
611
**Example Action Add: JSON**:
612

  
613
.. code-block:: javascript
541 614

  
542 615
  {
543 616
      "add" : {
......
555 628

  
556 629
**Normal Response Code**: 202
557 630

  
558
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404), overLimit (413)
631
**Error Response Codes**: computeFault (400, 500), serviceUnavailable (503),
632
unauthorized (401), badRequest (400), badMediaType(415), itemNotFound (404),
633
overLimit (413)
559 634

  
560 635
This operation removes a server from the specified network.
561 636

  
562
**Example Action Remove: JSON**::
637
**Example Action Remove: JSON**:
638

  
639
.. code-block:: javascript
563 640

  
564 641
  {
565 642
      "remove" : {
b/snf-app/docs/src/compute.rst
1
.. _snf-compute:
2

  
3
Compute Service
4
----------------
5

  
6
The Compute Service implements the OpenStack Compute API v1.1.
7

  
8
.. todo:: document the Compute Service.
9

  
10
.. toctree::
11
   :maxdepth: 2
12

  
13
   admin-guide
14
   api
15
..   src/design
16
..   src/dev
17
..   src/user
18
..   src/api
19

  
20
..   src/install
21
..   src/configuration
22
..   src/deployment
23
..   src/admin
24
..   src/admin_tools
25
..   src/develop
26
..   src/api
27
..   src/plankton
28
..   src/storage
29
..   src/upgrade
30
..   src/changelog
31

  
32
Indices and tables
33
==================
34

  
35

  
36
* :ref:`genindex`
37
* :ref:`modindex`
38
* :ref:`search`
/dev/null
1
.. _snf-compute:
2

  
3
Compute Service
4
----------------
5

  
6
The Compute Service implements the OpenStack Compute API v1.1.
7

  
8
.. todo:: document the Compute Service.
9

  
10
.. toctree::
11
   :maxdepth: 2
12

  
13
   admin-guide
14
..   src/design
15
..   src/dev
16
..   src/user
17
..   src/api
18

  
19
..   src/install
20
..   src/configuration
21
..   src/deployment
22
..   src/admin
23
..   src/admin_tools
24
..   src/develop
25
..   src/api
26
..   src/plankton
27
..   src/storage
28
..   src/upgrade
29
..   src/changelog
30

  
31
Indices and tables
32
==================
33

  
34

  
35
* :ref:`genindex`
36
* :ref:`modindex`
37
* :ref:`search`

Also available in: Unified diff