Announcing Vagga 0.8.1
We are excited to announce the next version of vagga, the containerization tool that makes setting up development environments easy and fun.
This release brings local overrides for vagga commands, support of ubuntu bionic, better CI support, space reuse between multiple projects, and more.
Also while we were preparing this release vagga have got a logo:
Space Optimizations
Because containers contain a whole system, they are often quite large. Some of our users have over than a hundred projects with multiple containers in each of them. Previously, we allowed hardlinking files from multiple container versions in the same project.
Since vagga 0.8.1 the following config can save you more space:
storage-dir: ~/.vagga/images
index-all-images: true
hard-link-identical-files: true
hard-link-between-projects: true
We don’t enable it by default because malicious containers can infect files of other containers. But we explore other techniques to provide same space usage and also security (for example using reflinks instead of hard links) so stay tuned!
Local overrides
You can now add vagga.local.yaml
or .vagga/local.yaml
file to the repository and put containers and command into it. It works the same as any other mixin, but it has priority (i.e. overrides commands defined in normal vagga.yaml
and its mixins)
This can serve several purposes:
- Add a
vagga.yaml
to the project that doesn’t have one (i.e. put the file.vagga/local.yaml
, and put.vagga
in global git ignores) - Have your own commands that don’t make sense to everyone else, for example
vagga publish
if you are the only person who can publish. Or add an extra external volume having a new version of a dependency. - Generate
vagga.yaml
itself, including bootstrapping the project.
As an example of bootstrapping here is very simplistic bootstrap script:
containers:
_bootstrap-alpine:
setup:
- !Alpine v3.8commands:
_init: !Command
container: _bootstrap-alpine
run: |
echo -n "Project name: "
read name
cat <<END > vagga.yaml
containers:
alpine:
setup:
- !Alpine v3.8
commands:
run: !Command
description: "Run $name"
container: alpine
run: [echo, "Running $name"]
END
Then put file online and use it for seeding vagga.local.yaml
:
$ curl http://example.com/bootstrap.yaml > vagga.local.yaml
$ vagga _init
Project name: hello
$ vagga
Available commands:
run Run hello
For a real project, it’s expected to use cookiecutter or yeoman or any other tool for bootstrapping. The vagga.local.yaml
contains ordinary containers so you can use any scaffolding tools seamlessly without any extra setup on a host system. Bootstrapping even works when using vagga-box.
CI Support
We have a few new settings that are expected to be used on continuous integration systems:
propagate-environ
allows to propagate some environment variables to the vagga commands automatically. For example, the following works good for Gitlab CI, so that usual variables like CI_JOB_ID
and CI_COMMIT_SHA
are available in commands:
propagate-environ:
- CI
- "CI_*"
ubuntu-skip-locking: true
allows building images in parallel even when using same ubuntu package cache
versioned-build-dir: true
allows building multiple versions of the same container simultaneously (when run with the same storage dir)
Note: these are settings. I.e. they are put into $HOME/.config/vagga/settings.yaml
on a CI system itself rather than in vagga.yaml
Smaller Improvements
group
option allows to commands in the help grouped by a titlevagga --version
now works withoutvagga.yaml
- Added
rules
param to!Build
(similar to!Copy
, see previous release notes for examples) - Added
vagga --containers-only some_command
which is useful to prepare all the containers needed to run some command(s). This is often useful for building tools on top of vagga
You can find more in release notes and upgrading guide.
Contributors
Release 0.8.1 consists of 160 commits from 4 contributors. Thank you!
- Alexander Koval
- Alex Kuzmenko
- Paul Colomiets
- Rainboh