extending openstack for fun and profit

16
for Fun and Profit Tim Smith – Co-founder, Gridcentric Extending

Upload: tsmith416

Post on 14-Aug-2015

490 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Extending OpenStack for Fun and Profit

for Fun and Profit

Tim Smith – Co-founder, Gridcentric

Extending

Page 2: Extending OpenStack for Fun and Profit

A bit about me Co-founder & President of

Gridcentric 10+ years hacking

embedded/RTOS, storage, networks, and virtualization

Last 3+ years directing engineering at Gridcentric

Page 3: Extending OpenStack for Fun and Profit

This talk

$$$

Your innovation

Page 4: Extending OpenStack for Fun and Profit

Gridcentric VMS Delayed “fork()” for virtual machines:

Take snapshot of running (fully configured) VM (bless)

Spin up replica instances quickly and efficiently (launch)

Re-use common memory pages between replicas

Page 5: Extending OpenStack for Fun and Profit

Extending Nova

Nova is a framework, providing: A standardized API Messaging / RPC Database-backed ORM

Nova can be extended by writing new: API extensions Custom “services” Nova CLI extensions Dashboard extensions

Page 6: Extending OpenStack for Fun and Profit

Nova API extensions

Main module: nova.api.openstack.extensions Can:

Add new resources Add new properties to existing resources Add new actions to existing resources

Cannot: Replace / hook around existing actions

Page 7: Extending OpenStack for Fun and Profit

GC API extension

Add new server actions: gc_bless – create state snapshot of running

instance gc_launch – launch new VM from state snapshot gc_discard – discard state snapshot

Add new resource: gcservers – list VMS-capable compute hosts

Page 8: Extending OpenStack for Fun and Profit

Creating a new service

Custom services can: Make RPCs to other Nova components Receive RPCs from Api server Access/modify the Nova data store

Page 9: Extending OpenStack for Fun and Profit

The nova-gc service

Accepts RPCs from GC API extension For bless, launch, discard, etc

Uses Nova ORM to CRUD server objects Interfaces to Gridcentric proprietary

code to do heavy lifting

Page 10: Extending OpenStack for Fun and Profit

Extending the nova client New actions can be surfaced to the nova

CLI client Need to be explicitly added via client

extensions Extensions can be PIP-installable, etc

GC client extension Adds bless, launch, discard, etc to nova CLI

client

Page 11: Extending OpenStack for Fun and Profit

Extending the dashboard Horizon is a Django application New views/panes/etc can be added as

“Django installed applications” Horizon and extensions use the nova

client programmatically to access nova services. Ergo, you also need to write a client

extension and install it where Horizon is running

Page 12: Extending OpenStack for Fun and Profit

Extending the dashboard

Page 13: Extending OpenStack for Fun and Profit

Technical challenges

Some parts of nova not 100% “extension ready” E.g. some built-in schedulers don’t route messages to

custom services IP tables rules need to be created through compute

service, but no interface exists for that Service framework makes assumptions w.r.t.

execution Different distributions do things differently

E.g. paths, nova user, libvirt / qemu user

Page 14: Extending OpenStack for Fun and Profit

Business challenges

Openstack is evolving extremely quickly Users/developers/vendors/operators are not always

synced up on the same release. The answer to a lot of issues is “wait for the next release”.

The Openstack market is still early Operators haven’t quite nailed down their

requirements/differentiation/solution set Lots of fragmentation = lots of confusion

Page 15: Extending OpenStack for Fun and Profit

Further reading

Rackspace Extensions API intro: http://docs.rackspace.com/openstack-extensions/apix-intro

Rackspace Extensions (good examples!): http://docs.rackspace.com/openstack-extensions/

Gridcentric VMS extension: https://github.com/gridcentric/openstack

Service architecture intro: http://docs.openstack.org/developer/nova/service.architecture.html

Extending Horizon (dashboard): http://docs.openstack.org/developer/horizon/topics/tutorial.html

Standard OpenStack API and extensions: http://api.openstack.org/