SlideShare ist ein Scribd-Unternehmen logo
Tech Talk: Cloud Computing Roland Gude, DLR Simulations- und Softwaretechnik 25. März 2008
Gliederung Einführung Übersicht über Amazon Webservices Beispiel
Einführung Cloud Computing Dynamische Cluster nutzen der Amazon Infrastructure (Web Services) Virtuelle Maschinen (eigene Images) verteilt und parallel Skalierbar (auch automatisch)
AWS Überblick EC2: Elastic Cloud Computing S3: Simple Storage Service SQS: Simple Queue Service SimpleDB
EC2: Elastic Cloud Computing Verwalten virtueller Maschinen Amazon Machine Image (AMI) Tools zum erstellen von AMI Starten/stoppen von AMI Instanzen Small: 1,7 GB RAM, 1 EC2 Compute Unit* 160 GB „platte“, 32-Bit Platform ($0.10/h) Large: 7,5 GB RAM, 4 EC2 Compute Units 850 GB „platte“, 64-Bit Platform ($0.40/h) Extra Large: 15 GB RAM, 8 EC2 Compute Units 1690 GB „platte“, 64-Bit Platform ($0.80/h) * EC2 Compute Unit etwa 1.0 – 1.2 GHz 2007 Opteron oder Xeon
S3: Simple Storage Service Buckets (USA oder Europa – Preisunterschied!) Speichern von Objekten UUID Jeweils 1 Byte bis 5 GB Anzahl unbegrenzt z.B. Speichern der AMI EC2 Instanzen haben keinen persistenten Speicher Logs, Ergebnise etc Download via HTTP/Bittorrent
S3 Preise United States (Europa) Storage $0.15 ($0.18) pro GB pro Monat Data Transfer $0.10 pro GB In $0.18 pro GB out (ersten 10 TB) $0.16 pro GB out (nächsten 40 TB) $0.13 pro GB out (über 50 TB) $0.00 (wie normal) EC2 Requests $0.01 ($0.012) pro 1000 PUT oder LIST $0.01 ($0.012) pro 10000 andere Requests (außer DELETE)
SQS: Simple Queue Service Erstellen von Message Queues Verteilen von Tasks Anzahl Queues unbegrenzt Anzahl Nachrichten unbegrenzt Nachrichten Größe bis zu 8 KB Requests $0.01 pro 10000 Requests Data Transfer Wie S3
SimpleDB (Limited Beta) Speichern strukturierter Daten Domain Items (Attribute/Values) Anzahl Domains unbegrenzt Anzahl Items pro Domain unbegrenzt 256 Attribute pro Item Value: 1 Byte bis 1024 Byte Kein Schema Query Operatoren: =, !=, <, >, <=, >=, STARTS-WITH, AND, OR, NOT, INTERSECTION, UNION Preis: $0.14 pro Stunde Maschinennutzung (wird gemessen, normalisiert auf 1 EC2 Compute Unit) Data Transfer wie S3 (plus Overhead 45 Byte pro Item und Attribut)
Cloud Computing mit Boto Boto Python library (andere libraries verfügbar) Boto = Delphinart im Amazonas Vorher: Generieren von SSH Keypair Erstellen von AMI (standards existieren) Keys/Certificates (AWS Homepage) AWS Access Key (login) AWS Secret Access Key (login) Amazon Account nummer (rechte) X.509 Zertifikat (bundling von AMI)
Login und Öffentlicher Zugriff >>> from boto.ec2.connection import EC2Connection >>> conn = EC2Connection(aws_access_key, aws_secret_key) >>> key_pair = conn.create_key_pair(‚mein_key_pair_name‘) >>> #privater key: >>> print key_pair.material … (speichern, chmod 600)
Images und Instanzen >>> images = conn.get_all_images() […] # lange Liste >>> for i, image in enumerate(images) …  if image.location.startswith(‚ec2-public-images‘): …  print „%s, %s“%(i, image.location) 22, ec2-public-images/fedora-core4-base.manifest.xml … 159, ec2-public-images/getting-started.manifest.xml (nummern variieren)
Images und Instanzen >>> image = images[22] >>> print image.location ec2-public-images/getting-started.manifest.xml >>> reservation = image.run(key_name=‚my_key_pair_name‘) >>> instance.state u‘pending‘ Warten >>> instance.update() >>> instance.state u‘running‘
Images und Instanzen >>> instance.stop() >>> instance.update() >>> instance.state() u‘shutting down‘ Warten >>> instance.update() >>> instance.state u‘terminated‘
IP-Adressen Public (von außen erreichbar) Private (nur innerhalb AWS) Zusätzlich Domain namen (public/private) >>> print instance.dns_name ec2-72-44-40-153.z-2.compute-1.amazonaws.com >>> print instance.private_dns_name domU-12-31-35-00-53-14.z-2.compute-1.internal
Firewall Nutzerdefinierte Security Groups Bis zu 100 Regeln pro Gruppe >>> rs = conn.get_all_security_groups() >>> print rs [SecurityGroup:default] >>> default = rs[0] Neue regel: >>> default.authorize(‚tcp‘, 80, 80, ‚0.0.0.0/0‘) Regel löschen >>> default.revoke(‚tcp‘, 80, 80, ‚0.0.0.0/0‘)
Firewall Neue Gruppe >>> web_test = conn.create_security_group(‚web_test‘, ‚testdescription‘) >>> web_test.authorize(‚tcp‘, 80, 80, ‚0.0.0.0/0‘) >>> web_test.authorize(‚tcp‘, 22, 22, ‚0.0.0.0/0‘) Verbinden mit ssh Ssh –i <pfad zum private key> root@PUBLIC_DNS_NAME
AMI erstellen Rechner installieren/konfigurieren (kann auch virtuelle Maschine sein) AMI Tools installieren X.509 Zertifikat kopieren (Public Image als Basis) ec2-bundle-vol –d <exclude pfad> -k <pfad zum key> -c <pfad zum zertifikat> Erzeugt viele dateien… AMI hochladen Ec2-upload-bundle –b <bucket_name> -m <pfad zum manifest> -a <aws-access-key> -s <aws-secret-access-key>
Eigenes AMI nutzen >>> from boto.s3.connection import S3COnnection >>> conn = S3Connection(aws_key, aws_secret_key) >>> rs = conn.get_all_buckets() >>> bucket = rs[0] # oder wo auch immer das AMI liegt >>> id = conn.register_image(bucket.name + ‚/image.manifest.xml‘) >>> for i, image in enumerate(images) …  if image.id = id …  print i 186 >>> image = image[186]

