Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
01
License 
Creative Commons 3.0 (BY­NC­SA) 
02
About me 
03
Andrey Adamovich 
Bio: Developer, coach, speaker, author, father 
Company: Aestas/IT (http://aestasit.com) 
E­mail: 
andre...
Hardware 
progress 
05
CPU DB: Recording Microprocessor 
History 
06
Multi­core 
processors 
Most of modern processors are multi­core 
Many of them use advanced techniques to support better p...
My laptop 
4 cores, 2.9GHz each, 16GB of RAM, 250GB SSD + 250GB HD 
During coding, answering e­mails 
etc. hardly half of ...
Other 
examples 
09
Paralella 
10
Raspberry Pi cluster 
11
OK 
12
Let's talk 
about clouds 
13
What is 
cloud? 
14
Definition: Cloud 
A cloud is a visible mass of liquid droplets or frozen crystals made of 
water or various chemicals sus...
Definition: Cloud computing I 
Cloud computing is computing in which large groups of remote servers 
are networked to allo...
Definition: Cloud computing II 
Cloud computing relies on sharing of resources to achieve coherence 
and economies of scal...
Definition: Cloud computing III 
Cloud computing, or in simpler shorthand just "the cloud", also focuses 
on maximizing th...
X­as­a­Service 
Software­as­a­Service 
(users) 
Platform­as­a­Service 
(devs) 
Infrastructure­as­a­Service 
(devs + ops) 
...
IaaS 
If you know how to work with your servers, then on top of IaaS you can 
build other XaaS. 
20
Components of effective IaaS 
Virtualized Computing + Storage services 
Networking + Security services 
OS image library s...
IaaS components 
servers 
disks 
ip addresses 
firewall settings (optional) 
images (starting point) 
snapshots (backups) ...
IaaS examples 
AWS EC2 
Google Compute Engine 
Microsoft Azure 
••• 23
IaaS vs. 
private cloud 
24
In­house 
virtualization 
Comercial: VMWare, Oracle*, Parallels 
Open­source: 
VirtualBox, KVM, Qemu, Xen, Docker, OpenSta...
VirtualBox 
26
VirtualBox 
Powerful virtualization product for enterprise as well as home use 
It has nice GUI and command line tools wit...
A bit of history 
Created by innotek GmbH 
Open­sourced 
in 2007 
innotek was acquired by Sun in 2008 
Sun was acquired by...
VirtualBox is 
local IaaS? 
29
Computing services 
Well, it's a virtualization software 
Suports x86 and AMD64/Intel64 
Supports many operating systems (...
Storage services 
Well, it's limited only by physical disk size 
The faster the better (SSD?) 
•• 31
Disk file formats 
VDI (VirtualBox) 
VMDK (VMWare) 
VHD (Windows) 
HDD (Parallels) 
•••• 32
Disk types 
Fixed­size 
disk file 
Slower creation time, faster writes 
Dynamically allocated storage file 
Faster creatio...
Networking 
services 
34
VirtualBox networking 
NAT with port forwarding 
Bridged networking 
Internal networking 
Host­only 
netwokring 
•••• 35
IP address pool 
192.168.*.* = 65536K addresses 
127.0.0.* = 256 addresses 
•• 36
Hosts 
On *nix in /etc/hosts 
On Windows in C:WindowsSystem32driversetchosts 
•• 37
Hosts file example 
192.168.33.15 local.solaris.messagebroker.net 
192.168.48.112 local.ubuntu.app.it 
127.0.0.212 local.a...
The cheapest 
DNS ever! 
39
Display 
Built­in 
viewer 
RDP/VNC 
Headless mode 
••• 40
Snapshots 
VM settings 
Virtual disk state (differencing) 
Memory 
••• 41
Image library 
Let's wait with this one a bit... 
42
API = 
VBoxManage 
43
VirtualBox commands 
44
Vagrant 
45
Vagrant features 
Simplified VirtualBox management (networking, security, shared 
drives, etc.) 
Easy to read and share co...
As simple as... 
vagrant init ubuntu/trusty64 
vagrant up 
vagrant ssh 
01. 
02. 
03. 
47
Demo I 
48
Image library 
49
Vagrant cloud 
50
What if there 
is no suitable 
box there? 51
Create your 
own! 
52
Packer 
53
How to make an image 
Download ISO file with your (favorite) OS 
Download VirtualBox guest additions ISO to match VirtualB...
Packer command 
packer build ‐force 01. solaris11.json 
55
How to use the image 
vagrant box add my/solaris11 solaris11.box ‐‐force 
vagrant init my/solaris11 
vagrant up 
1. 
2. 
3...
Demo II 
57
Disk re­sizing 
I 
First resize the file inside VirtualBox 
Then resize partition in the guest OS 
Choose maximum size car...
Disk re­sizing 
II 
VBoxManage modifyhd <absolute path to file>  
‐‐resize <size in MB> 
01. 
02. 
59
Imaginary setup 
60
Demo III 
61
VirtualBox­only 
solution 
62
VirtualBox + Docker 
63
Summary 
64
Formula 
VirtualBox + Vagrant(Cloud) + Packer = Personal Cloud 
65
Recap: Components of effective IaaS 
Virtualized Computing + Storage services 
Networking + Security services 
OS image li...
Personal cloud components 
Multi­core 
laptop or desktop computer 
VirtualBox (or VMWare) + Vagrant for virtualization 
Pa...
Documentation & links 
https://www.virtualbox.org/manual/UserManual.html 
https://docs.vagrantup.com/v2/ 
https://www.pack...
Technologies to follow 
Automation: Vagrant, Packer and other tools form HashiCorp 
Virtualization: VirtualBox, VMWare, Pa...
Questions? 
70
Grazie! 
71
Slides + code 
https://github.com/aestasit/talks2014­codemotion­milan­pc­personal­cloud­slides 
https://github.com/aestasi...
Próxima SlideShare
Cargando en…5
×

PC = Personal Cloud (or how to use your development machine with Vagrant and Virtual Box for good)

521 visualizaciones

Publicado el

by Andrey Adamovich - Have you ever wished to run production clone on your laptop to find that annoying bug? With decreasing hardware costs and growing hardware performance characteristics it becomes possible. Virtualization tools like VirtualBox come very handy at simulating real OS with real setup. Tools like Vagrant (VirtualBox wrapper) make it even easier. This presentation gives several hands-on demonstrations of Vagrant capabilities and the simplicity of integrating that into your normal development cycle.

Publicado en: Tecnología
  • Sé el primero en comentar

PC = Personal Cloud (or how to use your development machine with Vagrant and Virtual Box for good)

  1. 1. 01
  2. 2. License Creative Commons 3.0 (BY­NC­SA) 02
  3. 3. About me 03
  4. 4. Andrey Adamovich Bio: Developer, coach, speaker, author, father Company: Aestas/IT (http://aestasit.com) E­mail: andrey@aestasit.com Linkedin: http://www.linkedin.com/in/andreyadamovich Lanyrd: http://lanyrd.com/profile/andrey­adamovich GitHub: https://github.com/aadamovich SO: http://stackoverflow.com/users/162792/andrey­adamovich Twitter: @aestasit •••••••• 04
  5. 5. Hardware progress 05
  6. 6. CPU DB: Recording Microprocessor History 06
  7. 7. Multi­core processors Most of modern processors are multi­core Many of them use advanced techniques to support better parallelism and resource utilisation (hyper­threading, caching etc.) Many of them are optimized for virtualization •• • 07
  8. 8. My laptop 4 cores, 2.9GHz each, 16GB of RAM, 250GB SSD + 250GB HD During coding, answering e­mails etc. hardly half of the cores is used My mobile phone has as many cores as my laptop My game console (Wii) is way less powerful than my phone •••• 08
  9. 9. Other examples 09
  10. 10. Paralella 10
  11. 11. Raspberry Pi cluster 11
  12. 12. OK 12
  13. 13. Let's talk about clouds 13
  14. 14. What is cloud? 14
  15. 15. Definition: Cloud A cloud is a visible mass of liquid droplets or frozen crystals made of water or various chemicals suspended in the atmosphere above the surface of a planetary body. Source: Wikipedia “ 15
  16. 16. Definition: Cloud computing I Cloud computing is computing in which large groups of remote servers are networked to allow centralized data storage and online access to computer services or resources. Source: Wikipedia “ 16
  17. 17. Definition: Cloud computing II Cloud computing relies on sharing of resources to achieve coherence and economies of scale, similar to a utility (like the electricity grid) over a network. Source: Wikipedia “ 17
  18. 18. Definition: Cloud computing III Cloud computing, or in simpler shorthand just "the cloud", also focuses on maximizing the effectiveness of the shared resources. Source: Wikipedia “ 18
  19. 19. X­as­a­Service Software­as­a­Service (users) Platform­as­a­Service (devs) Infrastructure­as­a­Service (devs + ops) ••• 19
  20. 20. IaaS If you know how to work with your servers, then on top of IaaS you can build other XaaS. 20
  21. 21. Components of effective IaaS Virtualized Computing + Storage services Networking + Security services OS image library service Rich API •••• 21
  22. 22. IaaS components servers disks ip addresses firewall settings (optional) images (starting point) snapshots (backups) •••••• 22
  23. 23. IaaS examples AWS EC2 Google Compute Engine Microsoft Azure ••• 23
  24. 24. IaaS vs. private cloud 24
  25. 25. In­house virtualization Comercial: VMWare, Oracle*, Parallels Open­source: VirtualBox, KVM, Qemu, Xen, Docker, OpenStack •• 25
  26. 26. VirtualBox 26
  27. 27. VirtualBox Powerful virtualization product for enterprise as well as home use It has nice GUI and command line tools with tons of parameters It is open­source and free for personal use ••• 27
  28. 28. A bit of history Created by innotek GmbH Open­sourced in 2007 innotek was acquired by Sun in 2008 Sun was acquired by Oracle in 2010 •••• 28
  29. 29. VirtualBox is local IaaS? 29
  30. 30. Computing services Well, it's a virtualization software Suports x86 and AMD64/Intel64 Supports many operating systems (Windows, Linux, Solaris, MacOS) ••• 30
  31. 31. Storage services Well, it's limited only by physical disk size The faster the better (SSD?) •• 31
  32. 32. Disk file formats VDI (VirtualBox) VMDK (VMWare) VHD (Windows) HDD (Parallels) •••• 32
  33. 33. Disk types Fixed­size disk file Slower creation time, faster writes Dynamically allocated storage file Faster creation time, slower writes File size is growing when more disk sectors are written Defragmenting disk inside guest OS will reduce file size • • • ••• 33
  34. 34. Networking services 34
  35. 35. VirtualBox networking NAT with port forwarding Bridged networking Internal networking Host­only netwokring •••• 35
  36. 36. IP address pool 192.168.*.* = 65536K addresses 127.0.0.* = 256 addresses •• 36
  37. 37. Hosts On *nix in /etc/hosts On Windows in C:WindowsSystem32driversetchosts •• 37
  38. 38. Hosts file example 192.168.33.15 local.solaris.messagebroker.net 192.168.48.112 local.ubuntu.app.it 127.0.0.212 local.active.directory.com 01. 02. 03. 38
  39. 39. The cheapest DNS ever! 39
  40. 40. Display Built­in viewer RDP/VNC Headless mode ••• 40
  41. 41. Snapshots VM settings Virtual disk state (differencing) Memory ••• 41
  42. 42. Image library Let's wait with this one a bit... 42
  43. 43. API = VBoxManage 43
  44. 44. VirtualBox commands 44
  45. 45. Vagrant 45
  46. 46. Vagrant features Simplified VirtualBox management (networking, security, shared drives, etc.) Easy to read and share configuration Package virtual machines as reusable boxes • •• 46
  47. 47. As simple as... vagrant init ubuntu/trusty64 vagrant up vagrant ssh 01. 02. 03. 47
  48. 48. Demo I 48
  49. 49. Image library 49
  50. 50. Vagrant cloud 50
  51. 51. What if there is no suitable box there? 51
  52. 52. Create your own! 52
  53. 53. Packer 53
  54. 54. How to make an image Download ISO file with your (favorite) OS Download VirtualBox guest additions ISO to match VirtualBox version Free up local disk space (2x used virtual disk size + ISO size) Set­up environment variables Create Packer's JSON configuration Start Packer build Go somewhere for 30­40 minutes 1. 2. 3. 4. 5. 6. 7. 54
  55. 55. Packer command packer build ‐force 01. solaris11.json 55
  56. 56. How to use the image vagrant box add my/solaris11 solaris11.box ‐‐force vagrant init my/solaris11 vagrant up 1. 2. 3. 56
  57. 57. Demo II 57
  58. 58. Disk re­sizing I First resize the file inside VirtualBox Then resize partition in the guest OS Choose maximum size carefully ••• 58
  59. 59. Disk re­sizing II VBoxManage modifyhd <absolute path to file> ‐‐resize <size in MB> 01. 02. 59
  60. 60. Imaginary setup 60
  61. 61. Demo III 61
  62. 62. VirtualBox­only solution 62
  63. 63. VirtualBox + Docker 63
  64. 64. Summary 64
  65. 65. Formula VirtualBox + Vagrant(Cloud) + Packer = Personal Cloud 65
  66. 66. Recap: Components of effective IaaS Virtualized Computing + Storage services Networking + Security services OS image library service Rich API •••• 66
  67. 67. Personal cloud components Multi­core laptop or desktop computer VirtualBox (or VMWare) + Vagrant for virtualization Packer (and patience) for image creation VagrantCloud or external USB drive for image library /etc/hosts, NAT, tunnelling for DNS and other network magic Provisioning tools (Puppet, Chef, Ansible etc.) to fully setup your cloud machines Version control to keep track of your machine definitions •••••• • 67
  68. 68. Documentation & links https://www.virtualbox.org/manual/UserManual.html https://docs.vagrantup.com/v2/ https://www.packer.io/docs https://vagrantcloud.com/ •••• 68
  69. 69. Technologies to follow Automation: Vagrant, Packer and other tools form HashiCorp Virtualization: VirtualBox, VMWare, Parallels, Hyper­V, Xen etc. Containers: Docker ecosystem Build your own IaaS with OpenStack PaaS offerings: OpenShift, CloudFoundry etc. Cloud providers: AWS, Azure, GCE •••••• 69
  70. 70. Questions? 70
  71. 71. Grazie! 71
  72. 72. Slides + code https://github.com/aestasit/talks2014­codemotion­milan­pc­personal­cloud­slides https://github.com/aestasit/talks2014­codemotion­milan­pc­personal­cloud­setup • • 72

×