You are on page 1of 22

FI-WARE

Workshop 2
Developing and
publishing
applications on the
FI-WARE Cloud
Slides available at: http://tinyurl.com/ws2-fiware
Workshop Agenda
FI-WARE Intro - J. Hierro (TID)
FI-LAB Portal + Deploy your VMs - G. Toffetti (IBM)
Cloud blueprints - F. Lopez and S. Garcia (TID)
Open APIs - J. Kennedy (Intel)
Authorization using IdM - J. Cervio and A. Tapiador
(UPM)
FI-WARE Business Framework - Markus Heller and
Thorsten Sandfuchs (SAP)
Connecting sensors to FI-WARE platform - Carlos Ralli
(TID)

FI-WARE Core Platform Overview
O
p
e
r
a
t
i
o
n
s

O
p
e
r
a
t
i
o
n
s

T
r
u
s
t

a
n
d

S
e
c
u
r
i
t
y

T
r
u
s
t

a
n
d

S
e
c
u
r
i
t
y

F
u
n
c
t
i
o
n
a
l
i
t
y

F
u
n
c
t
i
o
n
a
l
i
t
y

Developer
tools
Service delivery Cloud Hosting
Internet
of Things
Support
Services
I2ND = Interface to the Network and devices
FI-WARE Cloud Generic Enablers & Partners
Identity
Management &
Access Control GE
[Security WP]
UI
IaaS Service
Management (SM) GE
PaaS Management GE
Software Deployment
and Configuration
(SDC) GE
IaaS Data Center
Resource Management
(DCRM) GE
Monitoring
GE
Object
Storage GE
Edgelet
Management GE
Cloud Proxy GE
[joint with I2ND WP]
Cloud Hosting
R R
R
R R
R
R
R
R
R
R
Job Scheduler
GE
R
Infrastructure-as-a-Service (IaaS) Data Center
Resource Management (DCRM) GE
Offers cloud-based hosting of virtual machines, provisioned from a library of
pre-configured images, as well as storage volumes and virtual network
connectivity
Provided by IBM (with contributions by Intel)
Based on OpenStack leading open source IaaS API and implementation,
widely adopted by the industry
Used to host all the FI-WARE GEs in the Testbed, as well as FI-Lab
Identity
Management &
Access Control
GE
[Security WP]
UI
IaaS Service Management
(SM) GE
PaaS Management GE
Software Deployment and
Configuration (SDC) GE
IaaS Data Center Resource
Management (DCRM) GE
Monitoring
GE
Object
Storage GE
Edgelet
Management GE
Cloud Proxy GE
[joint with I2ND WP]
Cloud Hosting
R R
R
R R
R
R
R
R
R
R
Job Scheduler
GE
R
OpenStack is a global collaboration of developers & cloud computing technologists working to
produce an ubiquitous Infrastructure as a Service (IaaS) open source cloud computing platform
for public & private clouds.
Platinum Sponsors Gold Sponsors
http://openstack.org
OpenStack Compute (Nova)
Provision and manage large networks of virtual machines
OpenStack Storage (Cinder, Swift)
Object and Block storage for use with servers and applications
OpenStack Networking (Quantum/Neutron)
Pluggable, scalable, API-driven network and IP management
OpenStack Image Service
Catalog and manage massive libraries of server images
OpenStack Identity Service
Unified authentication across all OpenStack projects and integrates
with existing authentication systems.
47 UGs
5600+ Individuals
66 UGs
11800 Individuals
OpenStack Foundation: exponential growth
Code available under Apache 2.0 license. Design tenets scale &
elasticity, share nothing & distribute everything
OpenStack in a Nutshell

DCRM GE Basic Concepts
Virtual server:
a virtualized container that can host an arbitrary Operating System and an arbitrary software
stack on top, installed within the virtual server
Virtual disk:
represents a persistent virtual disk that can be potentially attached to an arbitrary virtual server
Virtual network:
represents a logical network abstraction that would typically represent an L2 segment
Virtual image:
a pre-packaged virtual server image.
DCRM-specific features
With respect to the OpenStack baseline, DCRM provides in addition the following set of high-level
advanced features:
Shared storage configuration enabling live VM migration and related scenarios
VM High Availability
Adaptive scheduling for optimized resource utilization
Support for QoS guarantees for workloads
Support for placement policies
Support of concurrent management and deployment workflows in a scalable consistent manner
Unified management of heterogeneous environments
Support for policy-based virtual network connectivity

DCRM References
DCRM Specification
http://bit.ly/18LU5ED
DCRM APIs:
OpenStack: http://bit.ly/11QyJTR
OCCI: http://bit.ly/11gtHei

DCRM Architecture (2nd Release)
Virtual Server
Mgmt Service
Virtual Image
Mgmt Service
Placement
Service
Policy
Service
Virtual Disk
Mgmt Service
Virtual Network
Mgmt Service
API
Configuration Repository
Image Repository
images
Identity
Management
Service
Message Fabric
R
R
R
OpenStack / OCCI
OpenStack + Open Cloud
Computing Interface (OCCI)++
OpenStack++
Creating an account on FI-LAB
Register at:
http://account.lab.fi-ware.eu

