A recently stepped over to Ubuntu as my daily driver on my work laptop.
Finding myself a little afraid to do stuff with it… because it is all new to me.
Gone is the comfort of years of experience in keeping my OS up and running.
Windows was the main OS i used for the last… 20 years or so.
Being a developer iḿ used to installing a bunch of tooling that will help me in my daily workflow.
Just installing all sorts of stuff without knowing what I’m doing is… risky.
Having to reinstall my laptop as a result of shitty choices i make is a expensive consequence that my clients wont accept.
So it’s time to create a safe playground for myself that will help me recover from stupid mistakes quickly.
The answer to this is visualization…
Having used VMWare for the last…. 15 years or so this was the first thing I thought of.
But why not look around if there is something better. if we already have to get accustomed to the changes in OS, why not take it to a whole new level.
Lets dive into Vagrant, Virtualbox and Docker!
Lets install some basic stuff first…
sudo apt-get update sudo apt-get upgrade sudo apt-get install virtualbox virtualbox-dkms vagrant
Now, to create a clean machine
mkdir DEV01 && cd $_ vagrant init ubuntu/xenial64; vagrant up --provider virtualbox vagrant ssh ... (do stuff here) exit
And to completely remove it all afterwards
vagrant destroy -f vagrant box remove ubuntu/xenial64 cd .. rm -rf DEV01
To get things working with windows boxes we need to install an additional vagrant plugin
vagrant plugin install winrm-fs
Unfortunately version 1.8.1, the latest version when writing this blog, contains a nasty bug.
More information can be found here.
What we need to do is the following:
cd ~/Downloads/ wget https://github.com/tobwilk/vagrant-plugin-v1.8.1-fix/archive/master.zip unzip vagrant-plugin-v1.8.1-fix-master.zip cd vagrant-plugin-v1.8.1-fix-master/ chmod a+x install.sh ./install.sh cd ~/Downloads/ rm -rf vagrant-plugin-v1.8.1-fix-master rm vagrant-plugin-v1.8.1-fix-master.zip