IBM / OpenWhisk-on-Kubernetes

This code demonstrates the deployment of OpenWhisk on Kubernetes cluster from Bluemix container service
Apache License 2.0
33 stars 20 forks source link

scripts/install.sh not testing code #16

Closed mlangbehn closed 7 years ago

mlangbehn commented 7 years ago

Summary

Currently, Travis build logs contain sensitive information, and is not testing that OpenWhisk is functional.

Details

From scripts/install.sh (lines 68 -85):

68 function getting_ip_port() {
69 echo "Getting IP and Port"
70 IP=$(kubectl get nodes | grep Ready | awk '{print $1}')
71 kubectl get nodes
72 export AUTH_SECRET=$(kubectl -n openwhisk get secret openwhisk-auth-tokens -o yaml | grep 'auth_whisk_system:' | awk '{print $2}' | base64 --decode)
73 export WSK_PORT=$(kubectl -n openwhisk describe service nginx | grep https-api | grep NodePort| awk '{print $3}' | cut -d'/' -f1)
74 if [ -z "$IP" ] || [ -z "$WSK_PORT" ] || [ -z "$AUTH_SECRET" ]
75 then
76     echo "IP or NODEPORT not found"
77     exit 1
78 fi
79 kubectl get pods -n openwhisk
80 
81 echo "wsk property set --auth $AUTH_SECRET --apihost https://$IP_ADDR:$WSK_PORT"
82 
83 echo "Travis build successful."
84 echo "Cleaning up cluster..."
85 }

Remediation steps

  1. Fix IP address variable names
  2. Remove echo line and run wsk property set
  3. Run a simple print statement from OpenWhisk
animeshsingh commented 7 years ago

LGTM - Fixed