Steps:
Insert name and email
Choose password
Submit
Receive confirmation email
Click on account activation link
Login
NOTE: before creating a VM
[Important] Set-up steps:
Allocate public IPs to project
Update firewall rules of security groups to be able to access VMs
Generate private/public key pair
Remember you have limits (quotas):
3 instances
3 floating IPs
6 cores
10 GB storage
15 GB RAM
Thank you!
16
OpenStack API Walk-through
http://docs.openstack.org/api/quick-start/content/index.html
Authentication
REQ:
curl -d '{"auth":{"passwordCredentials":{"username": "giovanni", "password":"secret"}}}' -H
"Content-type: application/json" http://130.206.80.100:5000/v2.0/tokens

RES:
{"access": {"token": {"expires": "2013-06-05T09:50:28Z", "id":
"fb4a4642f4b848f48d78052c98782ba3"}, "serviceCatalog": {}, "user": {"username": "giovanni",
"roles_links": [], "id": "dcdef6b4d8644d209d066ce1ebcf7994", "roles": [], "name": "giovanni"}}}
Get TenantId
REQ:
curl -k -D - -H "X-Auth-Token: fb4a4642f4b848f052c98782ba3" -X 'GET' -v
http://130.206.80.100:5000/v2.0/tenants -H 'Content-type: application/json'
RES:
{"tenants_links": [],
"tenants": [{
"enabled": true, "description": "FI-WARE Project", "name":
"FIWARE",
"id": "3bb69a4204334bfc98e0199cb33000ea
}]
}
Discover endpoints
REQ:
curl -d '{"auth":{"passwordCredentials":{"username: "giovanni", "password":"secret"}, "tenantId":
"3bb69a4204334bfc98e0199cb33000ea"}}' -H "Content-type: application/json"
http://130.206.80.100:5000/v2.0/tokens
RES:
"serviceCatalog": [{
"endpoints": [{
"adminURL": "http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea",
"region": "RegionOne",
"internalURL": "http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea",
"publicURL": "http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea" }],
"endpoints_links": [],
"type": "compute",
"name": "nova"
},
List images
REQ:
curl -k -D -H "X-Auth-Token: $token" -X 'GET' http://130.206.80.11:8774/v2/$tenantId/images -H
'Content-type: application/json
RES:
{
"images": [
{
"id": "a5848d58-f907-457a-9bf0-e8f1cf63256b",
"links": [{ "href": http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/images/91eb1e24-27e2-4623-
b65c-f1542175f6e6",
"rel": "self"}, { "href": ", "rel": "bookmark" }, {
"href": ", "type": "application/vnd.openstack.image", "rel": "alternate"
}
],
"name": "Ubuntu_12.04_cloudimg_amd64_VNC-r2
},

List flavors
REQ:
curl -k -D - -H "X-Auth-Token: $token" -X 'GET' http://130.206.80.11:8774/v2/$tenantId/flavors -H
'Content-type: application/json
RES:
{
"flavors": [{
"id": "3",
"links": [{ "href": http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/flavors/3",
"rel": "self" }, { "href": ", "rel": "bookmark"
}
],
"name": "m1.medium"
}, .

Create instance
REQ:
curl -k -H "X-Auth-Token: d889a8fdf8fb4d52b6e1b8771d0f59b8" -X 'POST'
http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/servers -H 'Content-type:
application/json' -d '{"server": {"flavorRef":
"http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/flavors/3", "imageRef":
"http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/images/91eb1e24-27e2-
4623-b65c-f1542175f6e6", "metadata": {"My Server Name": "Demo_server" }, "name": "api-server-
test"}}'
RES:
{"server": {"OS-DCF:diskConfig": "MANUAL", "id": "32e36513-dfc7-4dd6-bc31-206cbda85297", "links":
[{"href": "http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/servers/32e36513-dfc7-
4dd6-bc31-206cbda85297", "rel": "self"}, {"href":
"http://130.206.80.11:8774/3bb69a4204334bfc98e0199cb33000ea/servers/32e36513-dfc7-4dd6-bc31-
206cbda85297", "rel": "bookmark"}], "adminPass": "SBr5wXMqbqLj"}}

List instances
REQ:
curl -k -D - -H "X-Auth-Token: d889a8fdf8fb4b8771d0f59b8" -X 'GET'
http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/servers -H 'Content-type:
application/json'
RES:
{ "servers": [{ "id": "32e36513-dfc7-4dd6-bc31-206cbda85297", "links": [{"href":
"http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/servers/32e36513-dfc7-4dd6-
bc31-206cbda85297", "rel": "self" }, { "href": ..", "rel": "bookmark" } ],
"name": "api-server-test"
},.

Stop instance
REQ:
curl -k -H "X-Auth-Token: $token" -X 'DELETE'
http://130.206.80.11:8774/v2/3bb69a4204334bfc98e0199cb33000ea/servers/32e36513-dfc7-4dd6-
bc31-206cbda85297 -H 'Content-type: application/json'
RES: HTTP code 200

You might also like