# -*- mode: ruby -*- # vi: set ft=ruby : # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. 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'] # repo = "http://bigtop.s3.amazonaws.com/releases/0.7.0/redhat/6/x86_64" # Which Linux Distribution to use. Right now only centos is tested distro = CONF['distro'] # number of instances num_instances = CONF['num_instances'] # hadoop ecosystem components components = CONF['components'] # Whether to run smoke tests run_smoke_tests = CONF['run_smoke_tests'] # Smoke test Components to run smoke_test_components = CONF['smoke_test_components'].join(',') # This is a update to allow dev packages # Force success - not worried if this step fails, since we generally only use it for development. enable_local_repo = CONF['enable_local_repo'] puts "vagrant conf local repo enabled: #{enable_local_repo}" # master node hostname bigtop_master = "bigtop1.vagrant" $script = <