-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup_openfaas.sh
executable file
·40 lines (33 loc) · 1.87 KB
/
setup_openfaas.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -ex
echo "#################################"
echo "Installing OpenFaas"
kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
helm repo add openfaas https://openfaas.github.io/faas-netes/
helm upgrade openfaas --install openfaas/openfaas --namespace openfaas --set functionNamespace=openfaas-fn --set generateBasicAuth=true --set openfaasPRO=false --set faasnetes.httpProbe=false --set faasnetes.livenessProbe.timeoutSeconds=5 --set faasnetes.livenessProbe.periodSeconds=70 --set faasnetes.readinessProbe.periodSeconds=70
curl -sSL https://cli.openfaas.com | sudo -E sh
wget -O crd.yaml https://raw.githubusercontent.com/openfaas/faas-netes/master/artifacts/crds/openfaas.com_profiles.yaml
echo "Experimental try profile with openfaas-fn as well"
cat <<EOF | kubectl apply -f -
kind: Profile
apiVersion: openfaas.com/v1
metadata:
name: test
namespace: openfaas
spec:
# Configuration values can be set as key-value properties
runtimeClassName: gvisor
EOF
curl -sSL https://cli.openfaas.com | sudo -E sh
#faas-cli login --password $(kubectl -n openfaas get secret basic-auth -o jsonpath="{.data.basic-auth-password}" | base64 --decode) --gateway $HOSTNAME:31112
helm uninstall -n openfaas openfaas
git clone https://github.com/deepaksirone/faas-netes.git
pushd ./faas-netes
git checkout gvisor
kubectl apply -f ./yaml_runc
popd
sleep 20
faas-cli login --password $(kubectl -n openfaas get secret basic-auth -o jsonpath="{.data.basic-auth-password}" | base64 --decode) --gateway $HOSTNAME:31112
echo "OpenFaas Installed Successfully!"
#echo "#### Now copy gVisor and seclambda to /usr/local/bin on all nodes and move the default docker image store ####"