Getting Started with Fli: Using Vagrant and Virtualbox

FlockerHub and Fli logo

    Take advtanage of your 5 free GB while it lasts! Sign up and start using FlockerHub

    This is the first post in a series that is aimed at getting you off the ground running and using Fli and FlockerHub.

    Use Vagrant and VirtualBox

    Using Vagrant and VirtualBox on Mac OSX and Windows machine is a great way to install operating systems or development environments that aren’t native to either Mac or Windows.

    In this section we will use the development tool from HashiCorp called Vagrant to create a reproducible file that can bootstrap us directly into a Fli environment. We’ll also be using VirtualBox as our Mac OSX hypervisor, which will allow us to start a Linux environment that is supported by Fli on a Mac.

    Prerequisites for Mac

    If you don’t already have Git, Vagrant or VirtualBox, download and install them now.

    Video Walk-through

    If you would like to view the video, see below.

    Step-by-Step Tutorial

    Copy the pre-baked Vagrantfile

    We have provided a Vagrantfile for you to use in our GitHub repository. To copy the repository that contains the Vagrantfile, open a terminal window and type the following.

    $ git clone

    Start the Environment

    Note: vagrant up may take several minutes, especially if you need to download the Ubuntu 16.04 Box. Hang tight. You will see no more output once it’s done.

    $ cd fli-vagrant
    $ vagrant up

    To check to make sure your machine is running, run the vagrant status command.

    vagrant status
    Current machine states:
    default                   running (virtualbox)
    The VM is running. To stop this VM, you can run `vagrant halt` to
    shut it down forcefully, or you can run `vagrant suspend` to simply
    suspend the virtual machine. In either case, to restart it again,
    simply run `vagrant up`.

    SSH into your new machine and start using Fli!

    As long as your machine status is running after vagrant up, you can get started using Fli!

    $ vagrant ssh
    $ sudo su
    $ fli setup --zpool chq 
    $ fli init MyFirstVolumeset -a owner=me,env=vagrant -d "My first volumeset for snapshots!"
    $ fli create MyFirstVolumeset my-first-volume -a first_volume=true

    Sync and Push your new volumeset!

    First, you need a token.

    In order to receive a token, sign up for FlockerHub and visit the token creation settings page to create your new token.

    Copy the contents of the authentication token file token.txt to a file in your new machine.

    $ vi /root/my.token # (type `i` then paste the token, then hit `esc`, then type `:wq!` then hit RETURN)

    Once your token is on the machine, configure Fli with it.

    $ fli config -t /root/my.token

    Then, you can sync and push your data!

    $ fli sync MyFirstVolumeset
    $ fli push MyFirstVolumeset

    Visit your volumesets page to see your newly created volumeset.

    First Volumeset

    Where to Go From Here

    More Examples

    Check out our How To Examples for using Fli. There are also videos below for other use cases!

    Notes About the Environment

    This environment above only provisions 5GB worth of underlying storage, which is also the alloted free amount with new FlockerHub accounts. If you wish to use more data than this, email and also take a look at the Vagrantfile for how the underlying storage is set up.

    Clean Up / Refresh the Environment

    To refresh your local environment at any point (aka “start fresh”), exit out of your ssh session and type a vagrant destroy then vagrant up again.


    We hope this was useful! We will continue to post new blogs in this series as well as use cases for Fli and FlockerHub, so stay tuned!

    More Details

    How FlockerHub works

    How Fli works


    Fli Fundementals

    Better CI with FlockerHub and Fli

    Fli- Taking Snapshots

    FlockerHub- Updating Object Metadata

    FlockerHub- Creating Volumes

    Push and Pull Data Snapshots with Fli and FlockerHub

    How to setup Fli with your ZPool

    Using fli-docker to bootstrap Docker Compose Apps with data

    Use Cases

    Better CI: Integrate realistic data, accelerate your pipeline

    On-demand staging: Include realistic test data for each commit

    Test better: Easily create a scalable, distributed test fixture library

    Share error state: Collaboratively debug the most challenging errors

    On-demand dev environments: Share your workspace with anyone

    Like what you read?

    Signup for a free FlockerHub account.
    Sign Up

    Get all the ClusterHQ News

    Stay up to date with our newsletter. No spam. Ever.