Skip to content
Snippets Groups Projects
Commit 0c2d7268 authored by ale's avatar ale
Browse files

fix the etcd configuration for the stock Debian package

parent 4ed91bde
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment