This is an automated email from the ASF dual-hosted git repository. dgrove pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-deploy-kube.git
commit 0d7ed404cc6beda7ba60c6a8e30ee9d86a8fe145 Author: David Grove <[email protected]> AuthorDate: Thu Jan 2 11:05:52 2020 -0500 refactor tool installs into separate script --- .travis.yml | 1 + tools/travis/setup.sh | 39 +++++++++++++++++++++++++++++++++++++++ tools/travis/start-kind.sh | 18 +----------------- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 44e7626..a4ba921 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,7 @@ notifications: before_install: - ./tools/travis/setupscan.sh - ./tools/travis/scancode.sh + - ./tools/travis/setup.sh - ./tools/travis/start-kind.sh script: diff --git a/tools/travis/setup.sh b/tools/travis/setup.sh new file mode 100755 index 0000000..30ddb53 --- /dev/null +++ b/tools/travis/setup.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +set -x + +# Intall python packages used by box-upload.py +pip install --user humanize requests + +# Download and install misc packages and utilities +pushd /tmp + # Install kubectl + curl -Lo ./kubectl https://storage.googleapis.com/kubernetes-release/release/v1.16.1/bin/linux/amd64/kubectl + chmod +x kubectl + sudo cp kubectl /usr/local/bin/kubectl + + # download and install the wsk cli + wget -q https://github.com/apache/openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.tgz + tar xzf OpenWhisk_CLI-latest-linux-amd64.tgz + sudo cp wsk /usr/local/bin/wsk + + # Download and install helm 2 (remove tiller init from start-kind.sh when upgrading to helm 3) + curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh && chmod +x get_helm.sh && ./get_helm.sh --version v2.16.1 +popd + diff --git a/tools/travis/start-kind.sh b/tools/travis/start-kind.sh index c2cccc6..182d8a6 100755 --- a/tools/travis/start-kind.sh +++ b/tools/travis/start-kind.sh @@ -18,11 +18,6 @@ set -x -# Install kubectl -curl -Lo ./kubectl https://storage.googleapis.com/kubernetes-release/release/v1.16.1/bin/linux/amd64/kubectl -chmod +x kubectl -sudo cp kubectl /usr/local/bin/kubectl - # Install kind curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-linux-amd64 chmod +x kind @@ -45,21 +40,10 @@ export KUBECONFIG="$(kind get kubeconfig-path)" echo "Kubernetes cluster is deployed and reachable" kubectl describe nodes -# Download and install misc packages and utilities -pushd /tmp - # download and install the wsk cli - wget -q https://github.com/apache/openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.tgz - tar xzf OpenWhisk_CLI-latest-linux-amd64.tgz - sudo cp wsk /usr/local/bin/wsk - - # Download and install helm - curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh && chmod +x get_helm.sh && ./get_helm.sh --version v2.16.1 -popd - # Pods running in kube-system namespace should have cluster-admin role kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default -# Install tiller into the cluster +# Install tiller (Helm2) into the cluster /usr/local/bin/helm init --service-account default # Wait for tiller to be ready
