logsearch / workspace

Apache License 2.0
1 stars 1 forks source link

Create LogSearch Workspace Vagrant Box #3

Closed sopel closed 9 years ago

sopel commented 9 years ago

With the initial workspace being implemented via #2, it's time to improve the getting started experience a bit. The following topics have been identified so far:

We have agreed to focus on the former first, insofar the latter is a much more volatile target (BOSH releases and GitHub clones). However, given the VM build is going to be achieved via Packer anyway, it might turn out to be not a problem to at least recreate the image for every upstream BOSH release too, we'll see.

sopel commented 9 years ago

For starters resp. testing purposes I have performed a local manual box creation via vagrant package (only works for VirtualBox). The resulting box is about ~1.1GB in size in comparison to the ~560MB of the BOSH lite base box.

sopel commented 9 years ago

We agreed to create/host the boxes manually/locally for the time being (rather than with the just rebranded/repurposed Atlas):

sopel commented 9 years ago

:information_source: - simply applying the most basic disk shrinking script reduces the box size to ~830MB:

#!/bin/bash

set -ex

# Zero out the free space to save space in the final image
# Ignore no space left on device error
dd if=/dev/zero of=/EMPTY bs=1M || true
rm -f /EMPTY
mrdavidlaing commented 9 years ago

Zero out the free space to save space in the final image

Amazing - you'd think that empty space would compress really well; but I guess it doesn't!

sopel commented 9 years ago

This stems from the different dimensions of 'empty': from an OS point of view, many blocks are still allocated, just deleted. Consequently, any block level disk processor needs to copy those over too.

sopel commented 9 years ago

:information_source: #4 only implements a manual box creation process for the moment, an automated solution via Packer will be handled via a separate issue later on.