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.

OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl


Published on

Do you remember Vagrant? It was that last hipster thing before Docker turned into the most recent hipster thing! It's also still really helpful for software evaluations or lab environments. Normally, it works with VirtualBox on your laptop, but this approach can be too limiting. Even running just 10 VMs becomes a stretch on a laptop. It burns through your battery, SSD lifetime, disk space and threatens how many dozen browser tabs you can open... Enter the Vagrant OpenNebula providers! You can actually control Vagrant on your workstation but have the VMs running on your cloud. There are multiple ways to do that, and also limitations. In the workshop, we'll look at what is possible and how you can best benefit from - oh right! - your cloud!

Published in: Technology

OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl

  1. 1. LAB ONE 21. Oct 2016 | BERATUNG@FLORIANHEIGL.ME Vagrant running on OpenNebula?
  2. 2. what I do Sysadmin, Consultant I need to test shiny new things for other people I need to pin down bugs noone ever noticed • avg 95 browser tabs • aaand 100‘s more in OneTab Present new things: Use Vagrant on my MacBook Lab ONE
  3. 3. Test new things Vagrant is nice at times Containers: Just application deployment I need a “full stack“ Describe whole environments Vagrant can do that, but: Sysadmin stuff might need 10+ VMs just to show basics (Demoing datacenter management, clouds, etc...) FrOSCon demo: ~70 VMs running Rudder Project. Lab ONE
  4. 4. Vagrant for Sysadmin Lab ONE
  5. 5. Virtualbox → Scales badly (Overhead) → Unstable 10+ VMs → portable 32GB laptops are rare Why is it we running on laptops if we have servers??? Lab ONE
  6. 6. Vagrant provider opennebula-provider • Exists since early 2015 • By Evgeni Cherdancev • First based on rOCCI, then FOG • Fog uses RPC2 • Docs ‘fly on thin air‘ (Cloudy) • Does most of what you need • Lab ONE
  7. 7. Base config Lab ONE
  8. 8. ONE-host Grab a random box • Leftover from Check_MK training • Spin up at Scaleway • Rudder managed • autoinstalled ONE • local SSD Lab ONE
  9. 9. Install Make it work install 1 rubygem: fog install vagrant plugins: • opennebula-provider (1.1.2) • vagrant-proxyconf (1.5.2) • vagrant-share (1.1.5, system) • vagrant-skytap (0.3.4) • vagrant-sshfs (1.2.0) Dedicated user created from Sunstone (This user will be on someones computer) Lab ONE
  10. 10. Bootup Lab ONE
  11. 11. Tuning The WaitForCommunicator thing Vagrant won‘t wait for VM startup! Boot Timeout settings don‘t work! EUNREACHABLE Class: Vagrant::Action::Builtin::WaitForCommunicator -> no error handling (BAAAAD) Class: VagrantPlugins::Skytap::Action::WaitForCommunicator -> has error handling (GOOOOOOD) Lab ONE
  12. 12. Patch The Ruby smiley! .vagrant.d/gems/gems/opennebula-provider-1.1.2/ lib/opennebula-provider/action.rb Lab ONE
  13. 13. Usage Summary find a Vagrantfile adjust Vagrantfile vagrant up vagrant destroy vagrant up –provision Lab ONE
  14. 14. Bootup Lab ONE
  15. 15. Running! Lab ONE
  16. 16. Limitations Use Template ID or newest Template ID resolved by Name Memory settings: yes Shared folders: rsync (default) or SSHFS (little tricky) DO NOT set hostname if one-context does (/etc/hosts might go to hell) Doesn‘t download Adjust networks: no(*) (*it‘s not OCCI after all) Lab ONE
  17. 17. Private Networks how about unlimited private networks? brnatN on ONE-host ip range / gw managed by ONE iptables nat or vrouter normal one-context Just set up OpenVPN access to ONE-host push the route! => can ‚vagrant ssh‘ to machine Lab ONE
  18. 18. ONE Vagrant provider does it all! Offload workloads from Virtualbox to ONE Hand out easy but restricted API access to devs for tests, QA and raw performance With ruby skills, config can autoselect provider (or vagrant up –provider) Use your cloud more often give choice Lab ONE
  19. 19. 26. Oct 2016 | BERATUNG@FLORIANHEIGL.ME