19
LAB ONE 21. Oct 2016 | [email protected] Vagrant running on OpenNebula?

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

Embed Size (px)

Citation preview

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

LAB ONE

21.Oct2016|[email protected]

Vagrant running on OpenNebula?

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

what I doSysadmin,Consultant

IneedtotestshinynewthingsforotherpeopleIneedtopindownbugsnooneevernoticed

• avg95browsertabs• aaand100‘smoreinOneTab

Presentnewthings:UseVagrantonmyMacBook

LabONE

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

Test new things

VagrantisniceattimesContainers:JustapplicationdeploymentIneeda“fullstack“DescribewholeenvironmentsVagrantcandothat,but:

Sysadminstuffmightneed10+VMsjusttoshowbasics(Demoingdatacentermanagement,clouds,etc...)FrOSCondemo:~70VMsrunningRudderProject.

LabONE

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

Vagrant for Sysadmin

LabONE

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

Virtualbox

→Scalesbadly(Overhead)

→Unstable10+VMs

→portable 32GBlaptopsarerare

Whyisitwerunningonlaptops if

wehaveservers???

LabONE

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

Vagrant provideropennebula-provider

• Existssinceearly2015• ByEvgeniCherdancev• FirstbasedonrOCCI,thenFOG• FogusesRPC2• Docs‘flyonthinair‘(Cloudy)• Doesmostofwhatyouneed

• https://github.com/eucher/opennebula-provider/

LabONE

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

Base config

LabONE

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

ONE-hostGrabarandom box

• LeftoverfromCheck_MKtraining• SpinupatScaleway• Ruddermanaged• autoinstalledONE• localSSD

LabONE

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

InstallMakeitwork

install1rubygem: foginstallvagrantplugins:

• 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 usercreatedfromSunstone(Thisuserwillbeonsomeonescomputer)

LabONE

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

Bootup

LabONE

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

TuningTheWaitForCommunicatorthingVagrantwon‘twaitforVMstartup!BootTimeoutsettingsdon‘twork!EUNREACHABLE

Class:Vagrant::Action::Builtin::WaitForCommunicator->noerrorhandling(BAAAAD)

Class:VagrantPlugins::Skytap::Action::WaitForCommunicator->haserrorhandling(GOOOOOOD)

LabONE

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

PatchTheRubysmiley!

.vagrant.d/gems/gems/opennebula-provider-1.1.2/lib/opennebula-provider/action.rb

LabONE

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

UsageSummary

finda VagrantfileadjustVagrantfilevagrantupvagrantdestroyvagrantup–provision

LabONE

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

Bootup

LabONE

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

Running!

LabONE

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

Limitations

UseTemplateIDornewestTemplateIDresolvedbyNameMemorysettings:yesSharedfolders:rsync(default)orSSHFS(littletricky)DONOTsethostname ifone-contextdoes(/etc/hostsmightgotohell)Doesn‘tdownloadvagrantbox.esAdjustnetworks:no(*)

(*it‘snotOCCIafterall)

LabONE

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

Private Networks

howaboutunlimited privatenetworks?

brnatNonONE-hostiprange/gwmanagedbyONEiptablesnatorvrouternormalone-contextJustsetupOpenVPNaccesstoONE-hostpushtheroute!=>can‚vagrantssh‘tomachine

LabONE

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

ONEVagrantproviderdoesitall!

OffloadworkloadsfromVirtualboxtoONE

HandouteasybutrestrictedAPIaccesstodevsfortests,QAandrawperformance

Withrubyskills,configcanautoselectprovider(orvagrantup–provider)

Useyourcloud moreoften givechoice

LabONE

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

26.Oct2016|[email protected]