Seattle Gnu/Linux Conference October 11 2013 Virtualization for Web Developers Peter Gordon
Contents... Intro TL; DR; About the presenter What s in it for you? Virtualization Virtual Private Servers for hosting solutions Virtualization for web development Prehistory What it solves Stupid business practices The future Q&A
Intro Tl; dr; virtualization for web development is really smart, but not always used. Here is why you use it. Look at some of the technical aspects. But the social benefits are even better. Some of you may already be hip to all this. This talk is for a mixed audience. So you can sell others on it. Please put your hand up and ask questions.
About the presenter The old Van PHP. Organized Several Conferences with team. Dev and Project Management work. In my spare time: Blogger, biker, train in Brazilian Jiujitsu; volunteer work. Thanks to David Turner for some troubleshooting on this issue: http://www.turneris.com/
Show some love for user groups Conferences and meetups are valuable opportunities. Network with everybody here. Microsoft, with its 720 bn valuation will never have the community that we have.
What's in it for me? Standardize team skills. IT policy with a high degree of similarity between development and production environments, which means fewer problems down the road. Fast & flexible team creation. Skills & tools refactored.
Virtualization basics A computer within a computer - an emulator. Very useful for web development, but glossed over as a topic until recently. For Virtual Private Servers. For Desktop.
VPS Hosts Something between the palace of dedicated hosting and the sewer of shared hosting. The performance of a dedicated server on the budget of a shared host. Good hosting companies offer VPS. IMHO, bad ones don t.
VPS vs. Shared host page gen benchmark on index.php Dreamhost.com: ~2.0 seconds. VPS: Canadian Web Hosting co-located on Peer1: 0.00002 seconds. Or an improvement of 2*10 ⁵ over shared hosting. Holy crap.
... and this means...? Hypervisors run the LAMP stack. The LAMP is part of what you sell. You can run a mirror of your web server locally with many advantages. Self evident, but not so obvious. Even deploy to Amazon EC2.
With a VM on the Desktop, I can do this:
The prehistory what sucked. Manual install of stack on desktop. XAMPP, MAMP, WAMP, et al. I don t find built-in Mac server very useful for real web development.
Why it is wrong... Because it is not the real stack. There are always going to be subtle differences and somewhere along the line it is going to cause an issue.
Demo some stuff pls. Oracle VirtualBox is FOSS. Nothing against other FOSS hypervisors. Installing Gnu-Linux ISO distros is pretty vanilla, much the same as installing on the metal. Networking options was the nut to crack. See my blog, http://superwebdeveloper.com for talk notes.
Stupid business practices No comprehensive IT policies too often the reality. No effort to standardize working stack, beyond version control. Team management express indifference to how team members build their environments. A disconnect between dev and sysadmin roles.
Better Ideas with VMs Define core competency. Use real tools & avoid clunky dev environments Share standard stack, skills, techniques Be agile Support team members around network outages Work independently, Remote team development Learn & use Gnu-Linux like a boss $0 cost
A key problem solved It works on my machine, why not yours? It doesnt work on the server, so even though it works on your machine, it is still broken.
Merton's Norms of Science Universality: No person should be able to more easily obtain the information of a test than another person... any... personal factors should not be factors in someone's ability to... perform a science. Public accessibility: Any scientific knowledge one obtains should be made available to everyone. The results of any research should be openly published and shared with the scientific community. Wikipedia, Robert Merton's norms, 1942.
Things you can do with VMs Distribute projects with VMs. Common dev environments across machines. Demonstrate outside of internet or deployed service, and demo projects before delivery. Security, penetration, date & Scenario testing. Support old projects, clients. Workaround small client shared web hosting annoyances.
It got me thinking... Standardized virtual dev environments provides a way to easily support team members, because no two people in a chair are alike. Hypervisors can definitely support the cause of spreading Gnu-Linux and the skill set for using it.
Avoid productivity loss Sure, no uniform dev team practices are not a problem most of the time. Persistent problems and additional deployment issues cause FRICTION. Vendor & community patches.
Other wisdom A separation of concerns Stefan Priebsch, thephp.cc. Refactoring
Other wisdom... A grouping of Concerns. When you standardize skill requirements, any team member can support another. You become TRULY AGILE, can create teams in an ad-hoc fashion* (*even though Agile was concocted up to sell things to people and create buy-in by giving team members the illusion of control).
Another reason why... What if you wanted to do things that were just a leeetle bit off of the beaten path? NGINX, NoSQL, MariaDB, ApacheSOLR, LightHTTPD. You will be SOL, or something like that. Or you need a budget. Or time. Or a really good excuse. Or beg your hosting company. Or a dev server.
But we have a dev server! Compare to $0 cost. Code that is noisy in the logs. Security issues also apply. A lessened need for one with VMs.
But we have a dev server! One dev can own several desktop machines, and needs to have common dev tools regardless of platform. Virtual appliances are easy to share or convert for use in other hypervisors. Share VM with team over.torrent protocol.
Do more, do better, with less Host without incurring costs. Rapid deployment. Quick and dirty, local experiments. Comprehensive IT policy promotes efficiency.
The Future Bundling middleware with the stack for distribution. Prebuilt stacks ready for deployment.
Three ways to go about it A hypervisor and... 1.A Gnu-Linux distro from a vendor. 2.Vagrant. 3.Bitnami or Turnkey Linux distro.
Vagrant is very interesting Vagrant & Chef (Ruby project). But I like to tinker under the hood a little bit more. http://vagrantup.com/ http://www.opscode.com/
Not the most technical talk I did not intend it to be. Social benefits are the real take away. Not everyone understands the power in these tools. Teams can assemble quickly, big ideas can turn on a dime. Put the growth of this area in perspective, see its potential for growth.
My Shameless plug at the end... Twitter: @pbgswd Tech blog: http://www.superwebdeveloper.com/ For relaxation and modern social skills: http://martialartsnomad.com/ Thank you SeaGL! Supporting blog posts, talk are online.