Skip to content
Narayan Desai edited this page Jan 26, 2015 · 4 revisions

Changes

  • systemd replaces sysvinit for all init handling
  • An important side effect of using systemd is the network configuration in /etc/network/interfaces is no longer supported.
  • use crosstool-ng for compilation
  • the go compiler is also built from source
  • Kernel updated to 3.14.27
  • OpenSSL updated to 1.0.1k

Building using vagrant

The easiest way to build is to use vagrant. This will download a suitable base box and install prerequisites.

git clone git@github.com:mistifyio/mistify-os.git
cd mistify-os
git fetch
git checkout 20150116
vagrant up

Once the box is booted, you can vagrant ssh into it then run:

./buildmistify \
--builddir /home/vagrant/build \
--buildroot /home/vagrant/buildroot \
--toolchaindir /home/vagrant/toolchain \
--godir /home/vagrant/go \
--buildroottag 20150116

Make sure the above is ran inside vagrant.

The build will take about an hour depending on your hardware.

Building without vagrant under Linux

See the NOTES section below for information regarding prerequisites for building outside of vagrant.

Building Mistify-OS on Linux without vagrant is very similar to the above. Instead of using vagrant simply create a project directory (projectdir) and then from within that project directory:

git clone git@github.com:mistifyio/mistify-os.git
cd mistify-os
git fetch
git checkout 20150116

Then, to build:

./buildmistify \
--builddir <projectdir>/build \
--buildroot <projectdir>/buildroot \
--toolchaindir <projectdir>/toolchain \
--godir <projectdir>/go \
--buildroottag 20150116

This keeps the build targets outside the mistify-os directory itself and allows caching the toolchain which speeds subsequent builds. NOTE: Use ./buildmistify --help to see what build options are available and the current settings.

Testing using vagrant

The build will produce a kernel and an initrd. This can be used to netboot. There is a helper script included that will produce an iso as well:

cd /vagrant
scripts/make-iso /home/vagrant/build/images mistify.iso

On the host side of vagrant, you can now burn this iso or boot a vm from it. Note, when using a VM you must use a product that supports nested virtualization. Vmware Fusion/Workstation does, but VirtualBox does not.

When using VMWare Fusion, for example, create a blank VM to boot from the iso with 1+ SCSI disks. When booting, enter y when asked about creating a Zpool.

The root password is LetMeIn2

The test script included in test/test-api.sh can be ran with the IP address of the new VM as its only argument. It requires curl and jq.

Known Issues

  • By default, the init scripts will setup all non-loopback interfaces for DHCP. For the tests to run, you should create a bridge named br0 and add interfaces to it.
  • If an image fails to download, it will be stuck in the pending status. You can delete it to try again: curl -X DELETE http://<ip>:8080/images/<image-id>
  • Build takes a long time. Currently, we rebuild the build toolchain. In the future, we will cache it and possibly download on first build.
  • If not using vagrant to provision a build host, you need to install the packages that the vagrant provision would install.

Notes