ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Supporting and Using EC2/CIMI on top of
Cloud Environments via Deltacloud



Oved Ourfali
Senior Software Engineer ¨C Red Hat


FOSDEM & Puppet Camp
February 2013
                                          1
Agenda

 Overview and Motivation
 Cloud APIs
 Using Deltacloud on top of oVirt via EC2 and CIMI
   Integration
   Installation
   EC2/CIMI examples
 Future Work
 Summary




                                                     2
Deltacloud
  Open source Apache project
  Abstracts the differences between cloud providers
  Supports Deltacloud, EC2 and CIMI APIs
  Supports many cloud providers
    EC2
    oVirt
    Eucalyptus
    OpenNebula
    OpenStack
    .....




                                                      3
Deltacloud



  CIMI API                EC2 API                   Deltacloud API


                   Deltacloud Server


  EC2 driver   oVirt driver            Eucalyptus driver



 Amazon EC2       oVirt                   Eucalyptus




                                                                     4
Motivation

  Heterogeneous cloud and virtualization environment
  Existing software working with common cloud APIs like
  EC2
     Aeolus / CloudForms ¨C cloud management software
     Synaps ¨C CloudWatch implementation over EC2 API
     Heat (Openstack project)
            CloudFormation and CloudWatch support
            POC to support Deltacloud
     Automated scripts
     ....


                                                       5
Bottom Line




              If you work with
        EC2 / CIMI / Deltacloud API
 you can use it on top of many different
           cloud providers!



                                       6
Cloud APIs

  DMTF CIMI API
    Cloud Infrastructure Management Interface
    http://dmtf.org/standards/cloud
    Version 1.0.0 was published in August, 29th, 2012,
    1.0.1 in October
    Still new API, but aims to be the cloud standard API
  EC2 API ¨C Amazon Elastic Cloud API
  Deltacloud API




                                                           7
CIMI API
 REST based API
 Main entities:
   Machines - configuration, image, template
   Volumes - images, configuration, image, template
   Networks ¨C Configuration, Forwarding Group, Template
   Network Ports ¨C Port configuration, Port Template




                                                       8
EC2 API

  API to Amazon Elastic Cloud, that allows to perform
  various actions
  HTTP GET/POST
    Endpoint¡ªEntry point to act on
    Action¡ªAction to perform on the endpoint
    Parameters¡ªRequest parameters




                                                   9
EC2 API

  Main entities:
    AMI ¨C template that contains a software configuration
    Instance Type ¨C instance hardware configuration
    Instance ¨C compute resource
    EBS Volume ¨C storage resource
    Networking entities (IP Addresses, NetworkInterface,
    Network ACL, Network ACL entries....)
    Region ¨C different geographical locations where data
    centers reside
    Availability Zone ¨C isolated from failures in other zones


                                                            10
Deltacloud API
 REST based API
 Main entities:
   Instances
   Images
   Hardware Profiles
   Realms
   Storage Volumes and Snapshots
   Networking Entities
      IP Addresses
      Load Balancers
      Firewalls

                                   11
Using Deltacloud on top of oVirt
       via EC2 and CIMI




                                   12
oVirt Engine

  The oVirt engine is a large scale, centralized
  virtualization management platform
  Provides IaaS capabilities
  Every capability is exposed via rich API, UI, CLI and
  SDK




                                                          13
Deltacloud-oVirt integration


                    oVirt Driver




                      rbovirt


                          REST API


                    oVirt Engine




                                     14
Install and Run the Deltacloud Server
  Installing Deltacloud via GEM
    Run the following commands as super user:
    $ yum install rubygems gcc-c++ libxml libxslt libxslt-devel
    $ gem install rake deltacloud-core


  Running Deltacloud
     First set the API_PROVIDER in the following format
         API-URL; DataCenter-ID ; USER/ADMIN (default to ADMIN)
     Examples
         API_PROVIDER=¡±http://engine-server:port/api;dc-id;ADMIN
         API_PROVIDER=¡±http://engine-server:port/api;;USER
     Then, run the deltacloud daemon
      $ export API_PROVIDER=¡±http://ovirt-server:port/api;;USER¡±
      $ deltacloudd -i rhevm -f cimi,ec2,deltacloud


                                                                   15
