rancher-vagrant

May 25, 2016 ยท View on GitHub

Extensible and automated local Rancher environments using Vagrant

Usage

git clone https://github.com/nextrevision/rancher-vagrant
cd rancher-vagrant
vagrant up

Assuming the defaults, browse to http://192.168.33.11:8080 to access your Rancher server.

Configuration

You can configure the environment by setting up a custom config.rb file in the root of the repository. The available configuration options to you are displayed below:

ItemTypeRequiredDefaultDescription
$boxstringfalserancherio/rancherosVagrant box to use for the environment
$box_urlstringfalsenilURL to download the box
$box_versionstringfalsenilVersion of the box to download
$disable_folder_syncboolfalsetrueDisable syncing the current working directory to "/vagrant" on the guest
$ip_prefixstringfalse192.168.33Prefix for all IPs assigned to the guests
$rancher_versionstringfalselatestVersion of Rancher to deploy
$boxesarraytrue[]List of boxes (see Boxes table below)

Boxes

ItemTypeRequiredDefaultDescription
namestringtrueBase name of the box
countstringfalse1Number of guests to create with this config
rolestringfalseagentRole of the box (either "server" or "agent", at least one "server" must be specified)
memorystringfalse512Amount of memory to dedicate to the box (for RancherOS, at least 512 is recommended)
ipstringfalseIP address to assign to the box (typically best to leave this alone)
install_agentboolfalsetrue if role==agent, false if role==serverWhether or not to run the Rancher agent on the guest
projectstringfalsenilName of the Rancher project or environment to place the box in
project_typestringfalsecattleType of project to for the Rancher environment (cattle, swarm, kubernetes)
serverstringfalseHostname or IP address of the Rancher server to join

Example

See config_sample.rb