34
Vom Netzwerk in a Box – zum Software defined Cloud Stack

Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Embed Size (px)

DESCRIPTION

Abstract SmartOS ist ein immutable Hypervisor - der vom Netzwerk in der Box - bis ins DatenCenter skaliert. Die Vorteile von “Just Boot - no Install” kombiniert mit ZFS / DTrace / Zonen / KVM ergeben ein modernes “CloudOS” welches mit 128MB bis 256MB Ram ebenso gut umgeht, wie mit Maschinen die 512GB RAM und mehr bieten. Vortragender Michael Widmann - verwendet smartOS mit OS Level Virtualisierung ebenso wie als OS Virtualisierung im produktiven Umfeld.

Citation preview

Page 1: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Vom Netzwerk in a Box – zum Software defined Cloud Stack

Page 2: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

#whoami

● Michael – Mike Widmann ● Cofounder nimbus Development GmbH (seit 1999) ● System Architekt ● Lotus Notes Admin & Developer ● Seit 2005 Online Backup Services ● Solaris inlove von 2007 bis 2010 ● Gewitterwolken am Beziehungshimmel – Oracle / Sun – Solaris ● Seit 2011 – Beziehungswechsel – zu SmartOS

Page 3: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

#talk:milestones

● Geschichte & Übersicht● Just Boot – no Install ● Technologie Stack & Hardware Assimilierung● Global und Regional – Zonen & OS Level Virtualisierung● Mehr Durchschlagskraft – Crossbow ● Ein Mutterschiff ist zuwenig – Cloud Orchestration ● Automate & Delegate

Page 4: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Geschichte

● OpenSolaris – Sun Microsystems – seit 2005 ● Seit 2010 scheint die Sonne aus dem … von Oracle ● Illumnos: Garrett D'Amore (Ex Solaris Hacker & Fellows) ● Alle Closed Bits - „rewritten“ oder von BSD portiert.● Joyent / Delphix / Nexenta – neue Home Bases ● KVM Virtualisierung auf Solaris● 17.8.2011 - Joyent gibt Smartos OSS mit KVM Virtualisierung ● 18.8.2011 – Internes Oracle Memo – Solaris 11 Source closed

Page 5: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Der erleuchtete „Kern“

● Illumnos – based Distros – SmartOS (2 Weekly Build)

– NexentaStor (Commercial – teilweise OOS)

– OmniOS (Hardcore Solaris)

– OpenIndiana (Desktop & Server)

– XstreamOS / XstreamServer

– EON Storage

– Napp-it to GO

– OpenSXCE

– Tribblix (relativ neu – aber Solaris Veteran dahinter)

– Und weitere

Page 6: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Boot - Configure – Run without Root Pool

RUNNING

Page 7: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Nett Boot...

● USB ● CDROM ● PXE Boot

● Vorteile von PXE Boot SmartOS – Sollte ein Fix notwendig sein – kein „Patching“ - neues Image laden

– Rollback auf ältere Versionen einfach möglich

– Immutable = Sicher!

– ZFS Feature Flags prüfen!

Page 8: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

CD – ROM Boot (never done)USB Boot (first steps)Headnode – PXE Boot (best way)

Page 9: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Easy Steps to get lost ...

Root PWD

Network (DHCP / FIXED IP)

NTP Server

Data Pool (RAID-Z / Mirror / Something else)

Reboot Done …

SSH into the „Global Zone of your new SmartOS Host“

… and you are competely lost …

Page 10: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Everything is different ...

● Gängige Betriebssysteme – Root FS = ON Disc

● SmartOS – Root FS = Ramdisc (immutable)

– /usr = read only loopback mounted - single compressed file

● Viele Dinge nicht möglich– Useradd

– Cp something /usr /etc /root

– Install „packages“ (möglich aber nicht ganz einfach)

– Services (SMF) reset on each Boot

Page 11: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Was darf ich nun machen?

Filesystem size used avail capacity Mounted onzones 2.0T 143M 1.8T 1% /zoneszones/var 2.0T 4.0G 1.8T 1% /varzones/opt 2.0T 55K 1.8T 1% /optzones/usbkey 2.0T 154K 1.8T 1% /usbkey/usbkey/shadow 1.8T 154K 1.8T 1% /etc/shadow/usbkey/ssh 1.8T 154K 1.8T 1% /etc/ssh

vi /usbkey/config

zpool attach zones c0t0d0 c0t1d0 (mirror) zpool add zones mirror c0t2d0 c0t3d0

Page 12: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Technologie Stack & Hardware Assimilation

Page 13: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Eindeutig keine Schweden diese Borg ...

Page 14: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Captain: Deck 1 bis 4 – gesichert

Hardware

Kernel

Virtueller Storage POOL

ZONE 1 - KVM ZONE 2 OS ZONE 3 KVM

Crossbow – Network Stack

ZFSZFSZFSVNIC VNIC VNIC

Application Application Application

Glo

bal Z

one

Imm

utab

le

DT

race

Page 15: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

nothing WOW till now...?

Page 16: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

STORAGE & ZFS

● ZPOOL – Organisiert Devices (Physische / Virtuelle)● ZFS – END to END Integrität (no Raid Hole!)● COW – Copy on Write (snapshots / clones)● Compression ● Quota Management & Reservierungen

Page 17: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Beam me up Scotty... no space

left here

Page 18: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

vmadm send ZONEUUID | ssh 10.10.10.2 | vmadm receive

vmadm start ZONEUUID

