To help me learn bosh I decided to install Bosh-Lite on my Mac. The instructions to get yourself up an running are here, including more information.

What is Bosh-Lite and how can it help?

Firstly it is a self-contained, pre-built, vagrant box that includes a Bosh Director. Rather than instantiating VM’s, like Bosh normally would, it uses containers (Warden/Garden) to emulate them. This makes it ideal for running locally on a machine.

The benefit of do things this way;

  • No need to setup IaaS environment
  • Saves money because no need to use an IaaS
  • No Internet connection require. This is vital for me because I’m on the road all the time.

People also use Bosh-Lite to test their Bosh releases either manually of via a CI method.

Get up and running

The GitHub Repo does a good job at explaining what needs to be done.

However when I tried to connect to the Bosh Director I got the following error (or similar the 1st time round);

Documents/bosh-lite [ bosh target 192.168.50.4                                                                                                           master ] 3:11 PM
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
[WARNING] cannot access director, trying 4 more times...
[WARNING] cannot access director, trying 3 more times...
[WARNING] cannot access director, trying 2 more times...
[WARNING] cannot access director, trying 1 more times...
cannot access director (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert handshake failure)

After rereading the instructions I noticed the following NOTE, which I followed.

Note: If you encounter problems with VirtualBox networking try installing Oracle VM VirtualBox Extension Pack as suggested by Issue 202. Alternatively make sure you are on VirtualBox 5.1+ since previous versions had a network connectivity bug.

While this didn’t solve all my problems (it seemed to solve the issue of the Vagrant VM getting an IP address). So after some of my own troubleshoot, which didn’t get me very far, I hunted the Internet;

The fix that resolved my issue was;

brew install ruby
gem install bosh_cli --no-ri --no-rdoc
bosh target x.y.z.a

Which then allowed me to login to Bosh.

Documents/bosh-lite [ bosh target 192.168.50.4                                                                                                           master ] 3:15 PM
Target set to 'Bosh Lite Director'
Your username: admin
Enter password:
Logged in as 'admin'

I haven’t looked into why this solved my problems and to be honest I would rather spend my time learning Bosh rather than some Mac/Vagrant/Ruby issues!