You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by ev...@apache.org on 2015/04/23 17:08:15 UTC
bigtop git commit: BIGTOP-1803: Overide Vagrant configurations from
environment variables
Repository: bigtop
Updated Branches:
refs/heads/master 083f61384 -> d2c2126a6
BIGTOP-1803: Overide Vagrant configurations from environment variables
Signed-off-by: Evans Ye <ev...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/d2c2126a
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/d2c2126a
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/d2c2126a
Branch: refs/heads/master
Commit: d2c2126a665624a7684425f563a055db5cabe3c1
Parents: 083f613
Author: YoungWoo Kim <yw...@apache.org>
Authored: Mon Apr 6 17:46:29 2015 +0900
Committer: Evans Ye <ev...@apache.org>
Committed: Thu Apr 23 15:06:53 2015 +0000
----------------------------------------------------------------------
bigtop-deploy/vm/vagrant-puppet-vm/README.md | 13 +++++++++++++
bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile | 13 +++++++++++++
2 files changed, 26 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/d2c2126a/bigtop-deploy/vm/vagrant-puppet-vm/README.md
----------------------------------------------------------------------
diff --git a/bigtop-deploy/vm/vagrant-puppet-vm/README.md b/bigtop-deploy/vm/vagrant-puppet-vm/README.md
index 1de9089..2b21a70 100644
--- a/bigtop-deploy/vm/vagrant-puppet-vm/README.md
+++ b/bigtop-deploy/vm/vagrant-puppet-vm/README.md
@@ -73,6 +73,19 @@ finally, spin up the cluster
vagrant up
```
+## Override Vagrant configurations
+You can override vagrant configurations from environment variables:
+```
+$ export REPO=http://repo.example.com/path/to
+$ vagrant up
+```
+
+or
+
+```
+$ MEMORY_SIZE=8000 vagrant up
+```
+
##Configure Apache Hadoop ecosystem components
* Choose the ecosystem you want to be deployed by modifying components in vagrantconfig.yaml
http://git-wip-us.apache.org/repos/asf/bigtop/blob/d2c2126a/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
----------------------------------------------------------------------
diff --git a/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile b/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
index 5384b8c..6a16ae3 100755
--- a/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
+++ b/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
@@ -21,6 +21,19 @@ require "yaml"
_config = YAML.load(File.open(File.join(File.dirname(__FILE__), "vagrantconfig.yaml"), File::RDONLY).read)
CONF = _config
+# Override vagrant configurations using environment variables
+keys = CONF.keys
+keys.each do |k|
+ if ENV[k.upcase] != nil then
+ puts "Overide from environment variable: " + k.upcase + " = " + ENV[k.upcase]
+ if /^\d+/.match(ENV[k.upcase])
+ CONF[k] = Integer(ENV[k.upcase])
+ else
+ CONF[k] = ENV[k.upcase]
+ end
+ end
+end
+
# Repository
# Example for testing a Release candidate.
repo = CONF['repo']