2014-06-06 23:40:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-05-01 16:19:44 +00:00
|
|
|
# Copyright 2014 The Kubernetes Authors All rights reserved.
|
2014-06-06 23:40:48 +00:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# Bring up a Kubernetes cluster.
|
|
|
|
#
|
|
|
|
# If the full release name (gs://<bucket>/<release>) is passed in then we take
|
|
|
|
# that directly. If not then we assume we are doing development stuff and take
|
|
|
|
# the defaults in the release config.
|
|
|
|
|
2014-10-06 20:25:27 +00:00
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
set -o pipefail
|
2014-06-06 23:40:48 +00:00
|
|
|
|
2014-10-03 21:58:49 +00:00
|
|
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
2015-07-17 12:31:16 +00:00
|
|
|
|
|
|
|
if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then
|
|
|
|
source "${KUBE_ROOT}/cluster/env.sh"
|
|
|
|
fi
|
|
|
|
|
2014-10-03 21:58:49 +00:00
|
|
|
source "${KUBE_ROOT}/cluster/kube-env.sh"
|
2015-07-02 16:48:31 +00:00
|
|
|
source "${KUBE_ROOT}/cluster/kube-util.sh"
|
2014-06-06 23:40:48 +00:00
|
|
|
|
2015-07-14 21:54:43 +00:00
|
|
|
echo "... Starting cluster using provider: $KUBERNETES_PROVIDER" >&2
|
2014-06-06 23:40:48 +00:00
|
|
|
|
2014-12-09 23:07:54 +00:00
|
|
|
echo "... calling verify-prereqs" >&2
|
2014-07-14 17:50:04 +00:00
|
|
|
verify-prereqs
|
2014-12-09 23:07:54 +00:00
|
|
|
|
2015-11-18 02:13:24 +00:00
|
|
|
if [[ "${KUBE_STAGE_IMAGES:-}" == "true" ]]; then
|
|
|
|
echo "... staging images" >&2
|
|
|
|
stage-images
|
|
|
|
fi
|
|
|
|
|
2014-12-09 23:07:54 +00:00
|
|
|
echo "... calling kube-up" >&2
|
2014-07-14 17:50:04 +00:00
|
|
|
kube-up
|
2014-06-06 23:40:48 +00:00
|
|
|
|
2015-08-02 12:25:34 +00:00
|
|
|
echo "... calling validate-cluster" >&2
|
|
|
|
validate-cluster
|
2014-12-09 23:07:54 +00:00
|
|
|
|
2015-03-19 23:09:32 +00:00
|
|
|
echo -e "Done, listing cluster services:\n" >&2
|
2015-03-27 23:24:59 +00:00
|
|
|
"${KUBE_ROOT}/cluster/kubectl.sh" cluster-info
|
2015-03-19 23:09:32 +00:00
|
|
|
echo
|
2015-02-05 17:13:56 +00:00
|
|
|
|
|
|
|
exit 0
|