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/09/21 20:13:03 UTC
bigtop git commit: BIGTOP-2014. [VM provisioner] Missing FQDN on
Ubuntu causes puppet deployment malfunction
Repository: bigtop
Updated Branches:
refs/heads/master e34fa661c -> 6d75d7760
BIGTOP-2014. [VM provisioner] Missing FQDN on Ubuntu causes puppet deployment malfunction
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/6d75d776
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/6d75d776
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/6d75d776
Branch: refs/heads/master
Commit: 6d75d776097ca6f7cd87bdfa99509aabd8c26338
Parents: e34fa66
Author: Evans Ye <ev...@apache.org>
Authored: Sat Sep 5 22:40:12 2015 +0800
Committer: Evans Ye <ev...@apache.org>
Committed: Tue Sep 22 02:12:49 2015 +0800
----------------------------------------------------------------------
bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/6d75d776/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 6a16ae3..527590e 100755
--- a/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
+++ b/bigtop-deploy/vm/vagrant-puppet-vm/Vagrantfile
@@ -68,7 +68,9 @@ bigtop_master = "bigtop1.vagrant"
$script = <<SCRIPT
service iptables stop
chkconfig iptables off
-cat /dev/null > /etc/hosts
+# Remove 127.0.0.1 entry since vagrant's hostname setting will map it to FQDN,
+# which miss leads some daemons to bind on 127.0.0.1 instead of public or private IP
+sed -i "/127.0.0.1/d" /etc/hosts
echo "Bigtop yum repo = #{repo}"
# Prepare puppet configuration file
mkdir -p /etc/puppet/hieradata
@@ -99,7 +101,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "bigtop#{i}" do |bigtop|
bigtop.vm.box = CONF['box']
- bigtop_hostname="bigtop#{i}.vagrant"
+ bigtop_hostname="bigtop#{i}"
+ bigtop_fqdn="#{bigtop_hostname}.vagrant"
bigtop_ip="10.10.10.1#{i}"
bigtop.vm.provider :virtualbox do |vb|
@@ -108,7 +111,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
bigtop.vm.network :private_network, ip: bigtop_ip
- bigtop.vm.hostname = bigtop_hostname
+ bigtop.vm.hostname = bigtop_fqdn
# three levels up is the bigtop "home" directory.
# the current directory has puppet recipes which we need for provisioning.
@@ -123,7 +126,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
shell.args = ["#{enable_local_repo}"]
end
bigtop.vm.provision "shell", inline: $script
- bigtop.vm.provision :hostmanager
+ # Add the ip to FQDN and hostname mapping in /etc/hosts
+ bigtop.hostmanager.aliases = "#{bigtop_fqdn} #{bigtop_hostname}"
# deploy Apache Hadoop and it's ecosystem
bigtop.vm.provision :puppet do |puppet|