diff --git a/vagrant-test/Vagrantfile b/vagrant-test/Vagrantfile index 1498c9428d7e950d2ac11a5664c8a4aae8d48ede..897bd2180d8f4914e4f7f323272e43d1e4697701 100644 --- a/vagrant-test/Vagrantfile +++ b/vagrant-test/Vagrantfile @@ -23,15 +23,6 @@ cat >/etc/hosts <<EOF EOF SCRIPT -# Static configuration for etcd. -$setup_etcd = <<SCRIPT -cat >/etc/default/etcd <<EOF -START=1 -ETCD_INITIAL_CLUSTER_STATE=new -ETCD_INITIAL_CLUSTER=node1=http://192.168.50.2:2380,node2=http://192.168.50.3:2380,node3=http://192.168.50.4:2380 -EOF -SCRIPT - # Setup apt proxy. $setup_apt_proxy = <<SCRIPT cat >/etc/apt/apt.conf.d/000apt-proxy <<EOF @@ -58,19 +49,16 @@ Vagrant.configure(API_VERSION) do |config| config.vm.define "node1" do |m| m.vm.hostname = "node1" m.vm.network "private_network", ip: "192.168.50.2" - m.vm.provision "shell", inline: $setup_etcd end config.vm.define "node2" do |m| m.vm.hostname = "node2" m.vm.network "private_network", ip: "192.168.50.3" - m.vm.provision "shell", inline: $setup_etcd end config.vm.define "node3" do |m| m.vm.hostname = "node3" m.vm.network "private_network", ip: "192.168.50.4" - m.vm.provision "shell", inline: $setup_etcd # Create a test mountpoint. m.vm.provision "shell", diff --git a/vagrant-test/bootstrap.sh b/vagrant-test/bootstrap.sh index 25206a5432dc48b715b21e2e9ff0421e810daa58..ee42ef8efc3e68fe0afcb66b9a9c5be23f3e44ec 100644 --- a/vagrant-test/bootstrap.sh +++ b/vagrant-test/bootstrap.sh @@ -35,6 +35,16 @@ GROUPID=icecast ENABLE=true EOF +cat >/etc/default/etcd <<EOF +ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 +ETCD_INITIAL_ADVERTISE_PEER_URLS=http://$(hostname -s):2380 +ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 +ETCD_ADVERTISE_CLIENT_URLS=http://$(hostname -s):2379 +ETCD_INITIAL_CLUSTER_STATE=new +#ETCD_INITIAL_CLUSTER=node1=http://192.168.50.2:2380,node2=http://192.168.50.3:2380,node3=http://192.168.50.4:2380 +ETCD_INITIAL_CLUSTER=node1=http://node1:2380,node2=http://node2:2380,node3=http://node3:2380 +EOF + # Install the required packages. export DEBIAN_FRONTEND=noninteractive apt-get -qq update