SlideShare a Scribd company logo
1 of 13
CloudStack EC2 configuration

       Sebastien Goasguen
          August 14th
Introduction
• CloudStack provides an EC2 compatible interface
• In Apache CloudStack 4.0 (soon out), Cloudbridge
  is now an integral part of the management server
  and not a separate server.
• SOAP and Query interface are supported. SOAP
  may be dropped soon.
• Query interface under heavy
  development/testing
Steps to use EC2/S3 in CloudStack
• Enable the service via global configuration
  settings
• Generate API keys for the user(s)
• Register the user and associate a certificate
  (for SOAP).
• Provide compute offering that matches the
  name of Amazon instance types (e.g
  m1.small…)
• Setup environment variables (e.g $EC2_URL)
Enabling EC2 and S3
• Via the GUI




• Via API call on integration API port 8096
  http://localhost:8096/client/api?
  command=updateConfiguration&name=enable.s3.api&value=true
  http://localhost:8096/client/api?
  command=updateConfiguration&name=enable.ec2.api&value=true
Enabling EC2 and S3
• Via an authenticated API call on port 8080 (e.g
  using a Python client)

apiurl = 'http://localhost:8080/client/api’
cloudstack = CloudStack.Client(apiurl,apikey,secretkey)
cloudstack.updateConfiguration 
  ({‘name’:’enable.ec2.api’,’value’:’true’})
Generate Keys
• Via the GUI
Generate Keys
• Via the API:
  http://localhost:8096/client/api?
  command=registerUserKeys&id=<id of
  the user>
Register the user
• Get the script from the source at
  /path/to/source/awsapi-
  setup/setup/cloudstack-aws-api-
  register

cloud-bridge-register --apikey=<User’s Cloudstack API key>
   --secretkey=<User’s CloudStack Secret key>
   --cert=</path/to/cert.pem> --url=http://<cloudstack-server-
   ip>:8080/awsapi
Provide “Amazon” instance types
• You can rename using the API, but the easiest
  is to go via the GUI
Setup shell environment
•   export EC2_PRIVATE_KEY=</path/to/userkey.pem>
•   export EC2_CERT=</path/to/cert.pem>
•   export EC2_URL=http://<cloudstack-server->:8080/awsapi
•   export AWS_ACCESS_KEY_ID=J8HFx6wHYl_qTvMcSA3fe3ZugR-
    gcy3ldZ21wPezwbj9Cy1-bnlhdsBAS0JcYrZ8vw3ra-gsu4-Ke_uH1rKTKQ
•   export AWS_SECRET_KEY_ID=NzS9akD_8TzYWJsv-
    x6QXIg6M4pzWlhp6EFMbY34Ue0D9WA64yZ7qmHhbkut5o6GpG8CNZ8LRtNgiL_M
    Whij3w



• Get the ec2 commands binaries for api version
  2010-11-15
• You are now ready to use the ec2-*
  commands
