OCCI-OS tutorial

835 views
722 views

Published on

Talk given by Álvaro López García of the Instituto de Física de Cantabria at the Cloud Interoperability Week tutorial session of Cloud Plugfest 10 in Madrid, Spain, 19 Sep 2013.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
835
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

OCCI-OS tutorial

  1. 1. OCCI at OpenStack Álvaro López García 1 1aloga@ifca.unican.es Spanish National Research Council (CSIC) Instituto de Física de Cantabria (IFCA) CloudPlugFest EGI TF 2013 Septembrer 2013 - Madrid, Spain A. López García OCCI at OpenStack
  2. 2. OCCI at OpenStack There is no official release of OCCI for OpenStack. OpenStack decided to only support their native API. The only exception is the EC2 Compatibility layer. A. López García OCCI at OpenStack
  3. 3. OCCI at OpenStack OCCI-OS interface started by Thijs Metsch from Intel and Andy Edmonds with community contributions. Code locations: Stackforge will become the official place (being migrated): https://github.com/stackforge/occi-os Thjis repository (development): https://github.com/tmetsch/occi-os My repo (development with additions): https://github.com/alvarolopez/occi-os/ stable/<release_name branches should contain stable code to be deployed with the corresponding version. Usage documentation https://wiki.openstack.org/wiki/Occi A. López García OCCI at OpenStack
  4. 4. OCCI-OS Installation Install the code and dependencies. You should ensure that you are using the correct branch from the code. pip install pyssf git clone https://github.com/alvarolopez/occi-os/ cd occi-os python setup.py install Currently, use the master branch for Grizzly. No version for Havana so far. A. López García OCCI at OpenStack
  5. 5. OCCI-OS Configuration Add it to the nova’s api-paste.ini configuration: [composite:occiapi] use = egg:Paste#urlmap /: occiapppipe [pipeline:occiapppipe] pipeline = authtoken keystonecontext occiapp # with request body size limiting and rate limiting # pipeline = sizelimit authtoken keystonecontext ratelimit occi [app:occiapp] use = egg:openstackocci-grizzly#occi_app Enable it in your nova.conf file: enabled_apis=ec2,occiapi,osapi_compute,osapi_volume,metadata Restart nova-api and you’re done. A. López García OCCI at OpenStack
  6. 6. Use it! First get a keystone token first: $ curl --insecure -H "Content-type: application/json" -d ’{"auth": {"tenantName": "whatever", "passwordCredentials": {"username": "demo", "password": "secret"}}}’ https://keystone.example.org:5000/v2.0/tokens (...) "token": { "expires": "2013-09-20T14:34:54Z", "id": "ae6259e89fc8434a8d7122e1f9fdc0f0", "issued_at": "2013-09-19T14:34:54.827264", (...) Grab the token ID: export KID=ae6259e89fc8434a8d7122e1f9fdc0f0 A. López García OCCI at OpenStack
  7. 7. Use it! See what you can provision: $ curl -v -H ’Content-Type: text/occi’ -H ’X-Auth-Token: ’$KID -X GET http://cloudapi.example.org:8787/-/ A. López García OCCI at OpenStack
  8. 8. Use it! Spawn a virtual machine: $ curl -v -X POST http://cloudapi.example.org:8787/compute/ -H ’Category: compute; scheme="http://schemas.ogf.org/occi/infr -H ’Content-Type: text/occi’ -H ’X-Auth-Token: ’$KID -H ’Category: m1-tiny; scheme="http://schemas.openstack.org/tem -H ’Category: 18d99a06-c3e5-4157-a0e3-37ec34bdfc24; scheme="htt -H ’Category: public_key; scheme="http://schemas.openstack.org/ A. López García OCCI at OpenStack
  9. 9. The end ¡Thank you very much! A. López García OCCI at OpenStack

×