Skip to content

Commit

Permalink
kubeadm install gets netctl from container
Browse files Browse the repository at this point in the history
netctl used to be added in the minimal installer, but was removed.

The binary is in the netplugin container that is run on every node, so
instead of including it in the minimal installer, extract it from the
container.
  • Loading branch information
chrisplo committed Nov 7, 2017
1 parent bb52cd4 commit 0571601
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions install/k8s/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,17 @@ echo "Applying contiv installation"
grep -q -F "netmaster" /etc/hosts || echo "$netmaster netmaster" >>/etc/hosts
echo "To customize the installation press Ctrl+C and edit $contiv_yaml."
sleep 5
chmod +x ./netctl
rm -f /usr/bin/netctl
cp ./netctl /usr/bin/

# extract netctl from netplugin container
echo "Extracting netctl from netplugin container"
netplugin_version=$(
sed '/contiv_network_version/!d;s/.*\: \?"\(.*\)".*/\1/' \
install/ansible/env.json)
docker rm netplugin-tmp >/dev/null 2>/dev/null || :
c_id=$(docker create --name netplugin-tmp contiv/netplugin:$netplugin_version)
docker cp ${c_id}:/contiv/bin/netctl /usr/bin
docker rm ${c_id}

# Install Contiv
$kubectl apply -f $contiv_yaml

Expand All @@ -287,6 +295,10 @@ for i in {0..150}; do
sleep 2
# check contiv netmaster pods
$kubectl get pods -n kube-system | grep -v "Running" | grep -q ^contiv-netmaster && continue
break
done
for i in {i..150}; do
sleep 2
# check that netmaster is available
netctl tenant ls >/dev/null 2>&1 || continue
break
Expand Down

0 comments on commit 0571601

Please sign in to comment.