Notes to self

Browsing...

Inception: running Vagrant inside Vagrant with KVM

Since I package and maintain Vagrant and vagrant-libvirt for Fedora, I have a need to test new builds. But since I run just one version of Fedora and I don’t really feel like testing it directly on my host system, I actually use Vagrant to test Vagrant. In other words I run Vagrant with KVM and inside I download the new builds and run Vagrant with KVM again. This is possible because KVM supports nested virtualization. In fact I already wrote about setting that up with virt-manager. But today I show you how to do it using Vagrant itself.

Safe code evaluation in Ruby with $SAFE

As you probably know, you can use eval() to evaluate Ruby code from Ruby. But evaluating things that come from the outside of the program like user inputs can be dangerous. Why they can be dangerous you ask? eval() evaluates anything as we would program it ourselves. Basically anything can happen. That’s why it’s best to avoid eval() for such inputs altogether. But we can evaluate Ruby in a safer manner too; with $SAFE.

Running test/unit suites with Minitest

Sometimes it happens that you want to run an old test suite, but you don’t have a correct version of the testing framework available. That happens a lot in Fedora since tooling around RPM supports only one version of each component and new rubies does not come with test/unit anymore. As we still need to run the tests, we have two options. Either go ahead and update the whole test suite to a new version or just use Ruby’s dynamic nature to actually run it. Let’s look how the latter can look like.

Creating default configuration for every Vagrant project

Are you tired of putting the same sane configuration options to every Vagrantfile? Here is how to make the life with Vagrant a little easier.

Vagrant NFS exports on Fedora 21

If you are using Vagrant chances are you would like to use NFS instead of rsync to speed up shared folders and avoid annoying vagrant rsync-auto command. But what to do when Vagrant just hang on Mounting NFS shared folders in Fedora?

by Josef Strzibny
RSS