EC2 Boto example 1/2
• Specify the region:
   region = boto.ec2.regioninfo.RegionInfo   
  (name="ROOT",endpoint=”<cloudstack-server-ip>")

• Establish a connection:
  conn =boto.connect_ec2(aws_access_key_id=apikey,
                        aws_secret_access_key=secretkey,
                        is_secure=False,
                      region=region,
                        port=8080,
                        path="/awsapi",
                        api_version="2010-11-15")

Note the API version, expect to see support for a
 newer API soon. Contributions welcome 
EC2 Boto example 2/2
• Find your image and start it:

images = conn.get_all_images()
myimage = images[0]
'''Pick an instance type present in your compute
  offering''’
vm_type='m1.small'
 reservation = myimage.run 
  (instance_type=vm_type,security_groups=['default']
  )
• Join the discussion on the future of the EC2/S3
  compatibility of CloudStack

  cloudstack-dev@incubator.apache.org
  #cloudstack on irc.freenode.net
  @CloudStack on Twitter

More Related Content

What's hot

jclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Colejclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Cole
Everett Toews
 
App fabric hybrid computing
App fabric   hybrid computingApp fabric   hybrid computing
App fabric hybrid computing
Hammad Rajjoub
 

What's hot (20)

Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
Shift Remote AI: Build and deploy PyTorch Models with Azure Machine Learning ...
 
jclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Colejclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Cole
 
Jclouds Intro
Jclouds IntroJclouds Intro
Jclouds Intro
 
Open service broker API with Azure Kubernetes Services
Open service broker API with Azure Kubernetes ServicesOpen service broker API with Azure Kubernetes Services
Open service broker API with Azure Kubernetes Services
 
Azure virtual machine-network
Azure virtual machine-networkAzure virtual machine-network
Azure virtual machine-network
 
AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHN
 
Infrastructure as Code on Azure - NET Conf CO v2018
Infrastructure as Code on Azure - NET Conf CO v2018 Infrastructure as Code on Azure - NET Conf CO v2018
Infrastructure as Code on Azure - NET Conf CO v2018
 
Deploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic BeanstalkDeploying a simple Rails application with AWS Elastic Beanstalk
Deploying a simple Rails application with AWS Elastic Beanstalk
 
Serverless Pune meetup 3
Serverless Pune meetup 3Serverless Pune meetup 3
Serverless Pune meetup 3
 
App fabric hybrid computing
App fabric   hybrid computingApp fabric   hybrid computing
App fabric hybrid computing
 
Going Serverless
Going ServerlessGoing Serverless
Going Serverless
 
Python in the serverless era (PyCon 2017)
Python in the serverless era (PyCon 2017)Python in the serverless era (PyCon 2017)
Python in the serverless era (PyCon 2017)
 
Microsoft Azure Container Service - DockerCH
Microsoft Azure Container Service - DockerCHMicrosoft Azure Container Service - DockerCH
Microsoft Azure Container Service - DockerCH
 
Python in the Serverless Era (PyCon IL 2016)
Python in the Serverless Era (PyCon IL 2016)Python in the Serverless Era (PyCon IL 2016)
Python in the Serverless Era (PyCon IL 2016)
 
Easy Object Storage Import/Export Using the S3 Connector on Jetstream
Easy Object Storage Import/Export Using the S3 Connector on JetstreamEasy Object Storage Import/Export Using the S3 Connector on Jetstream
Easy Object Storage Import/Export Using the S3 Connector on Jetstream
 
Deploying and running Grails in the cloud
Deploying and running Grails in the cloudDeploying and running Grails in the cloud
Deploying and running Grails in the cloud
 
Creating CentOS Template For CloudStack
Creating CentOS Template For CloudStackCreating CentOS Template For CloudStack
Creating CentOS Template For CloudStack
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes Services
 
Apache JClouds
Apache JCloudsApache JClouds
Apache JClouds
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1
 

Viewers also liked

Top 8 chief security officer resume samples
Top 8 chief security officer resume samplesTop 8 chief security officer resume samples
Top 8 chief security officer resume samples
rendijom
 
Competitive spend analysis sov
Competitive spend analysis sovCompetitive spend analysis sov
Competitive spend analysis sov
Cassie Stox
 
Capital one interview questions and answers
Capital one interview questions and answersCapital one interview questions and answers
Capital one interview questions and answers
YujiNakazawa456
 
Comparision of investment in mutual fund and equity
Comparision of  investment in mutual fund and equityComparision of  investment in mutual fund and equity
Comparision of investment in mutual fund and equity
Paritosh Singh
 
MARKETING STRATEGY OF CAFÉ BEAN
MARKETING STRATEGY OF CAFÉ BEANMARKETING STRATEGY OF CAFÉ BEAN
MARKETING STRATEGY OF CAFÉ BEAN
rachit pahuja
 
Flow chart a technique of process communication
Flow chart  a technique of process communicationFlow chart  a technique of process communication
Flow chart a technique of process communication
Rajesh Patel
 

Viewers also liked (20)

Best Practices When Localizing And Translating Marketing Materials
Best Practices When Localizing And Translating Marketing MaterialsBest Practices When Localizing And Translating Marketing Materials
Best Practices When Localizing And Translating Marketing Materials
 
How to recover password on a cisco 2950, 2960 switch
How to recover password on a cisco 2950, 2960 switchHow to recover password on a cisco 2950, 2960 switch
How to recover password on a cisco 2950, 2960 switch
 
Top 8 chief security officer resume samples
Top 8 chief security officer resume samplesTop 8 chief security officer resume samples
Top 8 chief security officer resume samples
 
AT&T Enhanced WebRTC API Overview
AT&T Enhanced WebRTC API OverviewAT&T Enhanced WebRTC API Overview
AT&T Enhanced WebRTC API Overview
 
Cisco Social Media Policy
Cisco Social Media PolicyCisco Social Media Policy
Cisco Social Media Policy
 
"UP" characters
"UP" characters"UP" characters
"UP" characters
 
2. Cellular Aberration
2. Cellular Aberration   2. Cellular Aberration
2. Cellular Aberration
 
Competitive spend analysis sov
Competitive spend analysis sovCompetitive spend analysis sov
Competitive spend analysis sov
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Command and Request
Command and RequestCommand and Request
Command and Request
 
Collective Investment Scheme & SEBI
Collective Investment Scheme & SEBICollective Investment Scheme & SEBI
Collective Investment Scheme & SEBI
 
Capital one interview questions and answers
Capital one interview questions and answersCapital one interview questions and answers
Capital one interview questions and answers
 
Comparision of investment in mutual fund and equity
Comparision of  investment in mutual fund and equityComparision of  investment in mutual fund and equity
Comparision of investment in mutual fund and equity
 
MARKETING STRATEGY OF CAFÉ BEAN
MARKETING STRATEGY OF CAFÉ BEANMARKETING STRATEGY OF CAFÉ BEAN
MARKETING STRATEGY OF CAFÉ BEAN
 
2. Insurance - Classification of Insurance
2. Insurance - Classification of Insurance2. Insurance - Classification of Insurance
2. Insurance - Classification of Insurance
 
Flow chart a technique of process communication
Flow chart  a technique of process communicationFlow chart  a technique of process communication
Flow chart a technique of process communication
 
Architettura web
Architettura webArchitettura web
Architettura web
 
Understanding ITIL CMDB
Understanding ITIL CMDBUnderstanding ITIL CMDB
Understanding ITIL CMDB
 
Project front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgementProject front page, index, certificate, and acknowledgement
Project front page, index, certificate, and acknowledgement
 
Bone grafts in oral surgery
Bone grafts in oral surgeryBone grafts in oral surgery
Bone grafts in oral surgery
 

Similar to CloudStack EC2 Configuration

MesosCon - Be a microservices hero
MesosCon - Be a microservices heroMesosCon - Be a microservices hero
MesosCon - Be a microservices hero
Dragos Dascalita Haut
 

Similar to CloudStack EC2 Configuration (20)

AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
 
Intro to fog and openstack jp
Intro to fog and openstack jpIntro to fog and openstack jp
Intro to fog and openstack jp
 
(ARC401) Cloud First: New Architecture for New Infrastructure
(ARC401) Cloud First: New Architecture for New Infrastructure(ARC401) Cloud First: New Architecture for New Infrastructure
(ARC401) Cloud First: New Architecture for New Infrastructure
 
A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)A 60-minute tour of AWS Compute (November 2016)
A 60-minute tour of AWS Compute (November 2016)
 
Exposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using SwaggerExposing Salesforce REST Services Using Swagger
Exposing Salesforce REST Services Using Swagger
 
Building Scalable Services with Amazon API Gateway - Technical 201
Building Scalable Services with Amazon API Gateway - Technical 201Building Scalable Services with Amazon API Gateway - Technical 201
Building Scalable Services with Amazon API Gateway - Technical 201
 
MesosCon - Be a microservices hero
MesosCon - Be a microservices heroMesosCon - Be a microservices hero
MesosCon - Be a microservices hero
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Automating Security in your IaC Pipeline
Automating Security in your IaC PipelineAutomating Security in your IaC Pipeline
Automating Security in your IaC Pipeline
 
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Building microservices sample application
Building microservices sample applicationBuilding microservices sample application
Building microservices sample application
 
AWS Cyber Security Best Practices
AWS Cyber Security Best PracticesAWS Cyber Security Best Practices
AWS Cyber Security Best Practices
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API GatewayMigrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
Migrate your Existing Express Apps to AWS Lambda and Amazon API Gateway
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with Git
 
OCI Oracle Functions Deployment
OCI Oracle Functions Deployment OCI Oracle Functions Deployment
OCI Oracle Functions Deployment
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
 
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
 

More from Sebastien Goasguen

Moving from Publican to Read The Docs
Moving from Publican to Read The DocsMoving from Publican to Read The Docs
Moving from Publican to Read The Docs
Sebastien Goasguen
 

More from Sebastien Goasguen (20)

Kubernetes Sealed secrets
Kubernetes Sealed secretsKubernetes Sealed secrets
Kubernetes Sealed secrets
 
Kubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessKubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: Kubeless
 
Serverless on Kubernetes
Serverless on KubernetesServerless on Kubernetes
Serverless on Kubernetes
 
Kubernetes kubecon-roundup
Kubernetes kubecon-roundupKubernetes kubecon-roundup
Kubernetes kubecon-roundup
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERN
 
CloudStack Conference Public Clouds Use Cases
CloudStack Conference Public Clouds Use CasesCloudStack Conference Public Clouds Use Cases
CloudStack Conference Public Clouds Use Cases
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOS
 
Apache Libcloud
Apache LibcloudApache Libcloud
Apache Libcloud
 
Moving from Publican to Read The Docs
Moving from Publican to Read The DocsMoving from Publican to Read The Docs
Moving from Publican to Read The Docs
 
Cloud and Big Data trends
Cloud and Big Data trendsCloud and Big Data trends
Cloud and Big Data trends
 
SDN: Network Agility in the Cloud
SDN: Network Agility in the CloudSDN: Network Agility in the Cloud
SDN: Network Agility in the Cloud
 
Build a Cloud Day Paris
Build a Cloud Day ParisBuild a Cloud Day Paris
Build a Cloud Day Paris
 
CloudStack / Saltstack lightning talk at DevOps Amsterdam
CloudStack / Saltstack lightning talk at DevOps AmsterdamCloudStack / Saltstack lightning talk at DevOps Amsterdam
CloudStack / Saltstack lightning talk at DevOps Amsterdam
 
CloudMonkey
CloudMonkeyCloudMonkey
CloudMonkey
 
Intro to CloudStack API
Intro to CloudStack APIIntro to CloudStack API
Intro to CloudStack API
 
DevCloud and CloudMonkey
DevCloud and CloudMonkeyDevCloud and CloudMonkey
DevCloud and CloudMonkey
 
Git 101 for CloudStack
Git 101 for CloudStackGit 101 for CloudStack
Git 101 for CloudStack
 
Intro to CloudStack Build a Cloud Day
Intro to CloudStack Build a Cloud DayIntro to CloudStack Build a Cloud Day
Intro to CloudStack Build a Cloud Day
 
Apache CloudStack AlpesJUG
Apache CloudStack AlpesJUGApache CloudStack AlpesJUG
Apache CloudStack AlpesJUG
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

CloudStack EC2 Configuration

  • 1. CloudStack EC2 configuration Sebastien Goasguen August 14th
  • 2. Introduction • CloudStack provides an EC2 compatible interface • In Apache CloudStack 4.0 (soon out), Cloudbridge is now an integral part of the management server and not a separate server. • SOAP and Query interface are supported. SOAP may be dropped soon. • Query interface under heavy development/testing
  • 3. Steps to use EC2/S3 in CloudStack • Enable the service via global configuration settings • Generate API keys for the user(s) • Register the user and associate a certificate (for SOAP). • Provide compute offering that matches the name of Amazon instance types (e.g m1.small…) • Setup environment variables (e.g $EC2_URL)
  • 4. Enabling EC2 and S3 • Via the GUI • Via API call on integration API port 8096 http://localhost:8096/client/api? command=updateConfiguration&name=enable.s3.api&value=true http://localhost:8096/client/api? command=updateConfiguration&name=enable.ec2.api&value=true
  • 5. Enabling EC2 and S3 • Via an authenticated API call on port 8080 (e.g using a Python client) apiurl = 'http://localhost:8080/client/api’ cloudstack = CloudStack.Client(apiurl,apikey,secretkey) cloudstack.updateConfiguration ({‘name’:’enable.ec2.api’,’value’:’true’})
  • 7. Generate Keys • Via the API: http://localhost:8096/client/api? command=registerUserKeys&id=<id of the user>
  • 8. Register the user • Get the script from the source at /path/to/source/awsapi- setup/setup/cloudstack-aws-api- register cloud-bridge-register --apikey=<User’s Cloudstack API key> --secretkey=<User’s CloudStack Secret key> --cert=</path/to/cert.pem> --url=http://<cloudstack-server- ip>:8080/awsapi
  • 9. Provide “Amazon” instance types • You can rename using the API, but the easiest is to go via the GUI
  • 10. Setup shell environment • export EC2_PRIVATE_KEY=</path/to/userkey.pem> • export EC2_CERT=</path/to/cert.pem> • export EC2_URL=http://<cloudstack-server->:8080/awsapi • export AWS_ACCESS_KEY_ID=J8HFx6wHYl_qTvMcSA3fe3ZugR- gcy3ldZ21wPezwbj9Cy1-bnlhdsBAS0JcYrZ8vw3ra-gsu4-Ke_uH1rKTKQ • export AWS_SECRET_KEY_ID=NzS9akD_8TzYWJsv- x6QXIg6M4pzWlhp6EFMbY34Ue0D9WA64yZ7qmHhbkut5o6GpG8CNZ8LRtNgiL_M Whij3w • Get the ec2 commands binaries for api version 2010-11-15 • You are now ready to use the ec2-* commands
  • 11. EC2 Boto example 1/2 • Specify the region: region = boto.ec2.regioninfo.RegionInfo (name="ROOT",endpoint=”<cloudstack-server-ip>") • Establish a connection: conn =boto.connect_ec2(aws_access_key_id=apikey, aws_secret_access_key=secretkey, is_secure=False, region=region, port=8080, path="/awsapi", api_version="2010-11-15") Note the API version, expect to see support for a newer API soon. Contributions welcome 
  • 12. EC2 Boto example 2/2 • Find your image and start it: images = conn.get_all_images() myimage = images[0] '''Pick an instance type present in your compute offering''’ vm_type='m1.small' reservation = myimage.run (instance_type=vm_type,security_groups=['default'] )
  • 13. • Join the discussion on the future of the EC2/S3 compatibility of CloudStack cloudstack-dev@incubator.apache.org #cloudstack on irc.freenode.net @CloudStack on Twitter