X1 Dev Club - Amazon EC2 et al.

  • 712 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
712
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
3
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Облачные амазонки и др. X1 Dev Девелоперы 1шт. gmail.comSerge.Kovaleff @ linkedin.com facebook.com
  • 2. Цели● Ознакомиться с облаками и пр. белокрылыми ромашками● Понять облачный тренд● Поместить облака и конкретно Амазон в свою картину мира● Возможно, узнать пикантные подробности
  • 3. План● Откуда есть и пошел Амазон как СааС● SaaS, IaaS, PaaS, ...aaS?● Что нам Зе Вендор сулит● Куски Питона● Куски Баша (не Орг)● Подводные камни
  • 4. Что такое SaaS?
  • 5. Grids ... Clouds ...Virtualization!
  • 6. ... aaS
  • 7. Письмо CEO "then-new U.S. Supreme Court ruling [that] online retailers dont have to collect sales taxes in states where they lack a physical presence" "You can do the math 15 different ways, and every time the math tells you that you shouldn’t lower prices because you’re going to make less money. That’s undoubtedly true in the current quarter, in the current year. But it’s probably not true over a 10-year period, when the benefit is going to increase the frequency with which your customers shop with you, the fraction of their purchases they do with you as opposed to other places. Their overall satisfaction is going to go up." Bezos indicated that he founded the space company to help enable "anybody to go into space"Jeffrey P. BezosFounder and Chief Executive OfficerAmazon.com, Inc.
  • 8. ● Amazon AWS Authentication, an implicit service, the authentication infrastructure used to authenticate access to the various services.● Amazon CloudFront, a content delivery network (CDN) for distributing objects to so-called "edge locations" near the requester.● Amazon CloudSearch provides basic full text search and indexing of textual content.● Amazon CloudWatch, provides monitoring for AWS cloud resources and applications, starting with EC2.● Amazon DevPay, currently in limited beta version, is a billing and account management system for applications that developers have built atop Amazon Web Services.● Amazon DynamoDB (DynamoDB} provides a scalable, low-latency NoSQL online Database Service.● Amazon Elastic Beanstalk provides quick deployment and management of applications in the cloud.● Amazon Elastic Block Store (EBS) provides persistent block-level storage volumes for EC2.● Amazon Elastic Compute Cloud (EC2) provides scalable virtual private servers using Xen.● Amazon Elastic MapReduce allows businesses, researchers, data analysts, and developers to easily and cheaply process vast amounts of data. It uses a hosted Hadoop framework running on the web-scale infrastructure of EC2 and Amazon S3.● Amazon ElastiCache provides in-memory caching for web applications.● Amazon Flexible Payments Service (FPS) provides an interface for micropayments.● Amazon Fulfillment Web Service provides a programmatic web service for sellers to ship items to and from Amazon using Fulfillment by Amazon.● Amazon Glacier, Provides a very low cost storage option based on its S3 storage solution. High redundancy and availability, but high access times. Ideal for archiving data.● Amazon Historical Pricing provides access to Amazons historical sales data from its affiliates. (It appears that this service has been discontinued.)● Amazon Mechanical Turk (Mturk) manages small units of work distributed among many humans.● Amazon Product Advertising API formerly known as Amazon Associates Web Service (A2S) and Amazon E-Commerce Service (ECS), provides access to Amazons product data and electronic commerce functionality.● Amazon Relational Database Service (RDS) provides a scalable database server with MySQL and Oracle support.● Amazon Route 53 provides a highly available and scalable Domain Name System (DNS) web service.● Amazon Simple Email Service (SES) provides bulk and transactional email sending.● Amazon Simple Storage Service (S3) provides Web Service based storage.● Amazon Simple Queue Service (SQS) provides a hosted message queue for web applications.● Amazon Simple Notification Service (SNS) provides a hosted multiprotocol "push" messaging for web applications.● Amazon Simple Workflow (SWF) is a workflow service for building scalable, resilient applications.● Amazon SimpleDB, allows developers to run queries on structured data. It operates in concert with EC2 and S3 to provide "the core functionality of a database."● Amazon Virtual Private Cloud (VPC) creates a logically isolated set of Amazon EC2 instances which can be connected to an existing network using a VPN connection.● AWS CloudFormation, create a collection of related AWS resources and provision them in an orderly and predictable fashion.● AWS Import/Export, accelerates moving large amounts of data into and out of AWS using portable storage devices for transport.● AWS Management Console (AWS Console), A web-based point and click interface to manage and monitor the Amazon infrastructure suite including EC2, EBS, Amazon Elastic MapReduce, and Amazon CloudFront.● AWS Storage Gateway, an iSCSI block storage appliance with cloud-based backup.
  • 9. Top 5 3 Амазонских Сервиса● Elastic Compute Cloud (EC2)● Elastic Block Store (EBS)● Simple Storage Service (S3)● Simple Email Service (SES)● DynamoDB
  • 10. Elastic Compute Cloud
  • 11. Elastic Compute Cloud● hiring a server running at a remote location● virtualized server instances as Amazon Machine Images (AMI)● details on the instance types http://aws.amazon.com/ec2/instance-types/ http: //aws.amazon.com/ec2/#instance● pre-configured AMIs● attach to an IP called the Elastic IP● dynamic capability of launching multiple instances of the same AMIs to scale up and terminating them to scale down● One EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor● Service Level Agreement commitment is 99.95% availability● Regions: US East (Northern Virginia), US West (Oregon), US West (Northern California), EU (Ireland), Asia Pacific (Singapore), Asia Pacific (Tokyo), South America (Sao Paulo), and AWS GovCloud.
  • 12. EC2 алгоритм● choose a pre-configured AMI● launch that AMI● customize it by adding additional software and/or by loading an app● save that AMI as your custom AMI on S3● launch multiple instances● ... profit )
  • 13. Подробнее о Типах● First generation (M1) Standard● Second generation (M3) Standard● Micro instances (t1.micro)● High-Memory Instances● High-CPU Instances● Cluster Compute Instances● Cluster GPU Instances● High I/O Instances● EBS-Optimized Instances● Reserved Instances● Spot Instances● Dedicated Instances
  • 14. Elastic Block Store
  • 15. Elastic Block Store● volumes are network-attached● persist independently from the life of an instance● highly available, highly reliable● as instance’s boot partition● attached to a running Amazon EC2 instance as a standard block device● improved durability over local Amazon EC2 instance stores● automatically replicated on the backend (in a single Availability Zone)● ability to create point-in-time consistent snapshots of your volumes that are then stored in Amazon S3, and automatically replicated across multiple Availability Zones● Standard volumes and Provisioned IOPS volumes
  • 16. Simple Storage Service
  • 17. Simple Storage Service● can be accessed by any application with access to the internet● can store any arbitrary data as objects accompanied by metadata● organized into buckets● permissions defined in the Access Control List (ACL)● object can be 5GB in size while the metadata can be up to 2KB● can be accessed using simple REST or SOAP calls
  • 18. Mighty Python1. % git clone https://github.com/boto/boto2. % cd boto3. % sudo python setup.py install4. >>> import boto5. >>> ec2 = boto.connect_ec2 (aws_access_key_id=my_access_key,6. aws_secret_access_key=my_secret_key)
  • 19. Quick test1. >>> import boto2. >>> ec2 = boto.connect_ec2()3. >>> ec2.get_all_zones()4. [Zone:us-east-1a, Zone:us-east-1b, Zone:us-east-1c, Zone: us-east-1d]
  • 20. Universal bash1. #!/bin/bash2. export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home3. export EC2_HOME=/Users/arjan/src/ec2-api-tools-1.3-462664. export AWS_RDS_HOME=/Users/arjan/src/RDSCli-1.1.0055. export PATH="$EC2_HOME/bin:$AWS_RDS_HOME/bin:$PATH"6. export EC2_KEY_DIR=/Users/arjan/.ec27. export EC2_PRIVATE_KEY=${EC2_KEY_DIR}/pk- 4P54TBID4E42U5ZMMCIZWBVYXXN6U6J3.pem8. export EC2_CERT=${EC2_KEY_DIR}/cert-4P54TBID4E42U5ZMMCIZWBVYXXN6U6J3.pem
  • 21. Launch EC2 instance1. # create the key pair2. $ ec2-add-keypair arjan3. # create a security group called web4. $ ec2-add-group web -d All public facing web (port 80 and 443) instances5. $ ec2-authorize web -P tcp -p 22 -s 0.0.0.0/06. $ ec2-authorize web -P tcp -p 80 -s 0.0.0.0/07. $ ec2-authorize web -P tcp -p 443 -s 0.0.0.0/08. # launch an instance9. $ ec2-run-instances ami-714ba518 --instance-count 1 --instance-type m1.small --key arjan --group web
  • 22. Links● http://media.corporate-ir.net/media_files/irol/97/97664/reports/Shareholderletter97.pdf● http://retailindustry.about.com/od/frontlinemanagement/a/Amazon_CEO_Jeff_Bezos_quotes.htm● http://en.wikipedia.org/wiki/Jeff_Bezos● http://www.saasblogs.com/saas/demystifying-the-cloud-where-do-saas-paas-and-other-acronyms-fit-in/● http://en.wikipedia.org/wiki/Amazon_Web_Services● http://www.janakiramm.net/blog/overview-of-amazon-web-services● http://perfcap.blogspot.com/2011/03/understanding-and-using-amazon-ebs.html● http://blog.rightscale.com/2008/08/20/amazon-ebs-explained/● http://www.slideshare.net/AmazonWebServices/aws-tech-summit-berlin-2011-keynote● Programming Amazon EC2 by Jurg van Vliet and Flavia Paganelli, 2011● Python and AWS Cookbook by Mitch Garnaat, 2012