Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/genebean/rancher-vagrant
Vagrantfile for deploying Rancher 2.0 in VirtualBox
https://github.com/genebean/rancher-vagrant
docker kubernetes rancher vagrant
Last synced: 15 days ago
JSON representation
Vagrantfile for deploying Rancher 2.0 in VirtualBox
- Host: GitHub
- URL: https://github.com/genebean/rancher-vagrant
- Owner: genebean
- License: bsd-3-clause
- Created: 2018-07-29T04:57:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-29T19:05:50.000Z (over 6 years ago)
- Last Synced: 2024-10-23T22:45:43.282Z (2 months ago)
- Topics: docker, kubernetes, rancher, vagrant
- Homepage:
- Size: 161 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rancher-vagrant
Vagrantfile for deploying Rancher 2.0 in VirtualBox.![Screenshot of Rancher 2 cluster](screenshot.png)
## Pre-requisites
* VirtualBox
* [Vagrant plug-in Hostmanager](https://github.com/devopsgroup-io/vagrant-hostmanager)## Installation
```bash
$ git clone https://github.com/genebean/rancher-vagrant.git
$ cd rancher-vagrant
```## Configuration
The Rancher platform you get with this Vagrantfile is:
* Single Rancher master server (2x CPU/2GB memory)
* Three Rancher node servers (1x CPU/1GB memory)
* Vagrant box genebean/centos-7-docker-ceThe Vagrantfile configures each box to use the stock docker that is supported by
Rancher by default. If you would prefer to use Docker CE you may want to adjust
these two settings near the top of the Vagrantfile:```ruby
USE_STOCK_DOCKER = true # change to false to use Docker CE
UPDATE_DOCKER_CE = true
```Before you run `vagrant up` you should review the Vagrantfile settings to map
your requirements.### Vagrant box
```ruby
BOX_IMAGE = "genebean/centos-7-docker-ce"
```### Number of Rancher node servers
```ruby
NODE_COUNT = 3 # Minimum one node. Maximum 244 nodes
```### Rancher password
```ruby
RANCHER_PASSWORD = 'password'
```### Rancher cluster name
```ruby
CLUSTER_NAME = 'playground'
```### Master server hardware
```ruby
master.vm.provider :virtualbox do |vb|
vb.memory = 2048 # Recommended 4GB
vb.cpus = 2
end
```### Node server hardware
```ruby
config.vm.provider "virtualbox" do |vb|
vb.memory = 1024
vb.cpus = 1
vb.linked_clone = true
end
```### Hostname and IP address
**master**
```ruby
master.vm.hostname = "master.rancher.local"
master.vm.network :private_network, ip: "192.168.34.10"
```**node**
For the node servers provisioning a loop is used. You should only change the
three first octets of the IP address `192.168.34.` and not the formula
`#{i + 10}`.```ruby
node.vm.hostname = "node#{i}.rancher.local"
node.vm.network :private_network, ip: "192.168.34.#{i + 10}"
```## Usage
```bash
$ vagrant up
```Depending on your hardware performance and Internet speed, a single Rancher node
platform (master is always required) can take around 5-10 minutes to come up.You can check the Rancher cluster status on ***https://master.rancher.local***