Install and Run the Deltacloud Server
  Installing Deltacloud via RPM
    Run the following command as super user:
    $ yum install deltacloud-core-all



  Configure Deltacloud
     Set the DRIVER, API_PROVIDER and API_FRONTEND in
     /etc/sysconfig/deltacloud-core
        API_PROVIDER=¡±http://ovirt-server:port/api;;USER¡±
        API_FRONTEND=¡±cimi,ec2,deltalcoud¡±
        DRIVER=¡±rhevm¡±
  Running the Deltacloud service
     systemctl start deltacloud-core.service


                                                            16
Install and Run the Deltacloud Server
  Admin API requests are DC-specific, whereas User ones are system-
  wide
  The API_PROVIDER can be changed by setting the ¡°X-Deltacloud-
  Provider¡± HTTP Header on every request




                                                                17
Basic Operations - EC2
  The following EC2 operations are supported when using Deltacloud
  on top of oVirt engine:
     Get Clusters (Availability Zones)
     Get Templates (AMI ¨C Amazon Machine Images + Instance Type)
     Get VMs (Instances)
     Create new VM (Run Instances)
     Start VM (Start Instances)
     Stop VM (Stop Instances)
     Delete VM (Terminate Instances)




                                                               18
Basic Operations - EC2
  Get oVirt Clusters
    HTTP GET
    http://localhost:3001/ec2/?Action=DescribeAvailabilityZones




                                                                  19
Basic Operations - EC2
  Get oVirt Templates
     HTTP GET
     http://localhost:3001/ec2/?Action=DescribeImages




                                                        20
Basic Operations - EC2
  Create VM from Template, in a Cluster
  (EC2 - run an instance, created from an image, in an availability zone)
      HTTP GET
      http://localhost:3001/ec2/?
      Action=RunInstances&Placement.AvailabilityZone=77d52ef6-
      11e3-11e2-be8c-87a6485627fe&ImageId=77ea7521-3017-4ee9-
      bcdf-d566178991c6
      Other options
         UserData=..... (Either via hooks in older versions, or via native
         oVirt VM Payload feature in newer versions)
         InstanceType=... (Will be supported when we introduce flavors
         in oVirt)




                                                                      21
Basic Operations - EC2
  Response




                         22
Basic Operations - EC2
  Get VM
    HTTP GET
    All instances - http://localhost:3001/ec2/?
    Action=DescribeInstances
    Specific instance - http://localhost:3001/ec2/?
    Action=DescribeInstances&InstanceId.1=84623036-49fe-4f22-
    ac6f-ff526e8b82be¡±




                                                           23
Basic Operations - EC2
  Start VM
    HTTP GET
    http://localhost:3001/ec2/?
    Action=StartInstances&InstanceId.1=84623036-49fe-4f22-ac6f-
    ff526e8b82be¡±




                                                             24
Basic Operations - EC2
  Stop VM
    HTTP GET
    http://localhost:3001/ec2/?
    Action=StopInstances&InstanceId.1=84623036-49fe-4f22-ac6f-
    ff526e8b82be¡±




                                                            25
Basic Operations - EC2
  Delete VM
    HTTP GET
    http://localhost:3001/ec2/?
    Action=TerminateInstances&InstanceId.1=84623036-49fe-4f22-
    ac6f-ff526e8b82be¡±




                                                           26
Basic Operations - CIMI
  The following CIMI operations are supported when using Deltacloud
  on top of oVirt engine:
     Get Templates (Get Images)
     Get VMs (Get Machines)
     Create new VM (Create Machine)
     Start VM (Start Machine)
     Stop VM (Stop Machine)
     Delete VM (Delete Machine)




                                                                27
Basic Operations - CIMI
  Get Templates
    HTTP GET
    http://localhost:3001/cimi/machine_images




                                                28
