It’s in the cloud! Provisioning and how the (pkg)cloud can help Ken Perkins Developer Advocate @kenperkins
Jan 28, 2015
It’s in the cloud!Provisioning and how the (pkg)cloud can help
Ken Perkins
Developer Advocate
@kenperkins
2RACKSPACE® HOSTING | WWW.RACKSPACE.COM
About Memmmmm….. Beer….
3RACKSPACE® HOSTING | WWW.RACKSPACE.COM
About Me
• Beer!
• Joined Rackspace March 2013
• 1st engineering hire at clipboard.com; Acquired by Salesforce.com May 2013; 120k users; node.js based
• Core committer for pkgcloud; 5th most commits; most in last year.
• I kind of have a sports addiction…
4RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Overview
• What is the cloud really? APIs on Datacenters!
• Why provisioning for the cloud?
• APIs are awesome, but writing your own wrapper sucks
• Why do you care? I can get a 32gb server for €49/mo...
• Pkgcloud use cases & capabilities
• Why did Rackspace hire my to work on this anyway?
5RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What is the “cloud”
6RACKSPACE® HOSTING | WWW.RACKSPACE.COM
It’s in the cloud!
7RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What is the cloud anyway?
• Datacenters & Applications with APIs
• Infrastructure-as-a-service• Compute, DNS, storage, load balancing, databases, email,
orchestration, & more, all highly available
• On demand resource creation
• “Web-scale”
• If you build it, they will come
8RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Provisioning for the cloud
9RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Provisioning for the cloud
• On-Demand Environments
• A/B Deployment
• Integration with Orchestration
• Continuous Integration/Continuous Deployment
• DRY – Don’t Repeat Yourself applies to infrastructure too!• From dev (maybe using vagrant?) to production
10RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Writing your own API wrapper sucks
11RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Writing your own API wrapper sucks
• But, but, require(‘request’) makes it so easy
• Maintenance hell. Just add another feature…
• It’s cool, I can open-source my wrapper
• Idiosyncrasies of the API
• It’s all about priorities• Spend your time on stuff only you know: Your Product and
Your App.
12RACKSPACE® HOSTING | WWW.RACKSPACE.COM
But, Dedicated Servers!
13RACKSPACE® HOSTING | WWW.RACKSPACE.COM
But Dedicated Servers are Cheap!
• Limited capacity
• Provisioning lead time
• Not truly on demand
• Shifts control away from the developer
• $50/mo for cloud only gets you a 1-2gb server :S
• Sometimes both is a winning strategy too
14RACKSPACE® HOSTING | WWW.RACKSPACE.COM
About pkgcloud
15RACKSPACE® HOSTING | WWW.RACKSPACE.COM
About pkgcloud
• Multi-Cloud provisioning package for node.js
• Created by Nodejitsu Dec 2011
• Born out of node-cloudservers npm package from Nodejitsu
• Users include Rackspace (Cloud Monitoring), Bloomberg, Nodejitsu, Advanced Simulation Technology (Rossk), among hundreds of others
16RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Why pkgcloud?
• Single convention, multiple clouds
• Uniform vocabulary
• Abstract out peculiarities of individual providers and APIs
• Node is great for command line tools too!
17RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What is multi-cloud anyway?
18RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What is multi-cloud?
• Current Providers:• Amazon, Azure, Digital Ocean, Joyent, Openstack, Rackspace
• Generalized models across providers• i.e. every compute provider has:
client.createServer(options, function(err, server) { ... });
• Code is mostly portable (options signature for example)
• Caveat emptor
19RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Multi-Service
• Compute• AWS, Azure, Rackspace, Openstack, Joyent, DigitalOcean, Telefonica
• Storage• AWS, Rackspace
• Database• Rackspace, Azure, IrisCouch, MongoHq, MongoLab, Redistogo
• DNS• Rackspace
• BlockStorage• Rackspace*
• Load Balancing• Rackspace*
20RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Example 1Using pkgcloud with CloudFilesCode @ http://j.mp/pkgcloud-cf
21RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Example 2Using pkgcloud with CloudServersCode @ http://j.mp/pkgcloud-cs
22RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Why is Rackspace involved?
23RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Why is Rackspace involved?
• We created OpenStack, and then gave it away!
• We’re all about community
• Developer Advocates for PHP, Java, .Net, golang, Ruby, Python, node.js
• We already have core committers on jClouds, Fog, libcloud, among others
• We’d rather engage and interface with existing open-source communities than try to fragment them
24RACKSPACE® HOSTING | WWW.RACKSPACE.COM
What’s Next?
25RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Future…
26RACKSPACE® HOSTING | WWW.RACKSPACE.COM
The Future
• Need to add more implementations of providers within services (i.e. make them truly multi-cloud)
• Refactor Databases entirely
• More services (queuing, autoscale, orchestration, email, etc)
• Command Line tools (rossk!)
• …
27RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Takeaways
• Design for the cloud from the start
• Focus on work only you and your team can do; not writing API wrappers
• Put more control in the hands of you and your developers
28RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Further Info
• Github:– http://github.com/nodejitsu/pkgcloud
• IRC– #pkgcloud on freenode
• Website:http://developer.rackspace.com/devtrial
• Contact info:[email protected]: @kenperkins
29RACKSPACE® HOSTING | WWW.RACKSPACE.COM
Q&A
30
RACKSPACE® HOSTING | 5000 WALZEM ROAD | SAN ANTONIO, 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