SlideShare une entreprise Scribd logo
1  sur  54
Building your own
Desktop Cloud Environment

Gautham Pai, Founder
jnaapti
The problems we face as developers
Our development environments accumulate lots of
applications and libraries over a period of months.

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

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

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

                      http://jnaapti.com/
Solution?




How about Desktop Virtualization?




            http://jnaapti.com/
Why Desktop Virtualization?
Bringing our development environment as close to the
production environment as possible.

Replicable deployment - verify everything before
deploying to staging or production.

Containerising functionality.

"Don't panic" environment for experimentation

Ease of provisioning for new employees.


                     http://jnaapti.com/
Virtualization or Cloud?
What I am talking about is closer to virtualization than
cloud computing.

For example, we are not dealing with transparent
scaling, spike load handling etc.




                     http://jnaapti.com/
Why QEMU-KVM and not Virtualbox?
KVM is part of the Linux Kernel

Virtualbox is from Oracle

KVM provides better performance




                    http://jnaapti.com/
What we want to try out
Create a development environment with functionalities
partitioned over separate VMs.

Ensure that setting up this environment is not more
than a few hours job.

Ensure that bringing up the environment does not take
more than a few minutes if not seconds.

Ensure that the environment can run in a laptop with
standard configuration.

                        http://jnaapti.com/
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 space

This will help us run as many as 5 VM images in parallel

                      http://jnaapti.com/
Demo




http://jnaapti.com/
The Approach
In this demo, I will take you through the steps to
create a multi-VM development environment

In addition to our dev environment (dev-server), we
will have a separate code-server, a web-server and a
db-server setup.

We then run it end-to-end – write some code, check it
in, pull it into the web server, deploy the code and
then test the new version of the app.

                     http://jnaapti.com/
First, a look at a few terminologies
QEMU is a generic and open source machine emulator
and virtualizer.

KVM (for Kernel-based Virtual Machine) is a full
virtualization solution for Linux on x86 hardware.

The Virtual Machine Manager application (virt-
manager for short package name) is a desktop user
interface for managing virtual machines.



                     http://jnaapti.com/
Demo




http://jnaapti.com/
The Approach
We first create a base VM and install the OS in it, using
the standard Ubuntu 10.04.2 Server ISO image

We then install a SSH server and setup passwordless
SSH access

We then clone this system to as many systems as we
need and setup various servers
(code/caching/web/etc) on them



                     http://jnaapti.com/
Installing Pre-requisites
$ sudo apt-get install virt-manager qemu-kvm




                    http://jnaapti.com/
Starting Virt Manager
$ sudo virt-manager




                  http://jnaapti.com/
Networking Requirements
Every VM should have its own IP address.

Every VM should be accessible from every other VM
and that includes host.

Every VM must be able to connect to the Internet.

Solution? Bridged Networking.




                     http://jnaapti.com/
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 Installation
Login to the Base VM

Install the latest updates

Make sure you can connect to the host from guest and
vice-versa

Setup password-less SSH access

(Update interface identifier)



                     http://jnaapti.com/
Cloning the Base VM
Add the DNS server that we use for guest IP allocation
to resolv.conf, so that you can address VMs using their
hostnames

Use virt-clone to clone the base VM

Start the new VM

Change the hostname of the new VM

Reboot the new VM


                     http://jnaapti.com/
Starting and Stopping the VMs
$ #Start the domains
$ virsh start webserver && virsh start dbserver &&
virsh start codeserver
$ #Destroy the domains
$ virsh destroy webserver && virsh destroy
dbserver && virsh destroy codeserver




                       http://jnaapti.com/
Where to go from here?
Setting up package mirrors

Snapshot creation on the fly

You can mimic things like S3, EBS etc




                     http://jnaapti.com/
Resources
More detailed notes here

Code is over at Github

KVM

Virtual Machine Manager

KVM Networking

QEMU Networking

QEMU Images

                    http://jnaapti.com/
Courtesy
 Server image from OpenClipArt

 CD image from pr0gr4mm3r.com



Thanks 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/
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://jnaapti.com/
Thank you!
Email: gautham@jnaapti.com




        http://jnaapti.com/
Happy Hacking




  http://jnaapti.com/

Contenu connexe

Tendances

Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Automated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMAutomated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMopenQRM Enterprise GmbH
 
openQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloudopenQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloudopenQRM Enterprise GmbH
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Automated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM CloudAutomated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM CloudopenQRM Enterprise GmbH
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development SystemPaul Bearne
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash courseMarcus Deglos
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packerfrastel
 
A Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandA Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandJeremy Gimbel
 
Building (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerBuilding (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerCristovao G. Verstraeten
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu ServerForget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Serveraaroncouch
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual InfrastructureBryan McLellan
 
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...Sebastian Neubauer
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDanny Abukalam
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usagevincentvdk
 
Build a private cloud – prototype and test with open nebula
Build a private cloud – prototype and test with open nebulaBuild a private cloud – prototype and test with open nebula
Build a private cloud – prototype and test with open nebulaA B M Moniruzzaman
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Michele Orselli
 
Virtual Machine LAMP on Windows
Virtual Machine LAMP on WindowsVirtual Machine LAMP on Windows
Virtual Machine LAMP on Windowsmikehie
 

Tendances (20)

Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Automated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMAutomated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRM
 
openQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloudopenQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloud
 
Vagrant for real
Vagrant for realVagrant for real
Vagrant for real
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Automated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM CloudAutomated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM Cloud
 
How To Set a Vagrant Development System
How To Set a Vagrant Development SystemHow To Set a Vagrant Development System
How To Set a Vagrant Development System
 
Vagrant crash course
Vagrant crash courseVagrant crash course
Vagrant crash course
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
A Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandA Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can Understand
 
Building (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerBuilding (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with Packer
 
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu ServerForget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
Forget MAMP and WAMP, Use Virtual Box to Have a Real Ubuntu Server
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual Infrastructure
 
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMU
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 
Build a private cloud – prototype and test with open nebula
Build a private cloud – prototype and test with open nebulaBuild a private cloud – prototype and test with open nebula
Build a private cloud – prototype and test with open nebula
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Virtual Machine LAMP on Windows
Virtual Machine LAMP on WindowsVirtual Machine LAMP on Windows
Virtual Machine LAMP on Windows
 

Similaire à Building your own Desktop Cloud Environment

Tech X Virtualization Tips
Tech X Virtualization TipsTech X Virtualization Tips
Tech X Virtualization TipsYoussef EL HADJ
 
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
Virtualization  technology "comparison vmware 9 vs virtualbox 4.2"Virtualization  technology "comparison vmware 9 vs virtualbox 4.2"
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"Lagendary Sheeva
 
Ws80 using VMware
Ws80 using VMwareWs80 using VMware
Ws80 using VMwareUmesh Gupta
 
Virtualization using VMWare Workstation
Virtualization using VMWare WorkstationVirtualization using VMWare Workstation
Virtualization using VMWare WorkstationHitesh Gupta
 
Sdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint FinalSdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint FinalStephen Rose
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To LinuxZeeshan Rizvi
 
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezDevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezAnthony Alvarez
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 
Managing VMware with PowerShell - VMworld 2008
Managing VMware with PowerShell - VMworld 2008Managing VMware with PowerShell - VMworld 2008
Managing VMware with PowerShell - VMworld 2008Carter Shanklin
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internalsShapeBlue
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for DevelopersJohn Coggeshall
 
VM201 - IdoSphere
VM201 - IdoSphereVM201 - IdoSphere
VM201 - IdoSphereCarl Tyler
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for DevelopersJohn Coggeshall
 
Storage and hyper v - the choices you can make and the things you need to kno...
Storage and hyper v - the choices you can make and the things you need to kno...Storage and hyper v - the choices you can make and the things you need to kno...
Storage and hyper v - the choices you can make and the things you need to kno...Louis Göhl
 

Similaire à Building your own Desktop Cloud Environment (20)

Tech X Virtualization Tips
Tech X Virtualization TipsTech X Virtualization Tips
Tech X Virtualization Tips
 
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
Virtualization  technology "comparison vmware 9 vs virtualbox 4.2"Virtualization  technology "comparison vmware 9 vs virtualbox 4.2"
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
 
Ws80 using VMware
Ws80 using VMwareWs80 using VMware
Ws80 using VMware
 
Vagrant
VagrantVagrant
Vagrant
 
Vagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy StepsVagrant Up in 5 Easy Steps
Vagrant Up in 5 Easy Steps
 
Virtualization using VMWare Workstation
Virtualization using VMWare WorkstationVirtualization using VMWare Workstation
Virtualization using VMWare Workstation
 
Ws90 using
Ws90 usingWs90 using
Ws90 using
 
10215 A 03
10215 A 0310215 A 03
10215 A 03
 
Sdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint FinalSdwest2008 V101 F Dpowerpoint Final
Sdwest2008 V101 F Dpowerpoint Final
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
 
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezDevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
 
Comando kvm terminal
Comando kvm terminalComando kvm terminal
Comando kvm terminal
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
Managing VMware with PowerShell - VMworld 2008
Managing VMware with PowerShell - VMworld 2008Managing VMware with PowerShell - VMworld 2008
Managing VMware with PowerShell - VMworld 2008
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internals
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
VM201 - IdoSphere
VM201 - IdoSphereVM201 - IdoSphere
VM201 - IdoSphere
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Storage and hyper v - the choices you can make and the things you need to kno...
Storage and hyper v - the choices you can make and the things you need to kno...Storage and hyper v - the choices you can make and the things you need to kno...
Storage and hyper v - the choices you can make and the things you need to kno...
 

Plus de Jnaapti

Jnaapti - Who we are and What we do
Jnaapti - Who we are and What we doJnaapti - Who we are and What we do
Jnaapti - Who we are and What we doJnaapti
 
The Virtual Coach Platform - powered by jnaapti
The Virtual Coach Platform - powered by jnaaptiThe Virtual Coach Platform - powered by jnaapti
The Virtual Coach Platform - powered by jnaaptiJnaapti
 
Jnaapti Training Process
Jnaapti Training ProcessJnaapti Training Process
Jnaapti Training ProcessJnaapti
 
The Jnaapti Virtual Coach Platform
The Jnaapti Virtual Coach PlatformThe Jnaapti Virtual Coach Platform
The Jnaapti Virtual Coach PlatformJnaapti
 
I AM STARTING UP - HOW DO I START CODING?
I AM STARTING UP - HOW DO I START CODING?I AM STARTING UP - HOW DO I START CODING?
I AM STARTING UP - HOW DO I START CODING?Jnaapti
 
jnaapti's Pitch at Startup Saturday - Apr 12th 2014
jnaapti's Pitch at Startup Saturday - Apr 12th 2014jnaapti's Pitch at Startup Saturday - Apr 12th 2014
jnaapti's Pitch at Startup Saturday - Apr 12th 2014Jnaapti
 
Dealing with web scale data
Dealing with web scale dataDealing with web scale data
Dealing with web scale dataJnaapti
 

Plus de Jnaapti (7)

Jnaapti - Who we are and What we do
Jnaapti - Who we are and What we doJnaapti - Who we are and What we do
Jnaapti - Who we are and What we do
 
The Virtual Coach Platform - powered by jnaapti
The Virtual Coach Platform - powered by jnaaptiThe Virtual Coach Platform - powered by jnaapti
The Virtual Coach Platform - powered by jnaapti
 
Jnaapti Training Process
Jnaapti Training ProcessJnaapti Training Process
Jnaapti Training Process
 
The Jnaapti Virtual Coach Platform
The Jnaapti Virtual Coach PlatformThe Jnaapti Virtual Coach Platform
The Jnaapti Virtual Coach Platform
 
I AM STARTING UP - HOW DO I START CODING?
I AM STARTING UP - HOW DO I START CODING?I AM STARTING UP - HOW DO I START CODING?
I AM STARTING UP - HOW DO I START CODING?
 
jnaapti's Pitch at Startup Saturday - Apr 12th 2014
jnaapti's Pitch at Startup Saturday - Apr 12th 2014jnaapti's Pitch at Startup Saturday - Apr 12th 2014
jnaapti's Pitch at Startup Saturday - Apr 12th 2014
 
Dealing with web scale data
Dealing with web scale dataDealing with web scale data
Dealing with web scale data
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

Building your own Desktop Cloud Environment

  • 1. Building your own Desktop Cloud Environment Gautham Pai, Founder jnaapti
  • 2. The problems we face as developers Our development environments accumulate lots of applications and libraries over a period of months. We fear that we may screw up our development environment and that means unproductive man-hours. We are usually in the habit of installing everything in one machine. We forget that a multi-machine deployment is different from a single machine deployment. http://jnaapti.com/
  • 3. Solution? How about Desktop Virtualization? http://jnaapti.com/
  • 4. Why Desktop Virtualization? Bringing our development environment as close to the production environment as possible. Replicable deployment - verify everything before deploying to staging or production. Containerising functionality. "Don't panic" environment for experimentation Ease of provisioning for new employees. http://jnaapti.com/
  • 5. Virtualization or Cloud? What I am talking about is closer to virtualization than cloud computing. For example, we are not dealing with transparent scaling, spike load handling etc. http://jnaapti.com/
  • 6. Why QEMU-KVM and not Virtualbox? KVM is part of the Linux Kernel Virtualbox is from Oracle KVM provides better performance http://jnaapti.com/
  • 7. What we want to try out Create a development environment with functionalities partitioned over separate VMs. Ensure that setting up this environment is not more than a few hours job. Ensure that bringing up the environment does not take more than a few minutes if not seconds. Ensure that the environment can run in a laptop with standard configuration. http://jnaapti.com/
  • 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 space This will help us run as many as 5 VM images in parallel http://jnaapti.com/
  • 10. The Approach In this demo, I will take you through the steps to create a multi-VM development environment In addition to our dev environment (dev-server), we will have a separate code-server, a web-server and a db-server setup. We then run it end-to-end – write some code, check it in, pull it into the web server, deploy the code and then test the new version of the app. http://jnaapti.com/
  • 11. First, a look at a few terminologies QEMU is a generic and open source machine emulator and virtualizer. KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware. The Virtual Machine Manager application (virt- manager for short package name) is a desktop user interface for managing virtual machines. http://jnaapti.com/
  • 13. The Approach We first create a base VM and install the OS in it, using the standard Ubuntu 10.04.2 Server ISO image We then install a SSH server and setup passwordless SSH access We then clone this system to as many systems as we need and setup various servers (code/caching/web/etc) on them http://jnaapti.com/
  • 14. Installing Pre-requisites $ sudo apt-get install virt-manager qemu-kvm http://jnaapti.com/
  • 15. Starting Virt Manager $ sudo virt-manager http://jnaapti.com/
  • 16. Networking Requirements Every VM should have its own IP address. Every VM should be accessible from every other VM and that includes host. Every VM must be able to connect to the Internet. Solution? Bridged Networking. http://jnaapti.com/
  • 17. Setting up the Bridge Network http://jnaapti.com/
  • 18. Name your Virtual Network http://jnaapti.com/
  • 19. Choose an IPv4 Address Space http://jnaapti.com/
  • 20. Select DHCP Range http://jnaapti.com/
  • 21. Setup NAT forwarding http://jnaapti.com/
  • 22. Review and finish the wizard http://jnaapti.com/
  • 23. Create the Base VM http://jnaapti.com/
  • 24. Choose the Distribution to Install http://jnaapti.com/
  • 25. Set RAM and CPUs http://jnaapti.com/
  • 26. Set the Disk Space http://jnaapti.com/
  • 27. Finalize the VM Creation http://jnaapti.com/
  • 28. Install the OS in the Base VM http://jnaapti.com/
  • 29. Select Hostname http://jnaapti.com/
  • 31. Confirm Disk Format http://jnaapti.com/
  • 32. Installation Progress http://jnaapti.com/
  • 33. Installation Progress http://jnaapti.com/
  • 35. Set Username http://jnaapti.com/
  • 36. Configure APT http://jnaapti.com/
  • 37. Set Automatic Upgrades http://jnaapti.com/
  • 38. Install Additional Software http://jnaapti.com/
  • 39. Install Pre-defined Collections http://jnaapti.com/
  • 40. Installation Progress http://jnaapti.com/
  • 41. Install GRUB http://jnaapti.com/
  • 42. Install GRUB http://jnaapti.com/
  • 43. Installation Complete http://jnaapti.com/
  • 44. Installation Complete http://jnaapti.com/
  • 45. Verifying the Base VM Installation Login to the Base VM Install the latest updates Make sure you can connect to the host from guest and vice-versa Setup password-less SSH access (Update interface identifier) http://jnaapti.com/
  • 46. Cloning the Base VM Add the DNS server that we use for guest IP allocation to resolv.conf, so that you can address VMs using their hostnames Use virt-clone to clone the base VM Start the new VM Change the hostname of the new VM Reboot the new VM http://jnaapti.com/
  • 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 destroy dbserver && virsh destroy codeserver http://jnaapti.com/
  • 48. Where to go from here? Setting up package mirrors Snapshot creation on the fly You can mimic things like S3, EBS etc http://jnaapti.com/
  • 49. Resources More detailed notes here Code is over at Github KVM Virtual Machine Manager KVM Networking QEMU Networking QEMU Images http://jnaapti.com/
  • 50. Courtesy Server image from OpenClipArt CD image from pr0gr4mm3r.com Thanks 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. The Jnaapti development environment is based on this setup http://jnaapti.com/
  • 52. This talk was first delivered in the “PHP Cloud” event organized by HasGeek http://jnaapti.com/
  • 54. Happy Hacking http://jnaapti.com/