=====Overview===== Vagrant allows you to configure several virtual machines using a simple parameter file (vagrant file) So let's configure a simple cluster with 3 servers with the following settings: - Bridge IP - 1 GB Ram - Unique Name - Centos 7 =====Create the Vagrant File===== The vagrant file is a parameter file used by the vagrant engine to create the virtual machine(s) So let's start building. Firstly, don't forget it is YML file so every space and tab means something, so be careful with the syntax. Firstly, we will add the distribution and unique name: Vagrant.configure("2") do |config| config.vm.define "mgr1" do |mgr1| mgr1.vm.box = "centos/7" mgr1.vm.hostname = 'mgr1' end end This configuration will create a single machine called "mgr1" with Centos 7 So what after, well we have to add IP mgr1.vm.network "public_network", bridge: "Intel(R) Ethernet Connection (2) I219-V" Bare in mind that, you might have different bridge setting, so please check yours from the ipconfig settings. After that we can add the memory settings. Also note that the memory is provider configuration, so specific for virtual box: mgr1.vm.provider :virtualbox do |v| v.customize ["modifyvm", :id, "--memory", 1024] v.customize ["modifyvm", :id, "--name", "mgr1"] end So for one server, that will be our total config, if we want Public network (via DHCP) Vagrant.configure("2") do |config| config.vm.define "mgr1" do |mgr1| mgr1.vm.box = "centos/7" mgr1.vm.hostname = 'mgr1' mgr1.vm.network "public_network", bridge: "Intel(R) Ethernet Connection (2) I219-V" mgr1.vm.provider :virtualbox do |v| v.customize ["modifyvm", :id, "--memory", 1024] v.customize ["modifyvm", :id, "--name", "mgr1"] end end end If the network is set to: "public_network" and the bridge, then it will take it from the DHCP, you can specify the IP as well, if you are sure the IP is free. We can include that script in the configuration using the "shell" provision, as follows: mgr1.vm.provision "shell", inline: $install_docker_script, privileged: true =====Implement all===== So in the end, our vagrantfile with all 3 servers and all the configuration will look like that: $allow_shell = <