Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

2009.11.20 BPstudy#27 Amazon Web Service

2,719 views

Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

2009.11.20 BPstudy#27 Amazon Web Service

  1. 1. Amazon Web Service 20 Nov 2009 ShakeSoul, Inc.
  2. 2. • • Amazon EC2 • AWS • • Elastic Load Balanceing • Cloud Watch • AWS • Auto Scaling • boto • • Amazon EC2 • S3 doc. ver. 1.0 2 ShakeSoul, Inc.
  3. 3. • ID : d_sea • , Twitter, Facebook(http://www.facebook.com/fukami) • • 1999-2002 : NTT • 2002-2006 : IRI/BBTower(IDC) • 2007-2009.01: 3D “meet-me” • 2009.02- : (shakesoul.net) • • AWS PM • : 3 Amazon EC2/S3 doc. ver. 1.0 3 ShakeSoul, Inc.
  4. 4. AWS 2009 AWS 2 ing, 3 Amazon EC2 5 mixi Amazon EC2 ShakeSoul 7 Web Amazon EC2 LAMP 11 mixi Amazon EC2 ShakeSoul doc. ver. 1.0 4 ShakeSoul, Inc.
  5. 5. • AWS • Amazon w • • doc. ver. 1.0 5 ShakeSoul, Inc.
  6. 6. AWS • : • DropBox, Tumblr, Evernote, Animoto, SlideShare, etc... • : • Preferred Infrastructure • • mixi Amazon EC2 • IDC OS • CTC : VMware • IDC : Hyper-V Windows OS • SIer ( ) • 2010 AWS • http://aws.amazon.com/about-aws/whats-new/2009/11/12/aws-asia/ • “.. multiple Availability Zones in Singapore in the first half of 2010, then in other Availability Zones within Asia over the second half of 2010.” doc. ver. 1.0 6 ShakeSoul, Inc.
  7. 7. AWS • Static NAT(1:1) • AWS Private address • DHCP address • DNS AWS Private address AWS (Internet) • private/global address FQDN(Public DNS, Private DNS) doc. ver. 1.0 7 ShakeSoul, Inc.
  8. 8. ( ) Internet Amazon Web Service external Router/ DNS Elastic Load Balancing 1:1 NAT internal DHCP Server DNS security security security security group group group group instance instance instance instance doc. ver. 1.0 8 ShakeSoul, Inc.
  9. 9. demo • • $ ec2-describe-instances • $ host ec2-75-101-180-166.compute-1.amazonaws.com • $ ssh -i Dropbox/AmazonAWS/EC2/1st-key-pair.pem root@ec2-75-101-180-166.compute-1.amazonaws.com • # host ec2-75-101-180-166.compute-1.amazonaws.com doc. ver. 1.0 9 ShakeSoul, Inc.
  10. 10. Security Group • Internet => instance filter • TCP/UDP/ICMP, Port , Source IP address • instance => Ineternet any • AWS • • Security Group Security Group • default group : key doc. ver. 1.0 10 ShakeSoul, Inc.
  11. 11. demo • Amazon Management Console Security Group doc. ver. 0.1 11 ShakeSoul, Inc.
  12. 12. Linux • NTP • http://developer.amazonwebservices.com/connect/ thread.jspa?messageID=50437 • “We use NTP to synchronise all our servers. I believe that the EC2 time inside instances is actually sourced from the host machine (there's some Xen setting for this which escapes me at the moment).” • sshd.conf PermitRootLogin without-password • NIC 1 doc. ver. 1.0 12 ShakeSoul, Inc.
  13. 13. demo • ntpdate • sshd.conf • ifconfig doc. ver. 1.0 13 ShakeSoul, Inc.
  14. 14. Amazon S3 • S3 URL • expire time Good • S3 Organizer GUI • CDN • 1 : 10TB, 21GB, 784 • CDN L : 35 (35 /GB ) • S3 : Data Transfer-In: 1TB Trunsfer-Out: 10TB : 19 doc. ver. 1.0 14 ShakeSoul, Inc.
  15. 15. demo • S3 Organizer GUI URL • URL • permission doc. ver. 1.0 15 ShakeSoul, Inc.
  16. 16. Amazon EC2 • Elastic Load Balancing • Cloud Watch • Auto Scaling doc. ver. 1.0 16 ShakeSoul, Inc.
  17. 17. Elastic Load Balancing • L4 • Good • Laod Balancer Apache proxy L7 • LVS VIP doc. ver. 1.0 17 ShakeSoul, Inc.
  18. 18. demo •2 •1 httpd doc. ver. 1.0 18 ShakeSoul, Inc.
  19. 19. Cloud Watch • CPU Disk / Network In/Out • 1 • Auto Scaling • 2 • doc. ver. 1.0 19 ShakeSoul, Inc.
  20. 20. demo • Amazon Management Console doc. ver. 1.0 20 ShakeSoul, Inc.
  21. 21. Auto Scaling • Cloud Watch • / • 10000 • • doc. ver. 1.0 21 ShakeSoul, Inc.
  22. 22. Auto Scaling • 1 1 • • as-create-auto-scaling-group --load-balancers Elastic Load Balancing doc. ver. 1.0 22 ShakeSoul, Inc.
  23. 23. demo • • 1 • --load-balancers • • Elastic Load Balancing doc. ver. 1.0 23 ShakeSoul, Inc.
  24. 24. boto • http://code.google.com/p/boto/ • python AWS API • snapshot.py EBS Good doc. ver. 1.0 24 ShakeSoul, Inc.
  25. 25. snapshot.py #!/usr/bin/env python      import sys   from boto.ec2.connection import EC2Connection      if(len(sys.argv) != 3):       print "Usage: snapshot.py <num> <volume-id>"       quit()      conn = EC2Connection('aws_access_key',' aws_secret_access_key');   conn.create_snapshot(sys.argv[2])   snapshot = {}   for x in conn.get_all_snapshots():       if(x.volume_id == sys.argv[2]):           tmp = {x.id:x.start_time}           snapshot.update(tmp)   snapshot = sorted(snapshot.items(), key=lambda (k, v): (v, k), reverse=True)   for i in range(int(sys.argv[1]), len(snapshot)):       conn.delete_snapshot(snapshot[i][0])  doc. ver. 1.0 25 ShakeSoul, Inc.
  26. 26. demo • snapshot.py •3 • # python snapshot.py 3 vol-dd50a9b4 • $ ec2-describe-snapshots doc. ver. 1.0 26 ShakeSoul, Inc.
  27. 27. Amazon EC2 • Elastic Load Balancing L4 • MySQL EBS • boto - snapshot.py 1 / • 1 AMI • S3 • AMI • AMI • CloudFront ( 3.2Mbps => 18.4Mbps) doc. ver. 1.0 27 ShakeSoul, Inc.
  28. 28. Thank You!! Any Questions? doc. ver. 1.0 28 ShakeSoul, Inc.

×