-
Notifications
You must be signed in to change notification settings - Fork 26
Simplest script for helm install
Pavel Lobashov edited this page Oct 27, 2022
·
6 revisions
Tested on DigitalOcean k8s
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo add stable https://charts.helm.sh/stable
helm repo update
helm install nfs-server stable/nfs-server-provisioner \
--set persistence.enabled=true \
--set persistence.storageClass=do-block-storage \
--set persistence.size=20Gi
helm install rabbitmq bitnami/rabbitmq \
--set metrics.enabled=false
helm install redis bitnami/redis \
--set architecture=standalone \
--set auth.enabled=false \
--set metrics.enabled=false
wget -O createdb.sql https://raw.githubusercontent.com/ONLYOFFICE/server/master/schema/postgresql/createdb.sql
kubectl create configmap init-db-scripts \
--from-file=./createdb.sql
helm install postgresql bitnami/postgresql \
--set primary.initdb.scriptsConfigMap=init-db-scripts \
--set auth.database=postgres \
--set primary.persistence.size=8Gi \
--set metrics.enabled=false
helm install nginx-ingress ingress-nginx/ingress-nginx --set controller.publishService.enabled=true,controller.replicaCount=2
sleep 60
helm install documentserver ./ --set example.enabled=true --set ingress.enabled=true
sleep 60
kubectl get ingress documentserver -o jsonpath="{.status.loadBalancer.ingress[*].ip}"
With grafana:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add kube-state-metrics https://kubernetes.github.io/kube-state-metrics
helm repo update
helm install nfs-server stable/nfs-server-provisioner \
--set persistence.enabled=true \
--set persistence.storageClass=do-block-storage \
--set persistence.size=20Gi
helm install rabbitmq bitnami/rabbitmq \
--set metrics.enabled=true
helm install redis bitnami/redis \
--set architecture=standalone \
--set auth.enabled=false \
--set image.tag=5.0.7-debian-10-r51 \
--set metrics.enabled=true
wget -O createdb.sql https://raw.githubusercontent.com/ONLYOFFICE/server/master/schema/postgresql/createdb.sql
kubectl create configmap init-db-scripts \
--from-file=./createdb.sql
helm install postgresql bitnami/postgresql \
--set primary.initdb.scriptsConfigMap=init-db-scripts \
--set auth.database=postgres \
--set primary.persistence.size=8Gi \
--set metrics.enabled=true
helm install statsd-exporter prometheus-community/prometheus-statsd-exporter \
--set statsd.udpPort=8125 \
--set statsd.tcpPort=8126 \
--set statsd.eventFlushInterval=30000ms
helm install nginx-ingress ingress-nginx/ingress-nginx --set controller.publishService.enabled=true,controller.replicaCount=2
sleep 60
helm install documentserver ./ --set example.enabled=true --set ingress.enabled=true --set metrics.enabled=true --set grafana_ingress.enabled=true
sleep 60
kubectl get ingress documentserver -o jsonpath="{.status.loadBalancer.ingress[*].ip}"
helm install prometheus -f ./sources/extraScrapeConfigs.yaml prometheus-community/prometheus
bash ./sources/metrics/get_dashboard.sh
helm install grafana bitnami/grafana \
--set service.ports.grafana=80 \
--set config.useGrafanaIniFile=true \
--set config.grafanaIniConfigMap=grafana-ini \
--set datasources.secretName=grafana-datasource \
--set dashboardsProvider.enabled=true \
--set dashboardsConfigMaps[0].configMapName=dashboard-node-exporter \
--set dashboardsConfigMaps[0].fileName=dashboard-node-exporter.json \
--set dashboardsConfigMaps[1].configMapName=dashboard-deployment \
--set dashboardsConfigMaps[1].fileName=dashboard-deployment.json \
--set dashboardsConfigMaps[2].configMapName=dashboard-redis \
--set dashboardsConfigMaps[2].fileName=dashboard-redis.json \
--set dashboardsConfigMaps[3].configMapName=dashboard-rabbitmq \
--set dashboardsConfigMaps[3].fileName=dashboard-rabbitmq.json \
--set dashboardsConfigMaps[4].configMapName=dashboard-postgresql \
--set dashboardsConfigMaps[4].fileName=dashboard-postgresql.json \
--set dashboardsConfigMaps[5].configMapName=dashboard-nginx-ingress \
--set dashboardsConfigMaps[5].fileName=dashboard-nginx-ingress.json \
--set dashboardsConfigMaps[6].configMapName=dashboard-documentserver \
--set dashboardsConfigMaps[6].fileName=documentserver-statsd-exporter.json
kubectl get secret grafana-admin --namespace default -o jsonpath="{.data.GF_SECURITY_ADMIN_PASSWORD}" | base64 --decode