Notes to self

Vagrant assistant for your DevAssistant

You have probably heard about Vagrant coming to Fedora and might have heard about DevAssistant too. DevAssistant can make your development easier by setting up your project’s basic structure, installing needed dependencies or tools. But if you wanted to use Vagrant for your project as well, you needed to install and configure it separately. Until now.

I and my colleague Petr Hráček started to work on a DevAssistant’s Vagrant assistant for your projects. The rationale is that sometimes even our Vagrant RPM packages cannot state the dependencies on 100% (because plain vagrant package with docker support won’t install docker-io package) and sometimes we cannot install something for our users automatically (like polkit rules for not entering the password when starting libvirt). Also we cannot help anybody with further Vagrantfile configuration. But now we can! Enter DevAssistant.

Install DevAssistant on Fedora:

$ sudo yum install devassistant

And install our new Vagrant assistant from DAPI:

$ da pkg install vagrant
$ da tweak vagrant --help
usage: tweak vagrant [-h] {docker,libvirt,lxc,virtualbox} ...

This is base Vagrant assistant. You have to choose a specific project type.

optional arguments:
  -h, --help            show this help message and exit

subassistants:
  Following subassistants will help you with setting up your project.

  {docker,libvirt,lxc,virtualbox}

As you can see, our assistant can already help you with setting up docker, libvirt, lxc and virtualbox providers.

If you want to use libvirt provider and also include the polkit rules that let Vagrant start libvirt domains without password you can run:

$ da tweak vagrant libvirt --path ~/tmp --include-polkit-rules

--path is the path to your project root directory.

If you are more of a GUI persion, just fire up devassistant-gui, navigate to the second (tweak) tab, click Vagrant and select your provider.

Now if you go to your project’s directory, you should find a Vagrantfile that is configured to use libvirt provider and has many commented out options on how to further configure the Vagrant environment including some libvirt options. Sweet!

What next? The development just started and we hopefully find some more time to implement some other features. Some of them might be setting up NFS, vagrant-registration plugin or direcly specify/select your box from the assistant.

Check out my book
Deployment from Scratch is unique Linux book about web application deployment. Learn how deployment works from the first principles rather than YAML files of a specific tool.
by Josef Strzibny
RSS