mrutkows commented on a change in pull request #30: Configure nginx without
ansible
URL:
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/30#discussion_r125753543
##########
File path: .travis/build.sh
##########
@@ -47,19 +43,58 @@ fi
echo "The job to configure OpenWhisk finished successfully"
-# Don't try and perform wsk actions the second it finishes deploying.
-# The CI ocassionaly fails if you perform actions to quickly.
-sleep 30
+# setup 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
+ kubectl apply -f nginx.yml
+
+ WSK_PORT=$(kubectl -n openwhisk describe service nginx | grep https-api |
grep NodePort| awk '{print $3}' | cut -d'/' -f1)
+
+ # wait untill nginx is ready
+ TIMEOUT=0
+ TIMEOUT_COUNT=40
+ until $(curl --output /dev/null --silent -k https://localhost:$WSK_PORT) ||
[ $TIMEOUT -eq $TIMEOUT_COUNT ]; do
+ echo "Nginx is not up yet"
+ let TIMEOUT=TIMEOUT+1
+ sleep 20
+ done
+
+ if [ $TIMEOUT -eq $TIMEOUT_COUNT ]; then
+ echo "Nginx is not up and running"
+ exit 1
+ fi
+popd
+
+echo "Nginx is up and running"
-AUTH_SECRET=$(kubectl -n openwhisk get secret openwhisk-auth-tokens -o yaml |
grep 'auth_whisk_system:' | awk '{print $2}' | base64 --decode)
-WSK_PORT=$(kubectl -n openwhisk describe service nginx | grep https-api | grep
NodePort| awk '{print $3}' | cut -d'/' -f1)
+AUTH_WSK_SECRET=789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
+AUTH_GUEST=23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP
-# download the wsk cli from nginx
-wget --no-check-certificate
https://127.0.0.1:$WSK_PORT/cli/go/download/linux/amd64/wsk
+# download and setup the wsk cli from nginx
+wget --no-check-certificate
https://localhost:$WSK_PORT/cli/go/download/linux/amd64/wsk
Review comment:
better use of localhost than dot address.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services