Statistics
| Branch: | Revision:

root / docs / index.rst @ 1fa7e54b

History | View | Annotate | Download (6 kB)

1
.. snf-occi documentation master file, created by
2
   sphinx-quickstart on Mon Mar 26 13:45:54 2012.
3
   You can adapt this file completely to your liking, but it should at least
4
   contain the root `toctree` directive.
5

    
6
snf-occi's documentation!
7
====================================
8

    
9
**snf-occi** snf-occi implements the OCCI specification on top of synnefo’s API in order to achieve greater interoperability in common tasks referring cyclades management. This module is a translation bridge between OCCI and the Openstack API and is designed to be as independent as possible from the rest IaaS, providing an OCCI compatibility layer to other services using Openstack API. 
10

    
11
**snf-occi** is based in modules provided by kamaki cli-tool when dealing with REST API calls to Openstack.
12

    
13
.. toctree::
14
   :maxdepth: 2
15

    
16
About OCCI
17
----------
18
The current OCCI specification consists of the following three documents:
19

    
20
* `OCCI Core <http://ogf.org/documents/GFD.183.pdf>`_
21
* `OCCI Infrastructure <http://ogf.org/documents/GFD.184.pdf>`_
22
* `OCCI HTTP rendering <http://ogf.org/documents/GFD.185.pdf>`_
23

    
24
The master document for the OCCI specification is at `OCCI Specification <http://occi-wg.org/about/specification/>`_
25

    
26
OCCI and Cyclades
27
-----------------
28
The OCCI implementation in Cyclades is going to be based in the OCCI Infrastructure specification, in which common Cloud IaaS components are described. The correspondence between OCCI and Cyclades is as follows:
29

    
30
+-------------------------+-------------------------+
31
|OCCI                     |Cyclades                 |
32
+=========================+=========================+
33
|Compute                  |Synnefo servers          |
34
+-------------------------+-------------------------+
35
|OS Template              |Synnefo images           |
36
+-------------------------+-------------------------+
37
|Resource Template        |Synnefo flavors          |
38
+-------------------------+-------------------------+
39
|Networking               |NA                       |
40
+-------------------------+-------------------------+
41
|Storage                  |NA                       |
42
+-------------------------+-------------------------+
43

    
44

    
45
 
46
**Note:** Metadata info in synnefo's servers cannot be represented (clearly) using OCCI's components.
47

    
48

    
49
OCCI requirements
50
------------------
51
Due to OCCI's structure there cannot be straightforward mapping to Cyclades/OpenStack API. The missing elements are networking and storage capabilities using current Cyclades API.
52

    
53
OCCI operations
54
****************
55

    
56
Below you can see the required procedures/operations for OCCI compatibility.
57
   
58
* Handling the query interface
59
   * Query interface must be found under path /-/
60
   * Retrieve all registered Kinds, Actions and Mixins
61
   * Add a mixin definition
62
   * Remove a mixin definition
63

    
64
* Operation on paths in the name-space 
65
   * Retrieving the state of the name-space hierarchy
66
   * Retrieving all Resource instances below a path
67
   * Deletion of all Resource instances below a path
68

    
69
* Operations on Mixins and Kinds
70
   * Retrieving all Resource instances belonging to Mixin or Kind
71
   * Triggering actions to all instances of a Mixin or a Kind
72
   * Associate resource instances with a Mixin or a Kind
73
   * Full update of a Mixin collection
74
   * Dissociate resource instances from a Mixin
75

    
76
* Operations on Resource instances
77
   * Creating a resource instance
78
   * Retrieving a resource instance
79
   * Partial update of a resource instance
80
   * Full update of a resource instance
81
   * Delete a resource instance
82
   * Triggering an action on a resource instance
83

    
84
* Handling Link instances
85
   * Inline creation of a Link instance
86
   * Retrieving Resource instances with defined Links
87
   * Creating of Link Resource instance
88

    
89

    
90
OCCI client/server library
91
==========================
92

    
93
pyssf is a collection of OCCI python modules. It aims to provide a high-level interface for the integration of OCCI to other new or existing applications. 
94

    
95
Features:
96
---------
97

    
98
* It includes a REST API service with the OCCI specifications already implemented
99
* It only requires a custom backend and registry to interact with Cyclades
100

    
101
Current progress
102
=================
103
By now we have considered implementing only the **Compute** backend of the OCCI to Cyclades/Openstack API bridge and we are planning to extend it for **networking** and **storage** capabilities.
104

    
105
Installation
106
-------------
107

    
108
First, you need to install the required dependencies which can be found here:
109

    
110
* `pyssf <https://code.grnet.gr/attachments/download/1182/pyssf-0.4.5.tar>`_
111
* `kamaki <https://code.grnet.gr/projects/kamaki>`_  
112

    
113
Then you can install **snf-occi** API translation server by cloning our latest source code:
114

    
115
* `snf-occi <https://code.grnet.gr/projects/snf-occi>`_ 
116

    
117
**NOTE**: Before running setup.py you have to edit the **config.py** setting up:
118

    
119
* API Server port
120
* VM hostname naming pattern (FQDN providing the id of each compute resource)
121
* VM core architecture
122

    
123
Finally you can start the API translation server by running **snf-occi**
124

    
125
Examples:
126
---------
127
For the examples below we assume server is running on localhost (port 8888) and authentication token is $AUTH. For the HTTP requests we are using **curl**.
128

    
129
* Retrieve all registered Kinds, Actions and Mixins:
130

    
131
  ::
132

    
133
    curl -v -X GET localhost:8888/-/ -H 'Auth-Token: $AUTH'
134

    
135
* Create a new VM described by the flavor 'C2R2048D20' and using the image 'Debian'
136

    
137
  ::
138
 
139
    curl -v -X POST localhost:8888/compute/ 
140
    -H 'Category: compute; scheme=http://schemas.ogf.org/occi/infrastructure#;  class="kind";' 
141
    -H 'X-OCCI-Attribute: occi.core.title = newVM' -H 'Category: C2R2048D20; scheme=http://schemas.ogf.org/occi/infrastructure#; ' 
142
    -H 'Category: Debian; scheme=http://schemas.ogf.org/occi/infrastructure#;' -H 'Auth-Token: $AUTH' 
143
    -H 'Content-type: text/occi'
144

    
145
* Retrieve all the details of th VM with identifier $ID
146

    
147
  ::
148

    
149
    curl -v -X GET localhost:8888/compute/$ID -H 'Auth-Token: $AUTH'
150

    
151
* Delete the VM with identifier $ID
152

    
153
  ::
154
  
155
    curl -v -X DELETE localhost:8888/compute/$ID -H 'Auth-Token: $AUTH'
156

    
157

    
158
Indices and tables
159
==================
160

    
161
* :ref:`genindex`
162
* :ref:`search`
163