You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/06/12 01:27:23 UTC

[GitHub] daisy-ycguo closed pull request #216: Stop testing non-Helm based deployments

daisy-ycguo closed pull request #216: Stop testing non-Helm based deployments
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/216
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 888237c..da8d137 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,10 +7,9 @@ env:
   - secure: d7CuMXbhT83W2x78qiLwgogX1+3aPicd1PlTwwNNDN6QSkImbxareyKThnsqlHIiNj3o5l5DBuiYjy7wrF/xD1g8BQMmTwm99DRx5q3CI3Im3VCi/ZK8SaNjuOy24d7cf5k2tB/87Gk7zmKsMDYm+fpCl+GpgUmIEeIwthiAxuXSDWZ8eQPIptmxj56DeFRNouvXG+dEUtBfWiwN27UPxNKExCixFnegmdtffLbz6hhst7BHr5Ry9acbycre98PCwWZcu9lxFs+SJ1kvnzX2iue4otmDkF1WkJjxaOFPJVs/D3YItg+neLCSxjwBskPed+Fct8bOjcM/uVROJPNIq5icBmaPX2isH0lvtxOeVw/dmioWYXYPN9ygBOe4eO/vtPllN0bcAUo5xl9jXev8ciAozYrYpHVh9Fplfd81rcYTeYzALmRJBdoiWoc3KQGzwGc9sB1ffmy+KWgG9T0zbnS4fALSR4PSzyNlKSLXw9vuvdNP0OBYtO+6yTJXavIxqmDoj64Lb93n+uGPatnaIGPTKEEBMJTSjsgYVEfxzzZuxUT9Ldkf2lzqvN2PCllGoMqxkgsdb8i4v4QgRaMWBDbKa5Va4k0O4dnhRmtdbJavOSKN6fECJbyfoJlV1VvJGxk5znVLRznBmUPBKbNccyPZJULugKD3QIh4q8Q5jBU=
   - secure: CJtnU94HTDqd4A6uvhFl8IpnmU+wTdlzb8bPBFUl/lI/VKXiRrYpgJdKUro5xEoxFKuqMprLhbyf66niyWLTIeogjUAEu/h/o2dBVeGgSGKoqC0hQgqvnxKFeGlzFJ0XuEs3vbStJGRnQszGsfnnDrscJtR0x9X+1w4aBKI7iPyyuFtVkDD1UsmBbSi+M8FTeq7G7A0reMDaey7uog3CFCpIMl4geshcohQEcKEGbnXQZoLPFpb7cBOE83VXBJ7Y7Dgf/U4keiLovvnuJThGKZm/SVV2KlELmBmtmbx3rMT6Vb5k9ChSdRWapromNnnzmJBIQ5Scc2mwV3A93/SMha1F3IlYpDKs5djfTw8jZfVnuiou7HhTaRjHkmmcwP12/k30gLe2kw0Vezg1TCY4zgtOpcmCxc8RHEy0ceA74rKvRi8LbexTCwX+iAMQFn/pSrh/OqAq/50JbLyczcoO1zXWS38txUQNLW8i+XllhCg9pjkjyfBeGjOOcWiVIz9rWJd2XufjSXDcj6xoZHtkh1XDt1CnVkpsYKtyyZucQnhUM9ebmaWqbSW2+bpqC/2hI+G+kOyyCesGdB1q+VmN1augMMs6RgWjk4yw5dyLAshATSoUlE8KH2cDcJL19r4ECaQ99PSLwxoB89yfPoJiNc42vwxRdsLmB1BMNyPa81Y=
   matrix:
-    - TRAVIS_USE_HELM=true  OW_CONTAINER_FACTORY=docker     TRAVIS_KUBE_VERSION=v1.8.0 TRAVIS_MINIKUBE_VERSION=v0.25.2
-    - TRAVIS_USE_HELM=true  OW_CONTAINER_FACTORY=docker     TRAVIS_KUBE_VERSION=v1.9.0 TRAVIS_MINIKUBE_VERSION=v0.25.2
-    - TRAVIS_USE_HELM=false OW_CONTAINER_FACTORY=docker     TRAVIS_KUBE_VERSION=v1.9.0 TRAVIS_MINIKUBE_VERSION=v0.25.2
-    - TRAVIS_USE_HELM=true  OW_CONTAINER_FACTORY=kubernetes TRAVIS_KUBE_VERSION=v1.9.0 TRAVIS_MINIKUBE_VERSION=v0.25.2
+    - TRAVIS_KUBE_VERSION=v1.8.0 TRAVIS_MINIKUBE_VERSION=v0.25.2 OW_CONTAINER_FACTORY=docker
+    - TRAVIS_KUBE_VERSION=v1.9.0 TRAVIS_MINIKUBE_VERSION=v0.25.2 OW_CONTAINER_FACTORY=docker
+    - TRAVIS_KUBE_VERSION=v1.9.0 TRAVIS_MINIKUBE_VERSION=v0.25.2 OW_CONTAINER_FACTORY=kubernetes
 
 services:
   - docker
@@ -29,7 +28,6 @@ before_install:
 script:
   - ./tools/travis/scancode.sh
   - ./tools/travis/build-helm.sh
-  - ./tools/travis/build.sh
   - ./tools/travis/collect-logs.sh
   - ./tools/travis/box-upload.py "logs" "deploy-kube-$TRAVIS_BUILD_ID-$TRAVIS_BRANCH-$TRAVIS_JOB_NUMBER.tar.gz"
 
diff --git a/tools/travis/build-helm.sh b/tools/travis/build-helm.sh
index b4b4857..f73740a 100755
--- a/tools/travis/build-helm.sh
+++ b/tools/travis/build-helm.sh
@@ -115,11 +115,6 @@ set -x
 SCRIPTDIR=$(cd $(dirname "$0") && pwd)
 ROOTDIR="$SCRIPTDIR/../../"
 
-# If TRAVIS and !TRAVIS_USE_HELM, just exit (don't test HELM deploy)
-if [[ "$TRAVIS" = "true" ]] && [[ "$TRAVIS_USE_HELM" = "false" ]]; then
-    exit 0
-fi
-
 # Default to docker container factory if not specified
 OW_CONTAINER_FACTORY=${OW_CONTAINER_FACTORY:="docker"}
 
diff --git a/tools/travis/build.sh b/tools/travis/build.sh
deleted file mode 100755
index 48f1348..0000000
--- a/tools/travis/build.sh
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more contributor
-# license agreements; and to You under the Apache License, Version 2.0.
-
-#################
-# Helper functions for verifying pod creation
-#################
-
-couchdbHealthCheck () {
-  # wait for the pod to be created before getting the job name
-  sleep 5
-  POD_NAME=$(kubectl -n openwhisk get pods -l name=couchdb -o wide --show-all | grep "couchdb" | awk '{print $1}')
-
-  PASSED=false
-  TIMEOUT=0
-  until [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do
-    if [ -n "$(kubectl -n openwhisk logs $POD_NAME | grep "successfully setup and configured CouchDB")" ]; then
-      PASSED=true
-      break
-    fi
-
-    let TIMEOUT=TIMEOUT+1
-    sleep 10
-  done
-
-  if [ "$PASSED" = false ]; then
-    echo "Failed to finish deploying CouchDB"
-
-    kubectl -n openwhisk logs $POD_NAME
-    exit 1
-  fi
-
-  echo "CouchDB is up and running"
-}
-
-deploymentHealthCheck () {
-  if [ -z "$1" ]; then
-    echo "Error, component health check called without a component parameter"
-    exit 1
-  fi
-
-  PASSED=false
-  TIMEOUT=0
-  until $PASSED || [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do
-    KUBE_DEPLOY_STATUS=$(kubectl -n openwhisk get pods -l name="$1" -o wide | grep "$1" | awk '{print $3}')
-    if [ "$KUBE_DEPLOY_STATUS" == "Running" ]; then
-      PASSED=true
-      break
-    fi
-
-    kubectl get pods --all-namespaces -o wide --show-all
-
-    let TIMEOUT=TIMEOUT+1
-    sleep 10
-  done
-
-  if [ "$PASSED" = false ]; then
-    echo "Failed to finish deploying $1"
-
-    kubectl -n openwhisk logs $(kubectl -n openwhisk get pods -l name="$1" -o wide | grep "$1" | awk '{print $1}')
-    exit 1
-  fi
-
-  echo "$1 is up and running"
-}
-
-statefulsetHealthCheck () {
-  if [ -z "$1" ]; then
-    echo "Error, StatefulSet health check called without a parameter"
-    exit 1
-  fi
-
-  PASSED=false
-  TIMEOUT=0
-  until $PASSED || [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do
-    KUBE_DEPLOY_STATUS=$(kubectl -n openwhisk get pods -l name="$1" -o wide | grep "$1"-0 | awk '{print $3}')
-    if [ "$KUBE_DEPLOY_STATUS" == "Running" ]; then
-      PASSED=true
-      break
-    fi
-
-    kubectl get pods --all-namespaces -o wide --show-all
-
-    let TIMEOUT=TIMEOUT+1
-    sleep 10
-  done
-
-  if [ "$PASSED" = false ]; then
-    echo "Failed to finish deploying $1"
-
-    kubectl -n openwhisk logs $(kubectl -n openwhisk get pods -o wide | grep "$1"-0 | awk '{print $1}')
-    exit 1
-  fi
-
-  echo "$1-0 is up and running"
-
-}
-
-jobHealthCheck () {
-  if [ -z "$1" ]; then
-    echo "Error, job health check called without a component parameter"
-    exit 1
-  fi
-
-  PASSED=false
-  TIMEOUT=0
-  until $PASSED || [ $TIMEOUT -eq $TIMEOUT_STEP_LIMIT ]; do
-    KUBE_SUCCESSFUL_JOB=$(kubectl -n openwhisk get jobs -o wide | grep "$1" | awk '{print $3}')
-    if [ "$KUBE_SUCCESSFUL_JOB" == "1" ]; then
-      PASSED=true
-      break
-    fi
-
-    kubectl get jobs --all-namespaces -o wide --show-all
-
-    let TIMEOUT=TIMEOUT+1
-    sleep 10
-  done
-
-  if [ "$PASSED" = false ]; then
-    echo "Failed to finish running $1"
-
-    kubectl -n openwhisk logs jobs/$1
-    exit 1
-  fi
-
-  echo "$1 completed"
-}
-
-
-#################
-# Main body of script -- deploy OpenWhisk
-#################
-
-set -x
-
-SCRIPTDIR=$(cd $(dirname "$0") && pwd)
-ROOTDIR="$SCRIPTDIR/../../"
-
-# If TRAVIS and TRAVIS_USE_HELM, just exit (don't test non-HELM deploy)
-if [[ "$TRAVIS" = "true" ]] && [[ "$TRAVIS_USE_HELM" = "true" ]]; then
-    exit 0
-fi
-
-# Default to docker container factory if not specified
-OW_CONTAINER_FACTORY=${OW_CONTAINER_FACTORY:="docker"}
-
-# Default timeout limit to 60 steps
-TIMEOUT_STEP_LIMIT=${TIMEOUT_STEP_LIMIT:=60}
-
-cd $ROOTDIR
-
-# Label invoker nodes (needed for DockerContainerFactory-based invoker deployment)
-echo "Labeling invoker node"
-kubectl label nodes --all openwhisk-role=invoker
-kubectl describe nodes
-
-# Initial cluster setup
-echo "Performing steps from cluster-setup"
-pushd kubernetes/cluster-setup
-  kubectl apply -f namespace.yml
-  kubectl apply -f services.yml
-  kubectl -n openwhisk create cm whisk.config --from-env-file=config.env
-  if [ "$TRAVIS" = "true" ]; then
-      # when running a CI job, skip pulling images we don't need to significantly reduce testing time.
-      kubectl -n openwhisk create cm whisk.runtimes --from-file=runtimes=runtimes-minimal-travis.json
-  else
-      kubectl -n openwhisk create cm whisk.runtimes --from-file=runtimes=runtimes.json
-  fi
-  kubectl -n openwhisk create cm whisk.limits --from-env-file=limits.env
-  kubectl -n openwhisk create secret generic whisk.auth --from-file=system=auth.whisk.system --from-file=guest=auth.guest
-  kubectl apply -f persistent-volumes.yml
-popd
-
-# configure Ingress and wsk CLI
-# We use the NodePorts for nginx and apigateway services for Travis CI testing
-pushd kubernetes/ingress
-  WSK_PORT=$(kubectl -n openwhisk describe service nginx | grep https-api | grep NodePort| awk '{print $3}' | cut -d'/' -f1)
-  APIGW_PORT=$(kubectl -n openwhisk describe service apigateway | grep mgmt | grep NodePort| awk '{print $3}' | cut -d'/' -f1)
-  WSK_HOST=$(kubectl describe nodes | grep Hostname: | awk '{print $2}')
-  if [ "$WSK_HOST" = "minikube" ]; then
-      WSK_HOST=$(minikube ip)
-  fi
-  kubectl -n openwhisk create configmap whisk.ingress --from-literal=api_host=$WSK_HOST:$WSK_PORT --from-literal=apigw_url=http://$WSK_HOST:$APIGW_PORT
-  wsk property set --auth `cat ../cluster-setup/auth.guest` --apihost $WSK_HOST:$WSK_PORT
-popd
-
-# setup couchdb
-echo "Deploying couchdb"
-pushd kubernetes/couchdb
-  kubectl -n openwhisk create secret generic db.auth --from-literal=db_username=whisk_admin --from-literal=db_password=some_passw0rd
-  kubectl -n openwhisk create configmap db.config --from-literal=db_protocol=http --from-literal=db_provider=CouchDB --from-literal=db_host=couchdb.openwhisk.svc.cluster.local --from-literal=db_port=5984 --from-literal=db_whisk_activations=test_activations --from-literal=db_whisk_actions=test_whisks --from-literal=db_whisk_auths=test_subjects --from-literal=db_prefix=test_
-  kubectl apply -f couchdb.yml
-
-  couchdbHealthCheck
-popd
-
-# setup apigateway
-echo "Deploying apigateway"
-pushd kubernetes/apigateway
-  kubectl apply -f apigateway.yml
-
-  deploymentHealthCheck "apigateway"
-popd
-
-# setup zookeeper
-echo "Deploying zookeeper"
-pushd kubernetes/zookeeper
-  kubectl apply -f zookeeper.yml
-
-  deploymentHealthCheck "zookeeper"
-popd
-
-# setup kafka
-echo "Deploying kafka"
-pushd kubernetes/kafka
-  kubectl apply -f kafka.yml
-
-  deploymentHealthCheck "kafka"
-popd
-
-# setup the controller
-echo "Deploying controller"
-pushd kubernetes/controller
-  kubectl -n openwhisk create cm controller.config --from-env-file=controller.env
-  kubectl apply -f controller.yml
-
-  statefulsetHealthCheck "controller"
-popd
-
-# setup the invoker
-pushd kubernetes/invoker
-    if [ "$OW_CONTAINER_FACTORY" = "docker" ]; then
-        echo "Deploying invoker using DockerContainerFactory"
-        kubectl -n openwhisk create cm invoker.config --from-env-file=invoker-dcf.env
-        kubectl apply -f invoker-dcf.yml
-    elif [ "$OW_CONTAINER_FACTORY" = "kubernetes" ]; then
-        echo "Deploying invoker using KubernetesContainerFactory"
-        kubectl -n openwhisk create cm invoker.config --from-env-file=invoker-k8scf.env
-        kubectl apply -f invoker-agent.yml
-        deploymentHealthCheck "invoker-agent"
-        kubectl apply -f invoker-k8scf.yml
-    else
-        echo "Unknown container factory $OW_CONTAINER_FACTORY"
-        exit 1
-    fi
-
-    # wait until invoker is ready
-    deploymentHealthCheck "invoker"
-popd
-
-# setup nginx
-echo "Deploying nginx"
-pushd kubernetes/nginx
-  ./certs.sh localhost
-  kubectl -n openwhisk create configmap nginx --from-file=nginx.conf
-  kubectl -n openwhisk create secret tls nginx --cert=certs/cert.pem --key=certs/key.pem
-
-  # have seen this fail where nginx pod is applied but never created. Hard to know
-  # why that is happening without having access to Kube component logs.
-  sleep 5
-
-  kubectl apply -f nginx.yml
-
-  # wait until nginx is ready
-  deploymentHealthCheck "nginx"
-popd
-
-# install routemgmt
-echo "Installing routemgmt"
-pushd kubernetes/routemgmt
-  kubectl apply -f install-routemgmt.yml
-  jobHealthCheck "install-routemgmt"
-popd
-
-# install openwhisk-catalog
-echo "Installing catalog"
-pushd kubernetes/openwhisk-catalog
-  kubectl apply -f install-catalog.yml
-  jobHealthCheck "install-catalog"
-popd
-
-# install package-kafka
-echo "Installing kafka package"
-pushd kubernetes/package-kafka
-  kubectl -n openwhisk create cm packages.kafkaprovider --from-literal=kafkapkg_db_prefix=mq
-  kubectl apply -f kafkaprovider.yml
-  kubectl apply -f kafkapkginstaller.yml
-  jobHealthCheck "kafkapkginstaller"
-popd
-
-# list packages and actions now installed in /whisk.system
-wsk -i --auth `cat kubernetes/cluster-setup/auth.whisk.system` package list
-wsk -i --auth `cat kubernetes/cluster-setup/auth.whisk.system` action list
-
-
-#################
-# Sniff test: create and invoke a simple Hello world action
-#################
-
-# create wsk action
-cat > /tmp/hello.js << EOL
-function main() {
-  return {body: 'Hello world'};
-}
-EOL
-wsk -i action create hello /tmp/hello.js --web true
-
-# first list the actions and expect to see hello
-RESULT=$(wsk -i action list | grep hello)
-if [ -z "$RESULT" ]; then
-  echo "FAILED! Could not list hello action via CLI"
-  exit 1
-fi
-
-# next invoke the new hello world action via the CLI
-RESULT=$(wsk -i action invoke --blocking hello | grep "\"status\": \"success\"")
-if [ -z "$RESULT" ]; then
-  echo "FAILED! Could not invoke hello action via CLI"
-  exit 1
-fi
-
-# now run it as a web action
-HELLO_URL=$(wsk -i action get hello --url | grep "https://")
-RESULT=$(wget --no-check-certificate -qO- $HELLO_URL | grep 'Hello world')
-if [ -z "$RESULT" ]; then
-  echo "FAILED! Could not invoke hello as a web action"
-  exit 1
-fi
-
-echo "PASSED! Deployed openwhisk and invoked Hello action"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services