From 7bbfec0f4a8740875601b3cbb1e18bee28d7f633 Mon Sep 17 00:00:00 2001 From: resouer Date: Mon, 15 Dec 2014 14:23:48 +0800 Subject: [PATCH] Add kuber box location env to make it faster. --- Vagrantfile | 5 ++++- docs/getting-started-guides/vagrant.md | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 5be613efe45..0c81627ae08 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -19,11 +19,14 @@ $minion_ips_str = $minion_ips.join(",") # Determine the OS platform to use $kube_os = ENV['KUBERNETES_OS'] || "fedora" +# Check if we already have kube box +$kube_box_url = ENV['KUBERNETES_BOX_URL'] || "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box" + # OS platform to box information $kube_box = { "fedora" => { "name" => "fedora20", - "box_url" => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-20_chef-provisionerless.box" + "box_url" => $kube_box_url } } diff --git a/docs/getting-started-guides/vagrant.md b/docs/getting-started-guides/vagrant.md index a83f1e7b57e..4886278bcf0 100644 --- a/docs/getting-started-guides/vagrant.md +++ b/docs/getting-started-guides/vagrant.md @@ -12,7 +12,9 @@ By default, the Vagrant setup will create a single kubernetes-master and 3 kuber ``` cd kubernetes -vagrant up + +# kubernetes will download box from s3 by default (see details in Vagrantfile), unless a box url env is provided. +KUBERNETES_BOX_URL=path_of_your_kuber_box vagrant up ``` Vagrant will provision each machine in the cluster with all the necessary components to run Kubernetes. The initial setup can take a few minutes to complete on each machine.