Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Building your ownDesktop Cloud EnvironmentGautham Pai, Founderjnaapti
The problems we face as developersOur development environments accumulate lots ofapplications and libraries over a period ...
Solution?How about Desktop Virtualization?            http://jnaapti.com/
Why Desktop Virtualization?Bringing our development environment as close to theproduction environment as possible.Replicab...
Virtualization or Cloud?What I am talking about is closer to virtualization thancloud computing.For example, we are not de...
Why QEMU-KVM and not Virtualbox?KVM is part of the Linux KernelVirtualbox is from OracleKVM provides better performance   ...
What we want to try outCreate a development environment with functionalitiespartitioned over separate VMs.Ensure that sett...
System Requirements A laptop/desktop with    a processor that supports virtulization technology    to use KVM    a Debian ...
Demohttp://jnaapti.com/
The ApproachIn this demo, I will take you through the steps tocreate a multi-VM development environmentIn addition to our ...
First, a look at a few terminologiesQEMU is a generic and open source machine emulatorand virtualizer.KVM (for Kernel-base...
Demohttp://jnaapti.com/
The ApproachWe first create a base VM and install the OS in it, usingthe standard Ubuntu 10.04.2 Server ISO imageWe then i...
Installing Pre-requisites$ sudo apt-get install virt-manager qemu-kvm                    http://jnaapti.com/
Starting Virt Manager$ sudo virt-manager                  http://jnaapti.com/
Networking RequirementsEvery VM should have its own IP address.Every VM should be accessible from every other VMand that i...
Setting up the Bridge Network          http://jnaapti.com/
Name your Virtual Network        http://jnaapti.com/
Choose an IPv4 Address Space          http://jnaapti.com/
Select DHCP Range     http://jnaapti.com/
Setup NAT forwarding      http://jnaapti.com/
Review and finish the wizard          http://jnaapti.com/
Create the Base VM     http://jnaapti.com/
Choose the Distribution to Install            http://jnaapti.com/
Set RAM and CPUs    http://jnaapti.com/
Set the Disk Space     http://jnaapti.com/
Finalize the VM Creation        http://jnaapti.com/
Install the OS in the Base VM          http://jnaapti.com/
Select Hostname    http://jnaapti.com/
Select Disk http://jnaapti.com/
Confirm Disk Format     http://jnaapti.com/
Installation Progress      http://jnaapti.com/
Installation Progress      http://jnaapti.com/
Create User http://jnaapti.com/
Set Username  http://jnaapti.com/
Configure APT  http://jnaapti.com/
Set Automatic Upgrades       http://jnaapti.com/
Install Additional Software         http://jnaapti.com/
Install Pre-defined Collections           http://jnaapti.com/
Installation Progress      http://jnaapti.com/
Install GRUB  http://jnaapti.com/
Install GRUB  http://jnaapti.com/
Installation Complete      http://jnaapti.com/
Installation Complete      http://jnaapti.com/
Verifying the Base VM InstallationLogin to the Base VMInstall the latest updatesMake sure you can connect to the host from...
Cloning the Base VMAdd the DNS server that we use for guest IP allocationto resolv.conf, so that you can address VMs using...
Starting and Stopping the VMs$ #Start the domains$ virsh start webserver && virsh start dbserver &&virsh start codeserver$...
Where to go from here?Setting up package mirrorsSnapshot creation on the flyYou can mimic things like S3, EBS etc         ...
ResourcesMore detailed notes hereCode is over at GithubKVMVirtual Machine ManagerKVM NetworkingQEMU NetworkingQEMU Images ...
Courtesy Server image from OpenClipArt CD image from pr0gr4mm3r.comThanks to Pradeep Kumar, Ananth M, Kiran S, Ananda M,Ma...
The Jnaapti development environment is based                on this setup                 http://jnaapti.com/
This talk was first delivered in the “PHP Cloud” event                 organized by HasGeek                      http://jn...
Thank you!Email: gautham@jnaapti.com        http://jnaapti.com/
Happy Hacking  http://jnaapti.com/
Upcoming SlideShare
Loading in …5
×

Building your own Desktop Cloud Environment

4,720 views

Published on

As developers we have seen these problems:

Our development environments accumulate lots of applications and libraries over a period of months.

We are usually in the habit of installing everything in one machine.

We fear that we may screw up our development environment and that means unproductive man-hours.

We forget that a multi-machine deployment is different from a single machine deployment.

How about virtualization in the desktop?

In this demo, I will take you through the steps to create a multi-VM development environment.

This demo will make use of QEMU, KVM and Virt Manager and show you how you can create a VM image, and then start servers with a set of commands, deploy your app, test everything and tear down the environment once you are happy - all this in the cosy comforts of your laptop or desktop.

The Jnaapti development environment is based on this setup.

Published in: Technology
  • Be the first to comment

Building your own Desktop Cloud Environment

  1. 1. Building your ownDesktop Cloud EnvironmentGautham Pai, Founderjnaapti
  2. 2. The problems we face as developersOur development environments accumulate lots ofapplications and libraries over a period of months.We fear that we may screw up our developmentenvironment and that means unproductive man-hours.We are usually in the habit of installing everything inone machine.We forget that a multi-machine deployment is differentfrom a single machine deployment. http://jnaapti.com/
  3. 3. Solution?How about Desktop Virtualization? http://jnaapti.com/
  4. 4. Why Desktop Virtualization?Bringing our development environment as close to theproduction environment as possible.Replicable deployment - verify everything beforedeploying to staging or production.Containerising functionality."Dont panic" environment for experimentationEase of provisioning for new employees. http://jnaapti.com/
  5. 5. Virtualization or Cloud?What I am talking about is closer to virtualization thancloud computing.For example, we are not dealing with transparentscaling, spike load handling etc. http://jnaapti.com/
  6. 6. Why QEMU-KVM and not Virtualbox?KVM is part of the Linux KernelVirtualbox is from OracleKVM provides better performance http://jnaapti.com/
  7. 7. What we want to try outCreate a development environment with functionalitiespartitioned over separate VMs.Ensure that setting up this environment is not morethan a few hours job.Ensure that bringing up the environment does not takemore than a few minutes if not seconds.Ensure that the environment can run in a laptop withstandard configuration. http://jnaapti.com/
  8. 8. System Requirements A laptop/desktop with a processor that supports virtulization technology to use KVM a Debian Linux environment atleast 2GB of free RAM atleast 10G of free disk spaceThis will help us run as many as 5 VM images in parallel http://jnaapti.com/
  9. 9. Demohttp://jnaapti.com/
  10. 10. The ApproachIn this demo, I will take you through the steps tocreate a multi-VM development environmentIn addition to our dev environment (dev-server), wewill have a separate code-server, a web-server and adb-server setup.We then run it end-to-end – write some code, check itin, pull it into the web server, deploy the code andthen test the new version of the app. http://jnaapti.com/
  11. 11. First, a look at a few terminologiesQEMU is a generic and open source machine emulatorand virtualizer.KVM (for Kernel-based Virtual Machine) is a fullvirtualization solution for Linux on x86 hardware.The Virtual Machine Manager application (virt-manager for short package name) is a desktop userinterface for managing virtual machines. http://jnaapti.com/
  12. 12. Demohttp://jnaapti.com/
  13. 13. The ApproachWe first create a base VM and install the OS in it, usingthe standard Ubuntu 10.04.2 Server ISO imageWe then install a SSH server and setup passwordlessSSH accessWe then clone this system to as many systems as weneed and setup various servers(code/caching/web/etc) on them http://jnaapti.com/
  14. 14. Installing Pre-requisites$ sudo apt-get install virt-manager qemu-kvm http://jnaapti.com/
  15. 15. Starting Virt Manager$ sudo virt-manager http://jnaapti.com/
  16. 16. Networking RequirementsEvery VM should have its own IP address.Every VM should be accessible from every other VMand that includes host.Every VM must be able to connect to the Internet.Solution? Bridged Networking. http://jnaapti.com/
  17. 17. Setting up the Bridge Network http://jnaapti.com/
  18. 18. Name your Virtual Network http://jnaapti.com/
  19. 19. Choose an IPv4 Address Space http://jnaapti.com/
  20. 20. Select DHCP Range http://jnaapti.com/
  21. 21. Setup NAT forwarding http://jnaapti.com/
  22. 22. Review and finish the wizard http://jnaapti.com/
  23. 23. Create the Base VM http://jnaapti.com/
  24. 24. Choose the Distribution to Install http://jnaapti.com/
  25. 25. Set RAM and CPUs http://jnaapti.com/
  26. 26. Set the Disk Space http://jnaapti.com/
  27. 27. Finalize the VM Creation http://jnaapti.com/
  28. 28. Install the OS in the Base VM http://jnaapti.com/
  29. 29. Select Hostname http://jnaapti.com/
  30. 30. Select Disk http://jnaapti.com/
  31. 31. Confirm Disk Format http://jnaapti.com/
  32. 32. Installation Progress http://jnaapti.com/
  33. 33. Installation Progress http://jnaapti.com/
  34. 34. Create User http://jnaapti.com/
  35. 35. Set Username http://jnaapti.com/
  36. 36. Configure APT http://jnaapti.com/
  37. 37. Set Automatic Upgrades http://jnaapti.com/
  38. 38. Install Additional Software http://jnaapti.com/
  39. 39. Install Pre-defined Collections http://jnaapti.com/
  40. 40. Installation Progress http://jnaapti.com/
  41. 41. Install GRUB http://jnaapti.com/
  42. 42. Install GRUB http://jnaapti.com/
  43. 43. Installation Complete http://jnaapti.com/
  44. 44. Installation Complete http://jnaapti.com/
  45. 45. Verifying the Base VM InstallationLogin to the Base VMInstall the latest updatesMake sure you can connect to the host from guest andvice-versaSetup password-less SSH access(Update interface identifier) http://jnaapti.com/
  46. 46. Cloning the Base VMAdd the DNS server that we use for guest IP allocationto resolv.conf, so that you can address VMs using theirhostnamesUse virt-clone to clone the base VMStart the new VMChange the hostname of the new VMReboot the new VM http://jnaapti.com/
  47. 47. Starting and Stopping the VMs$ #Start the domains$ virsh start webserver && virsh start dbserver &&virsh start codeserver$ #Destroy the domains$ virsh destroy webserver && virsh destroydbserver && virsh destroy codeserver http://jnaapti.com/
  48. 48. Where to go from here?Setting up package mirrorsSnapshot creation on the flyYou can mimic things like S3, EBS etc http://jnaapti.com/
  49. 49. ResourcesMore detailed notes hereCode is over at GithubKVMVirtual Machine ManagerKVM NetworkingQEMU NetworkingQEMU Images http://jnaapti.com/
  50. 50. Courtesy Server image from OpenClipArt CD image from pr0gr4mm3r.comThanks to Pradeep Kumar, Ananth M, Kiran S, Ananda M,Madhukar Pai and Shrinivas S Kulkarni for reviewing the slides and providing valuable feedback http://jnaapti.com/
  51. 51. The Jnaapti development environment is based on this setup http://jnaapti.com/
  52. 52. This talk was first delivered in the “PHP Cloud” event organized by HasGeek http://jnaapti.com/
  53. 53. Thank you!Email: gautham@jnaapti.com http://jnaapti.com/
  54. 54. Happy Hacking http://jnaapti.com/

×