Small Vagrant config file for Rancher deploy


Just wanted to post this also, if it’s not that nice the config using a jumpserver, surely we can convert that to code (Puppet/Ansible), you can also use Vagrant. The main issue that i faced when i tried to create my setup is that for a reason (not really sure why, Vagrant on Windows runs very slow). However, i chose to give you one piece of Vagrantfile for a minimal setup on which you can grab the Rancher server framework and also the client containers.

Here is it:

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "master" do |master| = "centos/7"
master.vm.hostname = 'master' "public_network", bridge: "enp0s25"
config.vm.define "slave" do |slave| = "centos/7"
slave.vm.hostname = 'slave' "public_network", bridge: "enp0s25"
config.vm.define "swarmmaster" do |swarmmaster| = "centos/7"
swarmmaster.vm.hostname = 'swarmmaster' "public_network", bridge: "enp0s25"
config.vm.define "swarmslave" do |swarmclient| = "centos/7"
swarmclient.vm.hostname = 'swarmclient' "public_network", bridge: "enp0s25"


Do not worry about the naming of the machines, you can change them to whatever you like, the main catch is to bridge the public network in all of them in order to be able to communicate with each other and also have access to the docker hub. Beside that everything else that i posted regarding the registry to the Rancher framework is still valid.

Thank you for your time,