New in version 1.0.
Vagrant is used to “Create and configure lightweight, reproducible, and portable development environments.” We use it to test Mantl locally before deploying to a cloud provider. Our current setup creates a configurable number of virtual machines, and you can define how many you want to build using a configuration file as described below. One of the control servers provisions the others using the sample.yml playbook.
Simply run vagrant up. If you’d like to customize your build futher, you can create a vagrant-config.yml file in the project’s root directory with variables as defined in the “Variables” section below.
You can find the default values for all these variables in the config_hash in the provided Vagrantfile.
The number of nodes with this role.
A base IP address which will have its last digit appended. For example, if worker_ip_start is set to “192.168.100.10”, the first worker node will have the IP address 192.168.100.101, the second will have 192.168.100.102, etc.
The amount of memory in MB to allocate for each kind of VM. This setting is only valid for the virtualbox provider.
The number of CPUs to allocate for each kind of VM. This setting is only valid for the virtualbox provider.
Default: private. Which type of Vagrant network to provision. See https://www.vagrantup.com/docs/networking/index.html
An array of paths to Ansible playbooks to run during the provisioning step. For example, to attempt to run the GlusterFS addon (./addons/glusterfs.yml), you would add a /vagrant/addons/glusterfs.yml entry. You can also use this directive to run playbooks other than sample.yml after provisioning for the first time, by modifying this variable and running vagrant provision.
Mantl will likely experience stability issues with one control node. As stated in the Consul docs, this setup is inherently unstable.
Moreover, GlusterFS and LVM are not supported on Vagrant, and Traefik (edge nodes) are turned off by default. GlusterFS support might happen in the future, but it is an optional feature and not a priority.