(Bitte nur mit DHCP probieren sonst knallt's)

Page 19: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Schnelle Reprodukion

Page 20: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

imgadm avail | grep ….

imgadm import UUID

e6ac6784­44b3­11e1­8555­87c3dd87aafe  debian­6.03    1.0.0    linux    2012­11­21T00:17:44Z46ecf60e­52c8­11e2­b212­9b51fc749547  debian­6.0.6   2.3.1    linux    2013­01­24T21:36:28Z014e2254­a853­11e2­81c9­b318c31fa17a  debian­6.0.7   2.4.1    linux    2013­04­18T19:04:41Z94384a12­bbeb­11e2­aec2­2bfa9742484b  debian­6.0.7   2.4.2    linux    2013­05­13T19:19:01Z

1d4fd806­6ef8­11e2­93ab­4f22d6d207c9  mongodb        1.4.5    smartos  2013­02­04T18:43:44Zec5defa8­16fe­11e3­948e­8f59b3488902  mongodb        13.2.0   smartos  2013­09­06T14:16:28Zd2409672­29f3­11e3­ba86­6f782523cb41  mongodb        13.2.1   smartos  2013­09­30T17:14:52Z649e0c72­89ec­11e3­a7c2­97e6a67823b0  mongodb        13.3.1   smartos  2014­01­30T20:23

bae3f528­e01f­11e2­b2cb­1360087a7d5f  cassandra      13.1.0   smartos  2013­07­02T19:55:00Z

274bc2bc­d919­11e2­b797­83245409fbeb  hadoop         13.1.0   smartos  2013­07­02T19:55:00

Page 21: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Schnelle Vermehrung vm

ad

m c

rea

te -

f gh

ost

.jso

n {

"brand": "joyent", "image_uuid": "81223438-7874-11e3-9edf-8f1e15269924", "autoboot": true, "alias": "ghostblog", "hostname": "companyblog", "dns_domain": "company.internal", "resolvers": [ "192.168.210.1" ], "max_physical_memory": 512, "max_swap": 512, "nics": [ { "nic_tag": "extern", "ip": "dhcp", "gateway": "10.99.10.1", "vlan_id": 10 } ]}

Page 22: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Scotty Schutzschild für fremdes OS

vmadm create -f ubuntu.json

zfs set compression=on /zones/UUID-disk0

vmadm boot UUID order=cd,once=d /ubuntu.iso,ide

vmadm info UUID vnc{

"vnc": {

"host": "192.168.10.2",

"port": 46776,

"display": 40876

}

}

dann VNCen wir uns das genauer an

KVM ZONE

ZFSVNIC

Application

Page 23: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Getting all together

KVM ZONE

ZFSVNIC

Application

Crossbow – Network Stack Virtueller Storage POOL

ZVOL – mit EXT4Compressed (performance) ZFS ThrottleMax Size

VNIC – DHCP MAC von der VNIC (no spoofing possible)VLAN possibleVirtual Switch (EtherStub Connection möglich)

Kernel

Memory CAP / Scheduler CPU Shares / VCPU Assignent

Page 24: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Crossbow – Die Herausforderung

Physischer Switch

Switch

PNIC2PNIC1

HOST2HOST1

50 Mbit 10 Mbit

● 2 physikalische Hosts● 2 physikalische Switches

● 2 mal „Energie“ für Host ● 2 mal „Energie“ für Switch

● Einstellung für Kunden:● 50 Mbit Host 1 ● 10 Mbit Host 2

Page 25: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Crossbow – Resultat

Virtueller Switch

Switch

VNIC2

HOST2

PNIC1

VNIC1

HOST1

● Resultat:– 1 Physischer Host

– 1 Switch

–-------------------------------Stromkosten Ersparnis Wartung geringer Flexible „Sicherheit“

–-------------------------------Software Defined Network (in a Box)

PNIC1

Aggregat

Page 26: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

:Crossbow – Was wird benötigt

● Eintrag in der /usbkey/config → Aggregat ● Virtueller Switch (automatisch / manuell) ● Zonen (json Files – KVM / OS Zone)

– Link Aggregation

● Interface0=MACADRESSE1,MACADDRESSE2,MACADRESSEX

– Virtueller Switch

● etherstub=vswitch1,vswitch2

– ZoneFile Json – NicTAG für VSwitch inkludieren

● „nic_tag“:“vswitch1“,

Page 27: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Cloudorchestration: Server Flotte

● Aktuelle Möglichkeiten auf SmartOS ● Joyent DataCenter – SDC

– Hervorragende Analysen (Dtrace / Monitoring etc)

– All in One Stack vom Headnode zu den Compute Nodes

– Kostenpflichtig

● Project Fifo – Open Source – laufende Entwicklung – Frei zur Nutzung / Donation

– Kleinere Environments (Zone Creation / User Management / Dashboard)

● Datasets.at – Dataset Builder (JSON) – mit den dementsprechenden Images

Page 28: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

FiFo

Page 29: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

FiFo 2

Page 30: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

FiFO 3

Page 31: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Infracode & Automatisierung

● Joyent verwendet „Chef Solo“ ● Git für Deployment der Cookbooks ● Automatisierung vom PXE Boot bis zu den Zonen

● Automatisierung durch „datasets / images“ ● Überwachung mit Zabbix

Page 32: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Conclusio

● SmartOS ist ideal für:– Cloud Systeme

– Network in a Box – HomeCloud

– Systeme wo Performance wichtig ist

– Basis für Private Cloud Systeme

– Idealer Bare Metal HyperVisor – Datensicherheit

– Less Latency Systeme (keine SAN Anbindung)

● SmartOS ist nicht für – Desktop Betrieb

– Betriebssystem Installation

Page 33: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Fragen ?

Page 34: Infracoders Graz, smartOS - vom Netzwerk in der Box - zum Software Cloud Stack

Herzlichen Dank …