Prototype VM base box updated to Ubuntu 16.04 Desktop

Since Ubuntu 15.10 Desktop has reached the end of its support life-cycle, I have updated the prototype to use Ubuntu 16.04 Desktop. I recommend re-provisioning the prototype VM as follows:

Re-provisioning the Prototype VM

0. If you had stored any information on the prototype VM that you wish to keep, first copy it off the VM so that it is not lost. The easiest way is to create a new folder within the /vagrant shared folder and put the data in there. In general, avoid keeping data on the prototype VM, since everything on it should be dynamically generated so that it’s easy to re-provision the VM as needed.

1. Make sure the VM is shut down. On the host machine (your desktop or laptop computer) switch to the folder where you have checked out the analytics-prototype git reposity and then run

vagrant destroy

2. The above command will delete the prototype VM from VirtualBox, however, it will not remove the base box. If you wish to free the disk space used by the older base box, you may run this command:

vagrant box remove kevinmellott91/ubuntu-15.10-desktop-amd64

3. Next, use your Git tool of choice to pull down the latest changes to the analytics-prototype git repository.

4. Now you can provision the new prototype VM with:

vagrant up

5. This will pull down the new base box and run the provisioning script. Be sure to allow the provisioning script to fully complete before interacting with the VM. IMPORTANT: It’s best to shut down the VM after first-time provisioning to allow all of the installed software to settle. Then start it a second time with the vagrant up command.

Notes About this Update

I tested several of the Ubuntu 16.04 Desktop base boxes available on Vagrant Atlas but found issues with each one I tested. As a result, I decided to construct a new base box. Going forward, the prototype will use jamesthinkbox/ubuntu-16.04-desktop-amd64 as the base box (as can be seen inside the Vagrantfile). In general, Ubuntu 16.04 Desktop appears to be much more stable than 15.10, and the first-time provisioning process goes much more smoothly with no visible errors.

To date I have not heard back from the folks at SlamData, so I have removed it from the provisioning scripts until I can get it sorted. As a result, none of the visualization examples will work at this time. However, it is still possible to run the generator and inspect the resulting analytics data using Robomongo. The provisioning script now installs Elasticsearch and Grafana, which should form the basis for forthcoming visualization examples.

If you have any questions or difficulties with the re-provisioning process, don’t hesitate to post here.

Quick note. Mike discovered a permissions issue with Vagrant provisioning on non-Windows hosts. The provisioning script for the prototype VM will work fine on a Windows host, since the permissions are wide open on VirtualBox shared folders, but it will fail on non-Windows hosts. I’ll post an update here once we have this resolved, tested, and pushed up to the code repository.

Ok, this is resolved. If you haven’t yet done the steps from the first post in this thread, then doing those steps will get you to the right place.

If you have done those steps, you should update again with these steps:

1. Open a terminal to the folder where you have checked out the analytics-prototype git repository, and delete the prototype VM with

vagrant destroy

2. Next, pull down the latest changes to the master branch of the analytics-prototype git repository with your Git tool of choice.

3. From a terminal in the repository folder, update the base box with

vagrant box update

4. Provision a new prototype VM with

vagrant up

You may see the following error a few times during provisioning. It can be safely ignored:
==> prototype: dpkg-preconfigure: Unable to re-open stdin: No such file or directory

5. Allow the provisioning script to fully complete, and then shut down the VM to allow all the installed software to settle. Then you can start it up again with

vagrant up

That completes the update process. Now, within the VM you can open a terminal and switch to the vagrant folder that is shared through to the host:

cd /vagrant

From there you can run the unit tests and generate the default analytics data set.

./units.sh ./generate.sh

You can inspect the default dataset with Robomongo from the Ubuntu search button.