Weitere ähnliche Inhalte

PDF
JavaScript Performance
PDF
JavaScript Performance
PDF
Go - Googles Sprache für skalierbare Systeme
PDF
Spaß an der Nebenläufigkeit
PDF
Cloud Provisioning mit Juju
PDF
Cloud Computing
PDF
Amazon EMR Grundlagen
PDF
2012-01-31 NoSQL in .NET
JavaScript Performance
JavaScript Performance
Go - Googles Sprache für skalierbare Systeme
Spaß an der Nebenläufigkeit
Cloud Provisioning mit Juju
Cloud Computing
Amazon EMR Grundlagen
2012-01-31 NoSQL in .NET

Andere mochten auch (18)

PPT
Gardening With Dad
PPTX
Asgard and the aws cloud
PPT
Youth World Cafe Weekend Away
PPT
Fbu this is ph summer 10
PPT
Surveillance Summary
PDF
Presentazione seminario conclusivo progetto "Il portfolio del docente"
PPT
Dub’S Birthday
PPT
Rbc July 1 Part1
PPT
Rbc July 1 Part Ii
PPTX
Vacation slide show
KEY
Film & Theology
PPT
Danceuponinjustice
PPT
Altworship talk
PPT
Rbc Slideshow 2
PPT
Rbc
PPT
Photovoice through the life span samples
PPT
Friut med
PPTX
Are we equal assembly
Gardening With Dad
Asgard and the aws cloud
Youth World Cafe Weekend Away
Fbu this is ph summer 10
Surveillance Summary
Presentazione seminario conclusivo progetto "Il portfolio del docente"
Dub’S Birthday
Rbc July 1 Part1
Rbc July 1 Part Ii
Vacation slide show
Film & Theology
Danceuponinjustice
Altworship talk
Rbc Slideshow 2
Rbc
Photovoice through the life span samples
Friut med
Are we equal assembly
Anzeige

