introduction to openstack
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
An Introduction to OpenStack
goals
1. what is it?
2. where did it come from?
3. Who is using it?
4. How can i use it?
i’m not here to
• PREACH
• TALK ABOUT SILVER BULLETS
• sell
introducing… me
Software Engineer, Rackspace
DRG (Developer Relations Group)
OpenStack Contributor
Retired Tekken Champion
what?
in a nutshell
• Open-source software project
• Modules that provide cloud infrastructure
• Independent, driven by community
• Governed by an elected technical board
But really…
just python
code
omg python
don’t panic!
language agnostic
• REST APIs
• SDKs (Language Bindings)
• CLIs
• GUI Console (OpenStack Horizon)
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)
where?
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.
“This could have fallen apart in a
million different ways.”
Rick Clark
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
“Launched Nova. !
Apache-Licensed cloud computing, in Python. !
It’s live, it’s buggy, it’s beta. Check it out.”
Josh McKenty, Summer 2010
“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.’
Who?
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
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).
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.
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.
How?
installation
$ composer require \
rackspace/php-‐opencloud:dev-‐master
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');
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}');
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');
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()); }
• ‘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
Future?
Thanks!
@jamiehannaford
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