introduction to openstack

39
An Introduction to OpenStack

Upload: jamiehannaford

Post on 18-Dec-2014

371 views

Category:

Technology


6 download

DESCRIPTION

OpenStack is a free, open-source project that allows anyone to create their own cloud infrastructure. Used by the likes of NASA, CERN, AT&T and Sony, we will be looking at the reasons for its success and how it is emerging as a powerful competitor to Google and AWS. In our deep-dive, we will look at what OpenStack really is and what services it can offer to both developers and business owners. We will also get our hands dirty by writing some code, and seeing how easy it is to spin up servers, CDNs and databases in a matter of minutes.

TRANSCRIPT

Page 1: Introduction to OpenStack

An Introduction to OpenStack

Page 2: Introduction to OpenStack

goals

Page 3: Introduction to OpenStack

1. what is it?

2. where did it come from?

3. Who is using it?

4. How can i use it?

Page 4: Introduction to OpenStack

i’m not here to

• PREACH

• TALK ABOUT SILVER BULLETS

• sell

Page 5: Introduction to OpenStack

introducing… me

Software Engineer, Rackspace

DRG (Developer Relations Group)

OpenStack Contributor

Retired Tekken Champion

Page 6: Introduction to OpenStack

what?

Page 7: Introduction to OpenStack

in a nutshell

• Open-source software project

• Modules that provide cloud infrastructure

• Independent, driven by community

• Governed by an elected technical board

Page 8: Introduction to OpenStack

But really…

Page 9: Introduction to OpenStack

just python

code

Page 10: Introduction to OpenStack

omg python

don’t panic!

Page 11: Introduction to OpenStack

language agnostic

• REST APIs

• SDKs (Language Bindings)

• CLIs

• GUI Console (OpenStack Horizon)

Page 12: Introduction to OpenStack

such cloud… many services… wow

• Servers (Nova)

• File storage (Swift)

• Databases (Trove)

• Block storage (Cinder)

• OS Images (Glance)

• Networks (Neutron)

• Identity (Keystone)

• Orchestration (Heat)

• Work queues (Marconi)

• Hadoop (Sahara)

Page 13: Introduction to OpenStack

where?

Page 14: Introduction to OpenStack
Page 15: Introduction to OpenStack
Page 16: Introduction to OpenStack

project nebula

• Federal cloud platform

• “take the lead in open, transparent and participatory space exploration and government”

• Efficiency, flexibility, reduced energy costs, reduced setup time, performance.

Page 17: Introduction to OpenStack

“This could have fallen apart in a

million different ways.”

Rick Clark

Page 18: Introduction to OpenStack

the glorious loopholeProblem

• Existing codebase (eucalyptus) had issues

• Creating a new codebase at NASA was not allowed

Solution

• Create a new OSS project at the weekends

• Contribute back to it during working week

Page 19: Introduction to OpenStack

“Launched Nova. !

Apache-Licensed cloud computing, in Python. !

It’s live, it’s buggy, it’s beta. Check it out.”

Josh McKenty, Summer 2010

Page 20: Introduction to OpenStack
Page 21: Introduction to OpenStack

“It was like finding a long-lost twin…”

It was the weirdest experience I’ve ever had. !

We were using the same tools. !

We had made the same language decisions. !

we both said: ‘Wow, you just wrote the code that we were going to write.’

Page 22: Introduction to OpenStack

Who?

Page 23: Introduction to OpenStack
Page 24: Introduction to OpenStack
Page 25: Introduction to OpenStack

LHC• 17 mile long particle accelerator

• 9,000 magnets; cooled with 10 thousand tonnes of liquid nitrogen

• Magnets accelerate particles to 671,000,000 mph. That’s over 11,000 laps per second.

• 600 million collisions per second

• Each collision generates temperates 100,000 times hotter than the core of the sun

Page 26: Introduction to OpenStack

Just 2 Requirements

1. Infrastructure that can analyze the most data-intense experiments in human history.

2. IT network for 11,000 Physicists (email, web services, databases, desktop support).

Page 27: Introduction to OpenStack

Big data?

• Filter 1PB of data per second with ~1,000+ VMs.

• 35PB of residual data per annum from LHC, which needs mathematical analysis.

• Scale for future growth. By 2015, the LHC will double its energy usage.

Page 28: Introduction to OpenStack

The Grid

• 1,000 Nova servers, each with ~12 cores.

• 60k cores in total, tiered architecture.

• During CMS experiments, ~250 VMs are launched in a 5min burst.

Page 29: Introduction to OpenStack

How?

Page 30: Introduction to OpenStack

installation

$  composer  require  \  

   rackspace/php-­‐opencloud:dev-­‐master

Page 31: Introduction to OpenStack

1. Setup client<?php  !require  'vendor/autoload.php';  !use  OpenCloud\OpenStack;  !$client  =  new  OpenStack('my-­‐os-­‐api.com:35357/v2.0',  [          'username'      =>  'foo',          'password'      =>  'bar',          'tenantName'  =>  'baz'  ]);  !$service  =  $client-­‐>computeService('nova',  'region1');

Page 32: Introduction to OpenStack

2. choose OS

//  Traverse  \Iterator  collection  $allImages  =  $compute-­‐>imageList();  !foreach  ($allImages  as  $image)  {     if  (preg_match('#^ubuntu#i',  $image-­‐>name))  {       $ubuntu  =  $image;       break;     }  }  !//  Or  instantiate  with  ID:  $ubuntu  =  $compute-­‐>image('{uuid}');

Page 33: Introduction to OpenStack

3. choose hardware

//  Traverse  \Iterator  collection  $allFlavors  =  $compute-­‐>flavorList();  !foreach  ($allFlavors  as  $flavor)  {     if  (preg_match('#large#i',  $flavor-­‐>name))  {       $largeFlavor  =  $flavor;       break;     }  }  !//  Or  instantiate  directly:  $largeFlavor  =  $compute-­‐>image('m1.large');

Page 34: Introduction to OpenStack

4. launchuse  Guzzle\Http\Exception\BadResponseException;  !/**  @var  $server  OpenCloud\Compute\Resource\Server  */  $server  =  $compute-­‐>server();  !try  {     $response  =  $server-­‐>create([       'name'      =>  'Viva  Italia!',       'image'    =>  $ubuntu,       'flavor'  =>  $largeFlavor     ]);  }  catch  (BadResponseException  $e)  {     printf("An  error  occurred!\n");     printf("Request:  %s\n",  (string)  $e-­‐>getRequest());     printf("Response:  %s",  (string)  $e-­‐>getResponse());  }

Page 35: Introduction to OpenStack

• ‘getting started’ guides

• full user manual

• samples for most use-cases

• issue tracking for help, or feel free to email [email protected]

github.com/rackspace/php-opencloud

Page 36: Introduction to OpenStack

Future?

Page 37: Introduction to OpenStack
Page 38: Introduction to OpenStack

Thanks!

@jamiehannaford

Page 39: Introduction to OpenStack

Photo Credits

‘Wisoff on the Arm’, NASA !20th Century Fox !Peter Thoeny, Copyright 2013, Creative Commons license !Alexander van Dijk, Copyright 2009, Creative Commons license !CERN, All rights reserved !Philip Hay, Copyright 2007, Creative Commons !CC license: https://creativecommons.org/licenses/by-nc-sa/2.0