Tech Talk: Cloud Computing

  • 1. Tech Talk: Cloud Computing Roland Gude, DLR Simulations- und Softwaretechnik 25. März 2008
  • 2. Gliederung Einführung Übersicht über Amazon Webservices Beispiel
  • 3. Einführung Cloud Computing Dynamische Cluster nutzen der Amazon Infrastructure (Web Services) Virtuelle Maschinen (eigene Images) verteilt und parallel Skalierbar (auch automatisch)
  • 4. AWS Überblick EC2: Elastic Cloud Computing S3: Simple Storage Service SQS: Simple Queue Service SimpleDB
  • 5. EC2: Elastic Cloud Computing Verwalten virtueller Maschinen Amazon Machine Image (AMI) Tools zum erstellen von AMI Starten/stoppen von AMI Instanzen Small: 1,7 GB RAM, 1 EC2 Compute Unit* 160 GB „platte“, 32-Bit Platform ($0.10/h) Large: 7,5 GB RAM, 4 EC2 Compute Units 850 GB „platte“, 64-Bit Platform ($0.40/h) Extra Large: 15 GB RAM, 8 EC2 Compute Units 1690 GB „platte“, 64-Bit Platform ($0.80/h) * EC2 Compute Unit etwa 1.0 – 1.2 GHz 2007 Opteron oder Xeon
  • 6. S3: Simple Storage Service Buckets (USA oder Europa – Preisunterschied!) Speichern von Objekten UUID Jeweils 1 Byte bis 5 GB Anzahl unbegrenzt z.B. Speichern der AMI EC2 Instanzen haben keinen persistenten Speicher Logs, Ergebnise etc Download via HTTP/Bittorrent
  • 7. S3 Preise United States (Europa) Storage $0.15 ($0.18) pro GB pro Monat Data Transfer $0.10 pro GB In $0.18 pro GB out (ersten 10 TB) $0.16 pro GB out (nächsten 40 TB) $0.13 pro GB out (über 50 TB) $0.00 (wie normal) EC2 Requests $0.01 ($0.012) pro 1000 PUT oder LIST $0.01 ($0.012) pro 10000 andere Requests (außer DELETE)
  • 8. SQS: Simple Queue Service Erstellen von Message Queues Verteilen von Tasks Anzahl Queues unbegrenzt Anzahl Nachrichten unbegrenzt Nachrichten Größe bis zu 8 KB Requests $0.01 pro 10000 Requests Data Transfer Wie S3
  • 9. SimpleDB (Limited Beta) Speichern strukturierter Daten Domain Items (Attribute/Values) Anzahl Domains unbegrenzt Anzahl Items pro Domain unbegrenzt 256 Attribute pro Item Value: 1 Byte bis 1024 Byte Kein Schema Query Operatoren: =, !=, <, >, <=, >=, STARTS-WITH, AND, OR, NOT, INTERSECTION, UNION Preis: $0.14 pro Stunde Maschinennutzung (wird gemessen, normalisiert auf 1 EC2 Compute Unit) Data Transfer wie S3 (plus Overhead 45 Byte pro Item und Attribut)
  • 10. Cloud Computing mit Boto Boto Python library (andere libraries verfügbar) Boto = Delphinart im Amazonas Vorher: Generieren von SSH Keypair Erstellen von AMI (standards existieren) Keys/Certificates (AWS Homepage) AWS Access Key (login) AWS Secret Access Key (login) Amazon Account nummer (rechte) X.509 Zertifikat (bundling von AMI)
  • 11. Login und Öffentlicher Zugriff >>> from boto.ec2.connection import EC2Connection >>> conn = EC2Connection(aws_access_key, aws_secret_key) >>> key_pair = conn.create_key_pair(‚mein_key_pair_name‘) >>> #privater key: >>> print key_pair.material … (speichern, chmod 600)
  • 12. Images und Instanzen >>> images = conn.get_all_images() […] # lange Liste >>> for i, image in enumerate(images) … if image.location.startswith(‚ec2-public-images‘): … print „%s, %s“%(i, image.location) 22, ec2-public-images/fedora-core4-base.manifest.xml … 159, ec2-public-images/getting-started.manifest.xml (nummern variieren)
  • 13. Images und Instanzen >>> image = images[22] >>> print image.location ec2-public-images/getting-started.manifest.xml >>> reservation = image.run(key_name=‚my_key_pair_name‘) >>> instance.state u‘pending‘ Warten >>> instance.update() >>> instance.state u‘running‘
  • 14. Images und Instanzen >>> instance.stop() >>> instance.update() >>> instance.state() u‘shutting down‘ Warten >>> instance.update() >>> instance.state u‘terminated‘
  • 15. IP-Adressen Public (von außen erreichbar) Private (nur innerhalb AWS) Zusätzlich Domain namen (public/private) >>> print instance.dns_name ec2-72-44-40-153.z-2.compute-1.amazonaws.com >>> print instance.private_dns_name domU-12-31-35-00-53-14.z-2.compute-1.internal
  • 16. Firewall Nutzerdefinierte Security Groups Bis zu 100 Regeln pro Gruppe >>> rs = conn.get_all_security_groups() >>> print rs [SecurityGroup:default] >>> default = rs[0] Neue regel: >>> default.authorize(‚tcp‘, 80, 80, ‚0.0.0.0/0‘) Regel löschen >>> default.revoke(‚tcp‘, 80, 80, ‚0.0.0.0/0‘)
  • 17. Firewall Neue Gruppe >>> web_test = conn.create_security_group(‚web_test‘, ‚testdescription‘) >>> web_test.authorize(‚tcp‘, 80, 80, ‚0.0.0.0/0‘) >>> web_test.authorize(‚tcp‘, 22, 22, ‚0.0.0.0/0‘) Verbinden mit ssh Ssh –i <pfad zum private key> root@PUBLIC_DNS_NAME
  • 18. AMI erstellen Rechner installieren/konfigurieren (kann auch virtuelle Maschine sein) AMI Tools installieren X.509 Zertifikat kopieren (Public Image als Basis) ec2-bundle-vol –d <exclude pfad> -k <pfad zum key> -c <pfad zum zertifikat> Erzeugt viele dateien… AMI hochladen Ec2-upload-bundle –b <bucket_name> -m <pfad zum manifest> -a <aws-access-key> -s <aws-secret-access-key>
  • 19. Eigenes AMI nutzen >>> from boto.s3.connection import S3COnnection >>> conn = S3Connection(aws_key, aws_secret_key) >>> rs = conn.get_all_buckets() >>> bucket = rs[0] # oder wo auch immer das AMI liegt >>> id = conn.register_image(bucket.name + ‚/image.manifest.xml‘) >>> for i, image in enumerate(images) … if image.id = id … print i 186 >>> image = image[186]