ganeti web manager - o'reilly mediaassets.en.oreilly.com/1/event/61/ganeti web manager... ·...

46
Ganeti Web Manager Cluster Management Made Simple Lance Albertson Peter Krenesky http://is.gd/oscongwm | http://is.gd/oscongwmpdf

Upload: vuongtruc

Post on 28-Apr-2018

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Ganeti Web ManagerCluster Management Made Simple

Lance Albertson

Peter Kreneskyhttp://is.gd/oscongwm | http://is.gd/oscongwmpdf

Page 2: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

About us

OSU Open Source Lab

Server hosting for Open Source Projects

Open Source development projects

Lance / Lead Systems Administrator

Peter / Lead Software Engineer

Page 3: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Session Overview

Ganeti Basics

Ganeti Web Manager

GWM Internals

Using GWM

Page 4: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Ganeti Cluster

Page 5: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

What is Ganeti?

Cluster virtual server managementsoftware tool

Built on top of existing OSShypervisors

Fast & simple recovery after physicalfailures

Using cheap commodity hardware

Private IaaS

Page 6: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Comparing Ganeti

Utilizes local storage

Built to deal with hardware failures

Mature project

Low package requirements

Easily pluggable via hooks & RAPI

Page 7: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Project Background

Google funded project

Used in internal corporate env

Open Sourced in 2007 GPLv2

Team based in Google Switzerland

Active mailing list & IRC channel

Started internally before libvirt

Page 8: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Terminology

Page 9: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Components

Python

Haskell

DRBD

LVM

Hypervisor

Page 10: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Architecture

Page 11: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Nodes

Physical machine

Fault tolerance not required

Added/removed at will from cluster

No data loss with loss of node

Page 12: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Instances

Virtual machine that runs on thecluster

fault tolerant/HA entity within cluster

Page 13: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Instance Parameters

Hypervisor (called hvparams)

General (called beparams)

Networking (called nicparams)

Modified via instance or clusterdefaults

Page 14: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Disk template

drbd : LVM + DRBD between 2 nodes

plain : LVM w/ no redundancy

file : Plain files, no redundancy

diskless : Special purposes

Page 15: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

IAllocator

Automatic placement of instances

Eliminates manual node specification

htoolsExternal scripts used to compute

Page 16: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Components

Automatic allocation

hbal : Cluster rebalancer

hail : IAllocator script

hspace : Cluster capacity estimator

Page 17: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Primary & Secondary concepts

Instances always runs on primary

Uses secondary node for diskreplication

Depends on disk template (i.e. drbd)

Page 18: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Remote API

Page 19: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Remote API

External tools

Retrieve cluster state

Execute commands

JSON over HTTP via REST

Page 20: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

RAPI Security

Users & Passwords

RFC 2617 HTTP Authentication

Read-only or Read-write

Page 21: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Easy management of Ganeti

Client facing service

Page 22: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Releases

Project Founded - 9-10-2011

Version 0.4 - 12-20-2010

Version 0.5 - 02-03-2011

Version 0.6 - 03-04-2011

Version 0.7 - 06-17-2011

Page 23: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Open Sourced Libraries

Django Object Permissions

Django Object Log

Twisted VNC Auth Proxy

Page 24: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Ganeti Web ManagerInstallation

Page 25: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Dependencies

Python >=2.5, 2.7 recommended

Pip - Python package installer

Fabric - Install scripts

VirtualEnv - Python virtualenvironments

Git - Distributed Source Control

Page 26: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Fabric Installer$ fab dev deploy

$ fab prod deploy

Page 27: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM
Page 28: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Import Tools

Find Orphaned Instances

Import New Nodes & Instances

Remove Deleted Nodes & Instances

Page 29: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Cache UpdaterImports Nodes and Virtual Machines too

$ twistd --pidfile=cache.pid gwm_cache

Page 30: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Cache System

Page 31: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM
Page 32: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM
Page 33: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM
Page 34: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM
Page 35: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM
Page 36: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

VNC Auth Proxy

allows proxying through firewall / VPN

no need for passwords

Page 37: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Permissions

Page 38: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

PersonasUsers can act on behalf of groups

Page 39: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Ownership

vs.

Permissions

Ownership is for book keeping

Permissions let you do things

Page 40: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Users Tab

Page 41: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Editing Users

Page 42: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

QuotasPer Persona, Per Cluster

Page 43: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Overriding Default Quota

Page 44: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Future Features

Instance Template

Instance Defaults

API

And much more!

Page 45: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Conclusion

Page 46: Ganeti Web Manager - O'Reilly Mediaassets.en.oreilly.com/1/event/61/Ganeti Web Manager... ·  · 2011-07-29Session Overview Ganeti Basics Ganeti Web Manager GWM Internals Using GWM

Questions?Lance Albertson Peter Krenesky

[email protected] [email protected]

@ramereth @kreneskyp

http://www.lancealbertson.com http://blogs.osuosl.org/kreneskyp/

http://code.google.com/p/ganeti/

http://code.osuosl.org/projects/ganeti-webmgr

Presentation made with showoffhttp://github.com/ramereth/presentation-ganeti-tutorial

http://is.gd/oscongwm | http://is.gd/oscongwmpdf