Vagrant file for setting up a Rancher environment. Inspired by examples from vagrant-rancher
- Virtual Box: https://www.virtualbox.org/wiki/Downloads
- Vagrant: https://www.vagrantup.com/downloads.html
- rancher-vagrant plugin:
vagrant plugin install vagrant-rancher
The following VMs are created by the Vagrantfile
| Name | IP | RAM (GB) | Purpose | |---|---|---|---|---| | rancher-server | 192.168.33.100 | 1.5 | Hosts the rancher-server container (with no agent) | | rancher-agent1 | 192.168.33.101 | 1.0 | Hosts the rancher-agent container | | rancher-agent2 | 192.168.33.102 | 1.0 | Hosts the rancher-agent container | | rancher-agent3 | 192.168.33.103 | 1.0 | Hosts the rancher-agent container |
note 1: networking is set to host only
note 2: RAM requirements are for Rancher to run and for the agents to support database containers with certain RAM requirements (MySQL, etc)
The /vagrant directory on each machine is mapped to /data/<machine-hostname>/ on the host
vagrant up
:]- access the Rancher server via http://192.168.33.100:8080/