Upload
doanlien
View
238
Download
0
Embed Size (px)
Citation preview
OpenStack in der Praxis
B1 Systems GmbH
http://www.b1-systems.de
c© B1 Systems GmbH 2006 � 2011 Chapter -1, Slide 1
Gründe für eine OpenSource Cloudlösung
Open Source: Entwicklung eines Standards
Open Design: Eliminierung von Vendor Lock-In, Interobilitätzwischen Clouds, Umzug und Zusammenlegung von Clouds
Open Development: mehr Teilnehmer, schnellere Entwicklung
c© B1 Systems GmbH 2006 � 2011 Chapter 0, Slide 4
Gründer und Community
Rackspace
Hosting, spezialisiert auf Cloudhosting
NASA
Raumfahrtbehörde der USA
Community
> 150 aktive Entwickler in der Community
> 50 Firmen unterstützen das Projekt
c© B1 Systems GmbH 2006 � 2011 Chapter 1, Slide 6
Geschichte
März 2010: Rackspace entscheidet Cloud Software alsOpenSource freizugeben
Mai 2010: Nasa gibt Nebula als OpenSource frei
Juni 2010: Nasa und Rackspace gründen OpenStack
Juli 2010: erster ö�entlicher Design Summit in Austin, TX
Oktober 2010: Austin - erstes OpenStack Release
Februar 2011: Bexar Release
14. April 2011: Cactus Release
c© B1 Systems GmbH 2006 � 2011 Chapter 1, Slide 7
OpenStack - die Mission
To produce the ubiquitous Open Source cloud computing
platform that will meet the needs of public and private
cloud providers regardless of size, by being simple to
implement and massively scalable.
OpenStack Mission Statement:http://openstack.org/projects/openstack-faq/
c© B1 Systems GmbH 2006 � 2011 Chapter 1, Slide 8
Prinzipien
Open Source: Apache 2.0 Lizenz, kein Open-Core Modell,keine Enterprise Version
Open Design: Designsummit alle 6 Monate, jeder kannBlueprints einreichen
Open Development: o�enes SourceCode-Repo, LaunchpadProjekthosting, O�ene Code Reviews, modulares Design
Open Community: Diskussionen auf ö�entlichen Kanälen,Transparenz der Entscheidungen,gute Dokumentation
c© B1 Systems GmbH 2006 � 2011 Chapter 1, Slide 9
Nova und Swift
OpenStack besteht momentan aus 2 Hauptprojekten.
Compute aka. Nova - ist der von der Nasa eingebrachteInfrastruktur-Verwaltungs-Teil der die Bereitstellung von VMs aufStandard Hardware bei maximaler Skalierbarkeit verwalten soll.
Object Storage aka. Swift - ist der von Rackspace aus Cloud Fileshervorgegangene Storage Dienst, der zuverlässig und skalierbarMilliarden an Objekten auf Standardhardware bereitstellen soll.
c© B1 Systems GmbH 2006 � 2011 Chapter 2, Slide 10
OpenStack Object Storage aka. Swift
Object Storage - keine Blockdevices
vollständig modular - massiv skalierbar
REST Interface
keine Gröÿenlimits
stabil für Produktiveinsatz
automatische Redundanz und Failover kein SPOF
Standardhardware Raid nicht nötig
c© B1 Systems GmbH 2006 � 2011 Chapter 2, Slide 11
OpenStack Object Storage - Swift - Aufbau
Komponenten
Proxy Server Zugang von Aussen
Storage Server Accounts, Container, Objekte
Tool Server Updater, Auditor ...
Funktionsweise
Objekte in Ringen Zuordnung von Namen <> StorageObjekten
Availibility Zones Aufteilung gegen Hardwareausfall
Rsync Replikation
SQLlite
xattr's
c© B1 Systems GmbH 2006 � 2011 Chapter 2, Slide 12
OpenStack Compute - Nova
Erstellung und Verteilung von VMs
EC2 und OpenStack API
schnelle Entwicklung
gute Skalierbarkeit
c© B1 Systems GmbH 2006 � 2011 Chapter 2, Slide 13
Hardwareauswahl Compute und Swift
Compute
Standard x86 Server
�exible Speicherkon�guration (lokal, SAN, NAS ..)
ObjectStorage
Standard x86 Server
lokale Platten, kein Raid
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 17
Node Deployment
Hardwarebereitstellung(Server, Netzwerk, Strom)
Remote Management(ILO, IPMI, etc ...)
Netzwerkverbindung(statisch oder DHCP)
Betriebssysteminstallation(Preseed, Kickstart, autoYaST)
Kon�guration(puppet, chef, cfengine)
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 18
Betriebssystemkon�guration in den VMs
vorkon�gurierte Images
Kon�gurationsmanagement(puppet, chef, cfengine)
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 19
Benutzermanagement
Users public und secret Key pro Benutzer
Role based Access Admin, NetAdmin, ProjectMan ...
Projekte jeweils VLANs, Volumes, Quotas, Instances, Images,Keys ...
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 20
Netzwerk
Flat Modus
Flat Modus mit DHCP
VLAN Modus mit DHCP
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 21
Netzwerkzugri�
Securitygroups
Sammlung von Nezwerkregeln
Gruppenänderungen werden sofort umgesetzt für alle laufendenVMs
Cloudpipe VPN
Standard Image mit Linux und OpenVPN
Projektbasierter VPN Tunnel in das VLAN des Projekts
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 22
Paketierung
Entwicklung im Launchpad
basiert auf Ubuntu 10.04 LTS
alternative Repos für Redhat und Fedora
Buildservice Repo für SLES11 SP1
http://download.opensuse.org/repositories/
isv:/B1-Systems:/OpenStack/SLE_11_SP1/
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 23
Evaluierung
auf Ubuntu 10.04 LTS (oder latest in 11.04)
Dokumentation auf docs.openstack.org (wiki, irc)
SLES 11 SP1 per Whitepaper
Whitepaper unter www.B1-Systems.de/whitepaper
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 24
Sizing
Compute Node
4GB Ram per Core
viele CPUs / Cores
Storage Node
2GB Ram per Core
viele HDDs
c© B1 Systems GmbH 2006 � 2011 Chapter 3, Slide 25
Nova - vom API-Call zur VM
Nova - vom API-Call zur VM
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 27
Nova - User- und Projektmanagement
# nova-manage user admin tux
export EC2_ACCESS_KEY=51d36ba0-fab4-4c3f-a904-7e449679bcb9
export EC2_SECRET_KEY=808808c4-7b0b-463c-88f1-6aaf8d3ba572
# nova-manage project create tuxproject tux
# nova-manage network create 192.168.3.0/24 1 255
# nova-manage project zipfile tuxproject tuxuser ~
# unzip creds.zip
Archive: creds.zip
Extracting: novarc
extracting: pk.pem
Extracting: cert.pem
extracting: cacert.pem
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 29
Nova - Instanzierungsanforderung
Der Benutzer fordert per EC2 Schnittstelle neue virtuelle Instanzenvon Nova-Api an.Per Kommando:
euca-run-instances ami-8yiqs0tz -t m1.tiny -k tuxkey -n 20
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 31
Nova - Authenti�zierungsprozess
Nova-Api klärt lokal mit Nova-Auth ab ob der User berechtigt ist dieCalls abzusetzen. Nova-Auth versichert sich Bei einem Auth-Providerwie LDAP oder SQL.cat /var/log/nova/api.log:
2011-03-08 15:46:27,553 DEBUG
nova.auth.manager [-] Looking up user:
u'3df6cde4-eac8-441b-90d9-e2a2260af940'
from (pid=9513) authenticate
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 33
Nova - Weiterleitung an Scheduler
Nova-Api schickt nun die Requests Für die einzelnen Komponentenwie Compute, Network und Volume per AMQP an den Scheduler.cat /var/log/nova/api.log:
2011-03-08 15:46:27,819
DEBUG nova.compute.api [-]
Going to run 2 instances...
from (pid=9513) create
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 35
Nova - Schedulerkommunikation
Der Scheduler wählt einen Compute Node aus und startet dort dieRessourcen von Nova-Compute und Nova-Network.cat /var/log/nova/scheduler.log:
2011-03-08 15:52:00,377
DEBUG nova.scheduler.manager [-]
Casting to compute bsa5956
for run_instance from (pid=8554)
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 37
Nova - Imageübertragung aus dem Objectstore
Nova-Compute bezieht das richtige Image für die Inszanz direkt vomObjectstore per http. Er startet dann die Instanz und hängt das rootVolume ein.cat /var/log/nova/compute.log:
2011-03-08 15:52:00,477 AUDIT
nova.compute.manager
[EL86WO-3XLF0FLAQ5ODL admin tux]
instance 842: starting...
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 39
Nova - Netzwerkinitialisierung
Nova-Network kümmert sich um die Zuweisung von IP-Adressen undggf. das Anlegen von VLANs
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 41
OpenStack Object Storage - Swift - Aufbau
Object Storage
massiv skalierbar
automatisch Replikation und Fehlerhandling
nothing shared Architektur
scale in / out
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 43
OpenStack Object Storage - Swift - Aufbau
Bestandteile
Proxy Server Zugang von Aussen
Account Server Liste der Container Objekte in SQLLite
Container Server Liste der Objects Objekte in SQLLite
Object Server Speicherung der Objekte
der Ring Zuordnung von Namen <> Storage Objekten
Replikation Konsistenz und Fehlerbehandlung
Updater abgebrochene oder wartende Updates behandeln
Auditor Integritätsprüfung von Storage Objekten
c© B1 Systems GmbH 2006 � 2011 Chapter 4, Slide 44
Ausblick
geplant für Cactus Release:
Compute - Livemigration
Compute - OpenStack API 1.1 (EC2 weiterhin supported)
Compute - LXC Support
Compute - userfriendly Names
ObjectStorage - Einführung von Verbrauchsstatistiken
ObjectStorage - ACL Support
ObjectStorage - Performancegewinne
Glance - neue Kommandozeileninterface
Glance - Support für mehr Containerformate
c© B1 Systems GmbH 2006 � 2011 Chapter 5, Slide 48
weitere OpenStack Projekte
Core-Projekte:
Glance Image Service
Entwicklungs-Projekte:
OpenStack dashboard
Burrow - neuer Message Bus
Projekte um OpenStack:
Deployment Tools
Mobile Phone Clients
c© B1 Systems GmbH 2006 � 2011 Chapter 5, Slide 49