Skip to content

Commit

Permalink
Merge pull request #25627 from luxas/faster-local-up-cluster
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Build hyperkube in hack/local-up-cluster instead of separate binaries

This speeds up the build time a lot. 
Also add arm64 as a valid arch

This is quite trivial. Let's get it in asap
@thockin @pmorie @liggitt @eparis @zmerlynn @smarterclayton
  • Loading branch information
k8s-merge-robot committed May 15, 2016
2 parents 87403cf + 8e64b5f commit eae9863
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
8 changes: 7 additions & 1 deletion hack/lib/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ kube::util::host_platform() {
amd64*)
host_arch=amd64
;;
aarch64*)
host_arch=arm64
;;
arm64*)
host_arch=arm64
;;
arm*)
host_arch=arm
;;
Expand All @@ -151,7 +157,7 @@ kube::util::host_platform() {
host_arch=ppc64le
;;
*)
kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, s390x or ppc64le."
kube::log::error "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le."
exit 1
;;
esac
Expand Down
24 changes: 13 additions & 11 deletions hack/local-up-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@ done

if [ "x$GO_OUT" == "x" ]; then
"${KUBE_ROOT}/hack/build-go.sh" \
cmd/kube-apiserver \
cmd/kube-controller-manager \
cmd/kube-proxy \
cmd/kubectl \
cmd/kubelet \
plugin/cmd/kube-scheduler
cmd/hyperkube
else
echo "skipped the build."
fi
Expand Down Expand Up @@ -150,6 +146,12 @@ function detect_binary {
amd64*)
host_arch=amd64
;;
aarch64*)
host_arch=arm64
;;
arm64*)
host_arch=arm64
;;
arm*)
host_arch=arm
;;
Expand All @@ -163,7 +165,7 @@ function detect_binary {
host_arch=ppc64le
;;
*)
echo "Unsupported host arch. Must be x86_64, 386, arm, s390x or ppc64le." >&2
echo "Unsupported host arch. Must be x86_64, 386, arm, arm64, s390x or ppc64le." >&2
exit 1
;;
esac
Expand Down Expand Up @@ -258,7 +260,7 @@ function start_apiserver {
fi

APISERVER_LOG=/tmp/kube-apiserver.log
sudo -E "${GO_OUT}/kube-apiserver" ${priv_arg} ${runtime_config}\
sudo -E "${GO_OUT}/hyperkube" apiserver ${priv_arg} ${runtime_config}\
--v=${LOG_LEVEL} \
--cert-dir="${CERT_DIR}" \
--service-account-key-file="${SERVICE_ACCOUNT_KEY}" \
Expand All @@ -285,7 +287,7 @@ function start_controller_manager {
fi

CTLRMGR_LOG=/tmp/kube-controller-manager.log
sudo -E "${GO_OUT}/kube-controller-manager" \
sudo -E "${GO_OUT}/hyperkube" controller-manager \
--v=${LOG_LEVEL} \
--service-account-private-key-file="${SERVICE_ACCOUNT_KEY}" \
--root-ca-file="${ROOT_CA_FILE}" \
Expand Down Expand Up @@ -334,7 +336,7 @@ function start_kubelet {
kubenet_plugin_args="--reconcile-cidr=true "
fi

sudo -E "${GO_OUT}/kubelet" ${priv_arg}\
sudo -E "${GO_OUT}/hyperkube" kubelet ${priv_arg}\
--v=${LOG_LEVEL} \
--chaos-chance="${CHAOS_CHANCE}" \
--container-runtime="${CONTAINER_RUNTIME}" \
Expand Down Expand Up @@ -373,14 +375,14 @@ function start_kubelet {

function start_kubeproxy {
PROXY_LOG=/tmp/kube-proxy.log
sudo -E "${GO_OUT}/kube-proxy" \
sudo -E "${GO_OUT}/hyperkube" proxy \
--v=${LOG_LEVEL} \
--hostname-override="${HOSTNAME_OVERRIDE}" \
--master="http://${API_HOST}:${API_PORT}" >"${PROXY_LOG}" 2>&1 &
PROXY_PID=$!

SCHEDULER_LOG=/tmp/kube-scheduler.log
sudo -E "${GO_OUT}/kube-scheduler" \
sudo -E "${GO_OUT}/hyperkube" scheduler \
--v=${LOG_LEVEL} \
--master="http://${API_HOST}:${API_PORT}" >"${SCHEDULER_LOG}" 2>&1 &
SCHEDULER_PID=$!
Expand Down

0 comments on commit eae9863

Please sign in to comment.