Skip to content

Commit

Permalink
Bring back Tiller
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Gupta <r.g.gupta@outlook.com>
  • Loading branch information
zeerorg committed Mar 7, 2019
1 parent b1bb540 commit 1f872eb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -23,6 +23,7 @@ script:
- ./contrib/lint_chart.sh
- ./contrib/get_kind.sh
- ./contrib/create_kind_cluster.sh
- ./contrib/install_tiller.sh
- ./contrib/deploy.sh
- ./contrib/get_faas.sh
- ./contrib/run_function.sh
Expand Down
7 changes: 3 additions & 4 deletions contrib/deploy.sh
Expand Up @@ -10,10 +10,9 @@ kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \
--from-literal=basic-auth-password="$PASSWORD"

helm template ./chart/openfaas \
helm install ./chart/openfaas \
--name openfaas \
--namespace openfaas \
--set basic_auth=true \
--set functionNamespace=openfaas-fn > ./openfaas.yaml

kubectl apply -f ./openfaas.yaml
--set functionNamespace=openfaas-fn \
--wait
10 changes: 10 additions & 0 deletions contrib/install_tiller.sh
@@ -0,0 +1,10 @@
#!/bin/bash

export KUBECONFIG="$(kind get kubeconfig-path)"

kubectl -n kube-system create sa tiller \
&& kubectl create clusterrolebinding tiller \
--clusterrole cluster-admin \
--serviceaccount=kube-system:tiller

helm init --skip-refresh --upgrade --service-account tiller --wait
13 changes: 2 additions & 11 deletions contrib/run_function.sh
Expand Up @@ -5,16 +5,7 @@ export KUBECONFIG="$(kind get kubeconfig-path)"
kubectl rollout status deploy/gateway -n openfaas
kubectl port-forward deploy/gateway -n openfaas 8080:8080 &

# Check if Openfaas GW is Up
for i in {1..60};
do
curl -if 127.0.0.1:8080
if [ $? == 0 ];
then
break
fi
sleep 1
done
sleep 10

# Login in OpenFaas
export OPENFAAS_URL=http://127.0.0.1:8080
Expand All @@ -24,7 +15,7 @@ faas-cli login --username admin --password $PASSWORD
faas-cli deploy --image=functions/alpine:latest --fprocess=cat --name echo

# Call echo function
for i in {1..60};
for i in {1..180};
do
curl -if http://127.0.0.1:8080/function/echo
if [ $? == 0 ];
Expand Down

0 comments on commit 1f872eb

Please sign in to comment.