Basic Operations - CIMI
  Create VM
    HTTP POST
    http://localhost:3001/cimi/machines
    Body




                                          29
Basic Operations - CIMI
  Response:




                          30
Basic Operations - CIMI
  Get VM
    HTTP GET
    http://localhost:3001/cimi/machines/7434e6e3-a85d-4bfb-b952-
    b191288c2aa2




                                                               31
Basic Operations - CIMI
  Start VM
    HTTP POST
    http://localhost:3001/cimi/machines/81e0908a-04da-4859-8a92-
    f80d071a2e4c/start
    Body:



    Response:
       HTTP CODE 200




                                                               32
Basic Operations - CIMI
  Stop VM
    HTTP POST
    http://localhost:3001/cimi/machines/81e0908a-04da-4859-8a92-
    f80d071a2e4c/stop
    Body:



    Response:
       HTTP CODE 200




                                                               33
Basic Operations - CIMI
  Delete VM
    HTTP DELETE
    http://localhost:3001/cimi/machines/1bac66da-7ecc-4e19-bc91-
    0623c5448fc9
    Response:
       HTTP CODE 200




                                                               34
Future Work (oVirt / Deltacloud)
  General
    Supporting VM configuration/instance type (not yet part of oVirt)
    Better mapping and support for networks
    Better mapping and support for storage volumes (Integrate into
    Deltacloud)
    Supporting VM Payload (Deltacloud)
  EC2
    Supporting more EC2 options/actions (oVirt / Deltacloud)
  CIMI
    Supporting more CIMI options/actions/entities (oVirt / Deltacloud)
    Support updating resources (Deltacloud will need to support that
    and integrate with oVirt)

                                                                     35
Summary

 Enabling the use of common cloud APIs on top of
 cloud environments is very useful
 Deltacloud exposes common cloud APIs on top of
 many cloud providers, including oVirt
 Projects who would like to use the Deltacloud-oVirt
 integration - we would be happy to know about it,
 guide you, and help! Please contact us on
 users@ovirt.org




                                                       36
Useful Links

  Deltacloud
    Developer mailing list dev@deltacloud.apache.org
    http://deltacloud.apache.org
    #deltacloud on Freenode
  oVirt
    Users mailing list users@ovirt.org
    http://ovirt.org
  My blog
    http://ovedou.blogspot.com


                                                   37
Questions



            ?
                38
THANK YOU !

http://www.ovirt.org



ovedo@redhat.com
ovedo at #ovirt (irc.oftc.net)
                                 39

More Related Content

