Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 0a7c713

Browse files
Levi BlackstoneLevi Blackstone
authored andcommitted
hack/single-node: Add SELF_HOST_ETCD flag to script
Make it easier to launch a single-node cluster with self-hosted etcd. Launch with SELF_HOST_ETCD=true ./bootkube-up
1 parent b5c1353 commit 0a7c713

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

hack/single-node/bootkube-up

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ if [ ${un} == 'Darwin' ]; then
99
local_os="darwin"
1010
fi
1111

12+
SELF_HOST_ETCD=${SELF_HOST_ETCD:-false}
13+
if [ ${SELF_HOST_ETCD} = "true" ]; then
14+
echo "WARNING: THIS IS NOT YET FULLY WORKING - merely here to make ongoing testing easier"
15+
etcd_render_flags="--experimental-self-hosted-etcd"
16+
etcd_start_flags="--etcd-server=http://172.17.4.100:12379 --experimental-self-hosted-etcd"
17+
else
18+
etcd_render_flags=""
19+
etcd_start_flags=""
20+
fi
21+
1222
# Render assets
1323
if [ ! -d "cluster" ]; then
14-
../../_output/bin/${local_os}/bootkube render --asset-dir=cluster --api-servers=https://172.17.4.100:443
24+
../../_output/bin/${local_os}/bootkube render --asset-dir=cluster --api-servers=https://172.17.4.100:443 ${etcd_render_flags}
1525
cp user-data.sample cluster/user-data
1626
fi
1727

@@ -24,7 +34,7 @@ scp -q -F ssh_config -r cluster core@default:/home/core/cluster
2434
scp -q -F ssh_config ../../_output/bin/linux/bootkube core@default:/home/core
2535

2636
# Run bootkube
27-
ssh -q -F ssh_config core@default "sudo GLOG_v=${GLOG_v} /home/core/bootkube start --asset-dir=/home/core/cluster 2>> /home/core/bootkube.log"
37+
ssh -q -F ssh_config core@default "sudo GLOG_v=${GLOG_v} /home/core/bootkube start --asset-dir=/home/core/cluster ${etcd_start_flags} 2>> /home/core/bootkube.log"
2838

2939
echo
3040
echo "Bootstrap complete. Access your kubernetes cluster using:"

0 commit comments

Comments
 (0)