Developing on OpenStack DeveloperWeek SF 2014 1
Jan 28, 2015
Developing on OpenStack
DeveloperWeek SF 2014
!1
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
A Quick Survey
1. How many of you are SOFTWARE DEVELOPERS!
2. How many of attended the HACK-A-THON over the weekend!
3. How many of you HAVE full time jobs as SOFTWARE DEVELOPERS!
4. How many of you WANT full time jobs as SOFTWARE DEVELOPERS!
5. How many of you have heard of RACKSPACE!
6. Are any of you RACKSPACE customers!
7. How many of you are currently using a PUBLIC CLOUD!
8. Are any of you using a PRIVATE CLOUD!
9. How many of you know what OPENSTACK is!
10. How many of you are using OPENSTACK
!2
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Right Place The Right Time The Right Skills
!3
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Our Journey
Introductions
@ Home
Full Stack Development
OpenStack Matters
An OpenStack Primer
Learning OpenStack
Why Learn OpenStack
!4
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Introduction
!5
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Tony Campbell• Director of Training & Certification - Rackspace
• 10 year Racker
• Software Development Background
• Launched the first OpenStack Training Program
• Launched the first OpenStack Certification Program
• Delivered OpenStack training all over the world
!6
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
About Rackspace• Founded in 1998 • Based in San Antonio, TX • Nine (9) data centers around the world • Over 5,000 employees worldwide. • Hundreds of thousands of customers • Hybrid portfolio connects cloud and dedicated, for optimum performance
• Built on, and optimized for, open-source technologies • Fanatical® expertise and support—to accelerate customer success
• Founder of OpenStack along with NASA
!7
@Home
!8
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !9
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !10
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !11
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !12
Full Stack Development
!13
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Full Stack Development
!14
Full Stack Development is more than a job title
at today’s hottest tech companies, it is also a
philosophy of managing technology. Full stack
development means understanding each technology in the context of every layer of the stack.
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Full Stack Development
!15
How well does Node work with MongoDB? What hardware / server configuration will help us scale a Ruby on Rails app? Are our engineers
designing the data model and business logic with
a clear concept of the customer use cases in
mind?
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Full Stack Development
Full Stack Development means that more
engineers must know the role of her technology
and layer within the context of the total technology stack – from server and database to design and user interface.
!16
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Full Stack Development
!17
In a sense, this means no developer or company should ever feel locked into any one technology – as long as your Full Stack is
built right!
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Full Stack Development
!18
»Understanding each technology in every layer of the stack
»What hardware / server configuration will help you scale
»No feelings of lock-in
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Hardware Only Appears to Vanish
!19
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !20
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
One Size Fits All?
!21
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !22
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !23
OpenStack Matters
!24
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What is OpenStack?
!25
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What is OpenStack?
!26
Open source software for building private and public clouds
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
OpenStack Matters
Open
Public & Private
Commercial Support
Thriving Community
!27
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Open
!28
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Open Source
!29
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Open Design
!30
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Open Development
!31
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Open Community
!32
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Public & Private Clouds
!33
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Public Clouds• Usually operated by a Service Provider • When you don’t have hardware on hand or don’t want to manage the hardware • Utility Pricing • Potential for application mobility (When using OS Public Clouds)
!34
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
• When a public cloud just won’t do • When you have a hardware investment that you need to put to work • When you want a cloud optimized for your needs
Private Clouds
!35
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Hybrid Clouds• When you want the best of all worlds
!36
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Commercial Support
!37
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Platinum Membership
!38
$500,000 USD / per year!
At least 2 Full Time employees contributing to OpenStack
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Gold Membership
!39
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Corporate Sponsors
!40
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Corporate Sponsors
!41
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Supporting Orgs
!42
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Supporting Orgs
!43
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Respected Logos - Supporting Orgs
!44
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Case Studies
!45
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Thriving Community
!46
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Community Snapshot
!47
14,079 People 132 Countries
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Community Snapshot - Lines
!48
source: http://www.ohloh.net/p/openstack
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Community Snapshot - Commits
!49
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Result
!50
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The End Result
Choice Rapid Development Feature Rich Customizable and Extendable High Availability Scale Worldwide Adoption Jobs
!51
An OpenStack Primer
!52
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The OpenStack Umbrella
!53
Keystone Glance Nova Neutron
OpenStack
Cinder SwiftCeilometer Heat
Horizon
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Keystone
!54
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Keystone - Identity Service
• Identity Service
• Maps users to OpenStack services they can access
• Common authentication system across OpenStack projects
• Can integrate with existing backend systems
– LDAP
– Database
• Supports multiple authentication styles
– Username and password
– token-based systems
– AWS Style logins
• Provides a Service Catalog
!55
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Keystone API
• Versions
• Tokens
• Service Catalog
• Endpoints
• Domains
• Projects
• Users
• Groups
• Credentials
• Roles
• Policies
!56
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !57
$ curl -i ‘http://192.168.56.211:5000/v2.0/tokens' !-X POST !-H "Content-Type: application/json" !-H "Accept: application/json" !-d '{"auth": !! {"tenantName": "admin", !! "passwordCredentials": !! ! {"username": "myadmin", !! ! "password": “mypassword"!}}}'
Auth Token Request
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !58
{! "access": {! "token": {! "issued_at": "2014-02-18T19:47:56.858403",! "expires": "2014-02-19T19:47:56Z",! "id": "MIIOawYJKoZ...",! "tenant": {! "description": "admin Tenant",! "enabled": true,! "id": "a4cda0d149cb4a37b7bff2eabb06763b",! "name": "admin"! }! },
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !59
"serviceCatalog": [! {"endpoints": [! {"adminURL": “http://10.0.2.15:8774/v2/a4cda0d…,! "region": "RegionOne",! "internalURL": “http://10.0.2.15:8774/v2/a4cda0…”,! "id": "6f04237b200f4ae8a93d32337ba8fa48",! "publicURL": “http://10.0.2.15:8774/v2/a4cda0…”! } ],! "endpoints_links": [],! "type": "compute",! "name": "nova"! },
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !60
"user": {! "username": "admin",! "roles_links": [],! "id": "2e7850e25c92420790898ac418952ea7",! "roles": [! {"name": "KeystoneAdmin" },! { "name": "admin" },! {"name": "KeystoneServiceAdmin" },! {"name": "_member_"}],! "name": "admin"! },
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !61
"metadata": {! "is_admin": 0,! "roles": [! "4cf9790138544281ab7f12e79e0476b4",! "c18719cd4c7846cf8750f8789b052232",! "ca9c23186ac94825bdac1e2f1d244a73",! "9fe2ff9ee4384b1894a90878d3e92bab"! ]! }! }!}
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
OpenStack API Calls
•REST Based API’s
•Payloads in JSON or XML
•Each API call requires an AUTH TOKEN
•AUTH TOKENS obtained by hitting the Keystone API
!62
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Glance
!63
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Glance - Image Service• Image Service • Provides services related to disk and server images
– Discovery – Registration – Delivery
• Stores server images and snapshots • Supports multiple backend stores
– OpenStack Object Storage (Swift) – Filesystem – HTTP – S3
• Supports multiple image formats – Raw – Machine (AMI) – VHD (Hyper-V) – VDI (Virtual Box) – qcow2 (Qemu/KVM) – VMDK (VMWare) – OVF (VMWare, others)
!64
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Glance API
• Images • Image Schemas
!65
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !66
curl -i -H "X-AUTH-TOKEN: MIIOaw..." http://10.0.2.15:9292/v2/images
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !67
{"images": [! {"status": "active",! "name": "cirros",! "tags": [],! "container_format": "bare",! "created_at": "2013-12-08T23:01:24Z",! "size": 9761280,! "disk_format": "raw",! "updated_at": "2013-12-08T23:01:24Z",! "visibility": "public",! "self": “/v2/images/2891f19c-e7f6-436f-b127-27…”,! "protected": false,! "id": "2891f19c-e7f6-436f-b127-27d23731f2bd",! "file": “/v2/images/2891f19c-e7f6-436f-b127-27d…”,! "checksum": "50bdc35edb03a38d91b1b071afb20a3c",!
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !68
"min_disk": 0,! "direct_url": “file:///var/lib/glance/images/2891f19c-e...”,! "min_ram": 0,! "schema": "/v2/schemas/image"}! ],"schema": "/v2/schemas/images",! "first": "/v2/images"}
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova
!69
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova - Compute Service
• Compute Service • Abstraction layer on top of the hypervisor • Supports multiple hypervisors
– KVM / Qemu – Xen – Hyper-V – VMWare ESXi – LXC via libvirt – (Baremetal) – (Docker)
• Provides resource scheduling and allocation • Allows users to spin up / spin down compute resources
!70
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova API
• Versions • Extensions • Limits • Servers • Server Metadata • Server Addresses • Server Actions • Flavors • Images • Image Metadata
!71
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova API Extensions
• Server Admin Actions • Server Console Output • Server Console • Server Deferred Delete • Server Diagnostics • Flavor Access • Flavors with FlavorDisabled Attribute • Flavor Extra-Specs • Flavors with rxtx_factor extended attribute • Flavors with extended attributes • Flavors create or delete • Images with size attribute • Limits with project usage • Limits with project usage for administrators • Guest Agents
!72
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova API Extensions
• Host aggregates • Attach interfaces • Root certificates • Cloudpipe • Coverage Reports • Fixed IPs • Floating IP DNS Records • Floating IP Pools • Floating IPs • Floating IPs Bulk • Hosts • Hypervisors • Server Actions • Keypairs • Migrations
!73
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova API Extensions
• Networks • Quota Sets • Server rescue and unrescue • Server start and stop • Security Groups • Rules for Default Security Group • Server Password • Manage Services • Usage Reports • Virtual Interfaces • Volume Extension • Volume Attachments • Servers with block device mapping format • Servers OS-EXT-IPS-MAC:mac_addr extended attributes • Configuration Drive
!74
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Nova API Extensions
• Servers with extended availability zones • Servers and images with disk config • Server IP Type • Server extended attributes • Server extended status • Server with scheduler hints • Servers multiple create
!75
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !76
curl -i -H "X-AUTH-TOKEN: MIIOaw…" http://10.0.2.15:8774/v2/a4cda0d149cb4a37b7bff2eabb06763b/servers
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !77
{"servers": [! {"id": "4ed783fa-43d2-43f7-9fa7-8ccef1b4ab8b",! "links": [! {"href": “http://10.0.2.15:8774/v2/a4cda0d149cb4a37b7bff2eabb06763b/servers/4ed78…”,! "rel": "self"},! {"href": “http://10.0.2.15:8774/a4cda0d149cb4a37b7bff2eabb06763b/servers/4ed78…”,! "rel": "bookmark"}],! "name": "test1"! }]}
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Neutron
!78
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Neutron - Networking Service
• Networking Service • Provides services for managing networks and ip addresses • Can provide users self service over their network configuration • Neutron leverages network virtualization • Manages Networking Resources
– Networks – Subnets – Ports
• Leverages a plug-in architecture for networking backends – Open vSwitch – Linux Bridge – Cisco – Brocade – ML2 – NEC
!79
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Neutron API
• Networks • Subnets • Ports
!80
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Neutron API Extensions
• Quotas • Network provider extended attributes • Ports binding extended attributes • Security groups and rules • Layer-3 Networking • Router Operations • Floating IP Operations
!81
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Cinder
!82
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Cinder - Block Storage Service
• Block Storage Service • Provides persistent block level storage devices for compute instances • Manages block devices
– creation – attaching – detaching
• Supports multiple storage backends – LVM via iSCSI – Ceph – NetApp – Nexenta – SolidFire – Zadara
!83
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Cinder API
• Volumes • Volume Types • Snapshots
!84
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Swift
!85
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Swift - Object Storage Service
• Object Storage Service • Capable of storing multiple petabytes of data • Not a filesystem but a distributed storage system ideal for static data • Data protections is built into the software • Designed to run on commodity hardware
!86
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Swift API
• Accounts • Containers • Objects
!87
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Ceilometer
!88
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Ceilometer - Telemetry Service
• Telemetry Service • Concerned with monitoring and metering OpenStack resources • Data may be collected by
– monitoring notifications – ceilometer polling
• Build in Measurements include: – Instances – CPU – Disk – Memory – Networking – Energy – Power
!89
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Ceilometer API
• Alarms • Meters • Resources
!90
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Heat
!91
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Heat - Orchestration Service
• Orchestration Service • Designed to manage the entire lifecycle of infrastructure and applications • Describes the infrastructure in a human readable text format • Infrastructure that can be described include:
– servers – floating ips – volumes – security – users
• Provides an autoscaling service that integrates with Ceilometer • Integrates well with configuration management tools like Puppet and Chef
!92
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Heat API
• Stacks • Stack Actions • Stack Resources • Stack Events • Templates • Build Info
!93
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon
!94
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon - Dashboard
• The OpenStack Dashboard • Web UI that can be used to control and manager your OpenStack Cloud • Allows control of:
– Compute – Storage – Networking – Images – Access & Security – Orchestration – Users
• Horizon allows for customization and extension
!95
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon - Dashboard
!96
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon - Dashboard
!97
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon - Dashboard
!98
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon - Dashboard
!99
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Horizon - Dashboard
!100
Learning OpenStack
!101
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Documentation
• docs.openstack.org – Installation Guides – Configuration Reference – Cloud Administrator Guide – High Availability Guide – Operations Guide – Security Guide – Virtual Machine Image Guide – (API Guides) – (Developer Guides) – (Contribution Guides)
!102
• wiki.openstack.org - Pages for each project - Documentation How To - QA How To - Release Calendar - How we do CI - How we do Code Reviews !• ask.openstack.org
– Forums
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
IRC and Mailing Lists
•irc.freenode.net (https://wiki.openstack.org/wiki/IRC)
#openstack #openstack-cinder #openstack-swift #openstack-nova #openstack-neutron #openstack-glance #openstack-horizon !
• Mailing Lists (https://wiki.openstack.org/wiki/Mailing_Lists) General List - [email protected] Announcements - [email protected]. Development - [email protected]. Operators - [email protected].
!103
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Code
• github.com/openstack • source code
• launchpad.net/openstack • Bugs • Blueprints !!
OpenStack is mostly written in Python
!104
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Deployment Tools
• DevStack (http://devstack.org/) • TryStack (http://trystack.org/) • RPC Software (http://www.rackspace.com/cloud/private/) • RPC Sandbox (http://www.rackspace.com/knowledge_center/article/rackspace-private-cloud-sandbox) • Packages
• apt-get • yum
• Cookbooks • https://github.com/rcbops-cookbooks • https://github.com/stackforge/ • https://github.com/opscode/openstack-cookbooks
!105
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
OpenStack User Groups
!106
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Conferences
!107
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Training Marketplace
!108
http://www.openstack.org/marketplace/training/
Rackspace Training for OpenStack
!109
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Course Catalog
!110
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Delivery Methods
!111
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !112
OpenStack Talent In Demand
!113
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
A Growing Demand for OpenStack Talent
!114
RACKSPACE® HOSTING | WWW.RACKSPACE.COM !115
RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Rackspace Loves Developers
http://geekdom.com/san-francisco!http://j.mp/rax-devwk2014!!
http://training.rackspace.com!@CloudTrainMe!!
!116
!117
RACKSPACE® HOSTING | 1 Fanatical Place | City of Windcrest, TX 78218 US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM
RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM