added install scripts

This commit is contained in:
Torma Kristóf 2019-10-02 18:47:20 +02:00
parent 14cb4ae908
commit c5ebac1e41
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
10 changed files with 81 additions and 55 deletions

View File

@ -169,8 +169,10 @@ for WORKERNAME in ${WORKER[@]}; do
echo "[worker:$WORKERNAME] Deployment is completed."
done
#Deploy Kubeless
./deploy/kubeless_setup.sh
#Deploy Knative
cd deploy
./install_helm.sh
./install_knative.sh
#Deploy Metric Server
./deploy/metric_setup.sh
#Deploy Riff
./install_riff.sh

9
deploy/install_helm.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
#Install helm using snap
snap install helm --classic
#Init helm with an admin tiller pod.
kubectl create serviceaccount tiller -n kube-system
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount kube-system:tiller
helm init --wait --service-account tiller

44
deploy/install_knative.sh Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
#Create istio namespace
kubectl apply -f ./istio-namespace.yml
#Download and unpack istio
ISTIO_VERSION=1.3.1
curl -L https://git.io/getLatestIstio | sh -
cd istio-${ISTIO_VERSION}
#Install istio CRDs
for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done
helm template --namespace=istio-system \
--set prometheus.enabled=false \
--set mixer.enabled=false \
--set mixer.policy.enabled=false \
--set mixer.telemetry.enabled=false \
--set pilot.sidecar=false \
--set pilot.resources.requests.memory=128Mi \
--set galley.enabled=false \
--set global.useMCP=false \
--set security.enabled=false \
--set global.disablePolicyChecks=true \
--set sidecarInjectorWebhook.enabled=false \
--set global.proxy.autoInject=disabled \
--set global.omitSidecarInjectorConfigMap=true \
--set gateways.istio-ingressgateway.autoscaleMin=1 \
--set gateways.istio-ingressgateway.autoscaleMax=1 \
--set pilot.traceSampling=100 \
install/kubernetes/helm/istio \
> ./istio-lean.yaml
kubectl apply -f istio-lean.yaml
#Install Knative
kubectl apply --selector knative.dev/crd-install=true \
--filename https://github.com/knative/serving/releases/download/v0.9.0/serving.yaml \
--filename https://github.com/knative/eventing/releases/download/v0.9.0/release.yaml \
--filename https://github.com/knative/serving/releases/download/v0.9.0/monitoring.yaml
kubectl apply --filename https://github.com/knative/serving/releases/download/v0.9.0/serving.yaml \
--filename https://github.com/knative/eventing/releases/download/v0.9.0/release.yaml \
--filename https://github.com/knative/serving/releases/download/v0.9.0/monitoring.yaml

16
deploy/install_riff.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
#Install riff cli
curl -Lo riff-linux-amd64.tgz https://github.com/projectriff/cli/releases/download/v0.4.0/riff-linux-amd64.tgz
tar xvzf riff-linux-amd64.tgz
mv riff /usr/local/bin/
#Install riff
helm repo add projectriff https://projectriff.storage.googleapis.com/charts/releases
helm repo update
helm install projectriff/istio --name istio --version 0.4.x --namespace istio-system --set gateways.istio-ingressgateway.type=NodePort --wait
helm install projectriff/riff --name riff --version 0.4.x --set knative.enabled=true
#Verify Install
riff doctor

View File

@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-injection: disabled

View File

@ -1,13 +0,0 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: datadir
labels:
kubeless: kafka
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 1Gi
hostPath:
path: "/root/paprika-k/"

View File

@ -1,5 +0,0 @@
#!/bin/bash
kubectl create -f kafka_pv.yml
kubectl create -f zoo_pv.yml
export RELEASE=$(curl -s https://api.github.com/repos/kubeless/kafka-trigger/releases/latest | grep tag_name | cut -d '"' -f 4)
kubectl create -f https://github.com/kubeless/kafka-trigger/releases/download/$RELEASE/kafka-zookeeper-$RELEASE.yaml

View File

@ -1,17 +0,0 @@
#!/bin/bash
RELEASE=$(curl -s https://api.github.com/repos/kubeless/kubeless/releases/latest | grep tag_name | cut -d '"' -f 4)
kubectl create ns kubeless
kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-$RELEASE.yaml
#kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-non-rbac-$RELEASE.yaml
apt install -y unzip
#kubeless command
OS=$(uname -s| tr '[:upper:]' '[:lower:]')
curl -OL https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless_$OS-amd64.zip && \
unzip kubeless_$OS-amd64.zip && \
sudo mv bundles/kubeless_$OS-amd64/kubeless /usr/local/bin/
#Ingress nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/baremetal/service-nodeport.yaml

View File

@ -1,3 +0,0 @@
#!/bin/bash
kubectl create -f https://raw.githubusercontent.com/kubeless/kubeless-ui/master/k8s.yaml

View File

@ -1,13 +0,0 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: zookeeper
labels:
kubeless: zookeeper
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 1Gi
hostPath:
path: "/root/paprika-z/"