Supporting and Using EC2/CIMI on top of Cloud Environments via Deltacloud

  • 1. Supporting and Using EC2/CIMI on top of Cloud Environments via Deltacloud Oved Ourfali Senior Software Engineer ¨C Red Hat FOSDEM & Puppet Camp February 2013 1
  • 2. Agenda Overview and Motivation Cloud APIs Using Deltacloud on top of oVirt via EC2 and CIMI Integration Installation EC2/CIMI examples Future Work Summary 2
  • 3. Deltacloud Open source Apache project Abstracts the differences between cloud providers Supports Deltacloud, EC2 and CIMI APIs Supports many cloud providers EC2 oVirt Eucalyptus OpenNebula OpenStack ..... 3
  • 4. Deltacloud CIMI API EC2 API Deltacloud API Deltacloud Server EC2 driver oVirt driver Eucalyptus driver Amazon EC2 oVirt Eucalyptus 4
  • 5. Motivation Heterogeneous cloud and virtualization environment Existing software working with common cloud APIs like EC2 Aeolus / CloudForms ¨C cloud management software Synaps ¨C CloudWatch implementation over EC2 API Heat (Openstack project) CloudFormation and CloudWatch support POC to support Deltacloud Automated scripts .... 5
  • 6. Bottom Line If you work with EC2 / CIMI / Deltacloud API you can use it on top of many different cloud providers! 6
  • 7. Cloud APIs DMTF CIMI API Cloud Infrastructure Management Interface http://dmtf.org/standards/cloud Version 1.0.0 was published in August, 29th, 2012, 1.0.1 in October Still new API, but aims to be the cloud standard API EC2 API ¨C Amazon Elastic Cloud API Deltacloud API 7
  • 8. CIMI API REST based API Main entities: Machines - configuration, image, template Volumes - images, configuration, image, template Networks ¨C Configuration, Forwarding Group, Template Network Ports ¨C Port configuration, Port Template 8
  • 9. EC2 API API to Amazon Elastic Cloud, that allows to perform various actions HTTP GET/POST Endpoint¡ªEntry point to act on Action¡ªAction to perform on the endpoint Parameters¡ªRequest parameters 9
  • 10. EC2 API Main entities: AMI ¨C template that contains a software configuration Instance Type ¨C instance hardware configuration Instance ¨C compute resource EBS Volume ¨C storage resource Networking entities (IP Addresses, NetworkInterface, Network ACL, Network ACL entries....) Region ¨C different geographical locations where data centers reside Availability Zone ¨C isolated from failures in other zones 10
  • 11. Deltacloud API REST based API Main entities: Instances Images Hardware Profiles Realms Storage Volumes and Snapshots Networking Entities IP Addresses Load Balancers Firewalls 11
  • 12. Using Deltacloud on top of oVirt via EC2 and CIMI 12
  • 13. oVirt Engine The oVirt engine is a large scale, centralized virtualization management platform Provides IaaS capabilities Every capability is exposed via rich API, UI, CLI and SDK 13
  • 14. Deltacloud-oVirt integration oVirt Driver rbovirt REST API oVirt Engine 14
  • 15. Install and Run the Deltacloud Server Installing Deltacloud via GEM Run the following commands as super user: $ yum install rubygems gcc-c++ libxml libxslt libxslt-devel $ gem install rake deltacloud-core Running Deltacloud First set the API_PROVIDER in the following format API-URL; DataCenter-ID ; USER/ADMIN (default to ADMIN) Examples API_PROVIDER=¡±http://engine-server:port/api;dc-id;ADMIN API_PROVIDER=¡±http://engine-server:port/api;;USER Then, run the deltacloud daemon $ export API_PROVIDER=¡±http://ovirt-server:port/api;;USER¡± $ deltacloudd -i rhevm -f cimi,ec2,deltacloud 15
  • 16. Install and Run the Deltacloud Server Installing Deltacloud via RPM Run the following command as super user: $ yum install deltacloud-core-all Configure Deltacloud Set the DRIVER, API_PROVIDER and API_FRONTEND in /etc/sysconfig/deltacloud-core API_PROVIDER=¡±http://ovirt-server:port/api;;USER¡± API_FRONTEND=¡±cimi,ec2,deltalcoud¡± DRIVER=¡±rhevm¡± Running the Deltacloud service systemctl start deltacloud-core.service 16
  • 17. Install and Run the Deltacloud Server Admin API requests are DC-specific, whereas User ones are system- wide The API_PROVIDER can be changed by setting the ¡°X-Deltacloud- Provider¡± HTTP Header on every request 17
  • 18. Basic Operations - EC2 The following EC2 operations are supported when using Deltacloud on top of oVirt engine: Get Clusters (Availability Zones) Get Templates (AMI ¨C Amazon Machine Images + Instance Type) Get VMs (Instances) Create new VM (Run Instances) Start VM (Start Instances) Stop VM (Stop Instances) Delete VM (Terminate Instances) 18
  • 19. Basic Operations - EC2 Get oVirt Clusters HTTP GET http://localhost:3001/ec2/?Action=DescribeAvailabilityZones 19
  • 20. Basic Operations - EC2 Get oVirt Templates HTTP GET http://localhost:3001/ec2/?Action=DescribeImages 20
  • 21. Basic Operations - EC2 Create VM from Template, in a Cluster (EC2 - run an instance, created from an image, in an availability zone) HTTP GET http://localhost:3001/ec2/? Action=RunInstances&Placement.AvailabilityZone=77d52ef6- 11e3-11e2-be8c-87a6485627fe&ImageId=77ea7521-3017-4ee9- bcdf-d566178991c6 Other options UserData=..... (Either via hooks in older versions, or via native oVirt VM Payload feature in newer versions) InstanceType=... (Will be supported when we introduce flavors in oVirt) 21
  • 22. Basic Operations - EC2 Response 22
  • 23. Basic Operations - EC2 Get VM HTTP GET All instances - http://localhost:3001/ec2/? Action=DescribeInstances Specific instance - http://localhost:3001/ec2/? Action=DescribeInstances&InstanceId.1=84623036-49fe-4f22- ac6f-ff526e8b82be¡± 23
  • 24. Basic Operations - EC2 Start VM HTTP GET http://localhost:3001/ec2/? Action=StartInstances&InstanceId.1=84623036-49fe-4f22-ac6f- ff526e8b82be¡± 24
  • 25. Basic Operations - EC2 Stop VM HTTP GET http://localhost:3001/ec2/? Action=StopInstances&InstanceId.1=84623036-49fe-4f22-ac6f- ff526e8b82be¡± 25
  • 26. Basic Operations - EC2 Delete VM HTTP GET http://localhost:3001/ec2/? Action=TerminateInstances&InstanceId.1=84623036-49fe-4f22- ac6f-ff526e8b82be¡± 26
  • 27. Basic Operations - CIMI The following CIMI operations are supported when using Deltacloud on top of oVirt engine: Get Templates (Get Images) Get VMs (Get Machines) Create new VM (Create Machine) Start VM (Start Machine) Stop VM (Stop Machine) Delete VM (Delete Machine) 27
  • 28. Basic Operations - CIMI Get Templates HTTP GET http://localhost:3001/cimi/machine_images 28
  • 29. Basic Operations - CIMI Create VM HTTP POST http://localhost:3001/cimi/machines Body 29
  • 30. Basic Operations - CIMI Response: 30
  • 31. Basic Operations - CIMI Get VM HTTP GET http://localhost:3001/cimi/machines/7434e6e3-a85d-4bfb-b952- b191288c2aa2 31
  • 32. Basic Operations - CIMI Start VM HTTP POST http://localhost:3001/cimi/machines/81e0908a-04da-4859-8a92- f80d071a2e4c/start Body: Response: HTTP CODE 200 32
  • 33. Basic Operations - CIMI Stop VM HTTP POST http://localhost:3001/cimi/machines/81e0908a-04da-4859-8a92- f80d071a2e4c/stop Body: Response: HTTP CODE 200 33
  • 34. Basic Operations - CIMI Delete VM HTTP DELETE http://localhost:3001/cimi/machines/1bac66da-7ecc-4e19-bc91- 0623c5448fc9 Response: HTTP CODE 200 34
  • 35. Future Work (oVirt / Deltacloud) General Supporting VM configuration/instance type (not yet part of oVirt) Better mapping and support for networks Better mapping and support for storage volumes (Integrate into Deltacloud) Supporting VM Payload (Deltacloud) EC2 Supporting more EC2 options/actions (oVirt / Deltacloud) CIMI Supporting more CIMI options/actions/entities (oVirt / Deltacloud) Support updating resources (Deltacloud will need to support that and integrate with oVirt) 35
  • 36. Summary Enabling the use of common cloud APIs on top of cloud environments is very useful Deltacloud exposes common cloud APIs on top of many cloud providers, including oVirt Projects who would like to use the Deltacloud-oVirt integration - we would be happy to know about it, guide you, and help! Please contact us on users@ovirt.org 36
  • 37. Useful Links Deltacloud Developer mailing list dev@deltacloud.apache.org http://deltacloud.apache.org #deltacloud on Freenode oVirt Users mailing list users@ovirt.org http://ovirt.org My blog http://ovedou.blogspot.com 37
  • 38. Questions ? 38