|
| 1 | +# helm apps |
| 2 | +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts |
| 3 | +# helm repo add influxdata https://helm.influxdata.com |
| 4 | +helm repo add grafana https://grafana.github.io/helm-charts |
| 5 | +helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts |
| 6 | +helm repo add traefik https://traefik.github.io/charts |
| 7 | +helm repo add community-charts https://community-charts.github.io/helm-charts |
| 8 | +helm repo add minio-helm https://charts.min.io/ |
| 9 | +helm add repo bitnami https://charts.bitnami.com/bitnami |
| 10 | +helm repo add cowboysysop https://cowboysysop.github.io/charts/ |
| 11 | +helm repo update |
| 12 | + |
| 13 | +# helm install my-release oci://ghcr.io/cowboysysop/charts/flowise |
| 14 | +helm install flowise cowboysysop/flowise -n flowise --create-namespace |
| 15 | + |
| 16 | +## create default storageclass |
| 17 | +kubectl patch storageclass nfs-client -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' |
| 18 | +kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' |
| 19 | + |
| 20 | +# argo |
| 21 | +myNameSpaceArgo=argo |
| 22 | +kubectl get namespace | grep -q "^$myNameSpaceArgo " || kubectl create namespace $myNameSpaceArgo |
| 23 | +kubectl -n $myNameSpaceArgo apply -f ./quick-start-minimal-v3.6.5.yaml |
| 24 | +kubectl -n $myNameSpaceArgo create rolebinding default-admin --clusterrole=admin --serviceaccount=argo:default |
| 25 | +kubectl -n argo patch svc argo-server -p '{"spec": {"type": "LoadBalancer"}}' |
| 26 | + |
| 27 | +# disable https and security by server mode |
| 28 | +kubectl patch deployment \ |
| 29 | + argo-server \ |
| 30 | + --namespace argo \ |
| 31 | + --type='json' \ |
| 32 | + -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [ |
| 33 | + "server", |
| 34 | + "--auth-mode=server", |
| 35 | + "--secure=false" |
| 36 | +]}, |
| 37 | +{"op": "replace", "path": "/spec/template/spec/containers/0/readinessProbe/httpGet/scheme", "value": "HTTP"} |
| 38 | +]' |
| 39 | + |
| 40 | +# loki |
| 41 | +helm -n loki install loki-stack grafana/loki-stack \ |
| 42 | + --values loki-values.yaml --create-namespace |
| 43 | + |
| 44 | +# argocd |
| 45 | +myNamespaceArgoCD=argocd |
| 46 | +kubectl get namespace | grep -q "^$myNamespaceArgoCD " || kubectl create namespace $myNamespaceArgoCD |
| 47 | +kubectl -n $myNamespaceArgoCD apply -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml |
| 48 | +kubectl -n argocd patch svc argocd-server -p '{"spec": {"type": "NodePort"}}' |
| 49 | + |
| 50 | +# mlflow |
| 51 | +# take note to delete pvc when reinstalling |
| 52 | +# change default port 80 to different values for LoadBalancer |
| 53 | +helm -n mlflow upgrade --install sunrise bitnami/mlflow \ |
| 54 | + --version 3.0.0 --create-namespace --set minio.persistence.size=50Gi --set tracking.service.ports.http=5080 --set tracking.service.ports.https=50443 --set minio.service.ports.api=5081 --set tracking.auth.enabled=false |
| 55 | + |
| 56 | +ROOT_USER="username" |
| 57 | +ROOT_PASSWORD="yourpassword" |
| 58 | +export ENDPOINT="minio.minio:9000" BUCKET=thanos |
| 59 | + |
| 60 | +## minio |
| 61 | +# https://github.com/minio/minio/blob/master/helm/minio/README.md |
| 62 | +helm -n minio install minio \ |
| 63 | + --set replicas=2 \ |
| 64 | + --set persistence.size=50Gi \ |
| 65 | + --set rootUser=${ROOT_USER},rootPassword=${ROOT_PASSWORD} \ |
| 66 | + --set persistence.enabled=true \ |
| 67 | + minio-helm/minio --create-namespace |
| 68 | + |
| 69 | +kubectl -n minio patch svc minio-console -p '{"spec": {"type": "LoadBalancer"}}' |
| 70 | + |
| 71 | +kubectl run --namespace minio \ |
| 72 | + minio-client --rm --tty -i --restart='Never' \ |
| 73 | + --env MINIO_SERVER_ROOT_USER=${ROOT_USER} \ |
| 74 | + --env MINIO_SERVER_ROOT_PASSWORD=${ROOT_PASSWORD} \ |
| 75 | + --env MINIO_SERVER_HOST=minio.minio \ |
| 76 | + --image docker.io/bitnami/minio-client -- mc mb -p minio/thanos |
| 77 | + |
| 78 | +cat >objstore.yml <<EOF |
| 79 | +type: S3 |
| 80 | +config: |
| 81 | + endpoint: "${ENDPOINT}" |
| 82 | + bucket: "${BUCKET}" |
| 83 | + access_key: "${ROOT_USER}" |
| 84 | + secret_key: "${ROOT_PASSWORD}" |
| 85 | + insecure: true |
| 86 | +EOF |
| 87 | + |
| 88 | +kubectl create secret generic thanos-objstore \ |
| 89 | + --from-file=objstore.yml -o yaml \ |
| 90 | + --dry-run=client | kubectl -n prometheus apply -f - |
| 91 | + |
| 92 | +helm -n prometheus upgrade --install prometheus-stack prometheus-community/kube-prometheus-stack \ |
| 93 | + --set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \ |
| 94 | + --set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false \ |
| 95 | + --set "prometheus.prometheusSpec.enableFeatures[0]=otlp-write-receiver" \ |
| 96 | + --set alertmanager.ingress.enabled=true \ |
| 97 | + --set prometheus.enabled=true \ |
| 98 | + --values ./prometheus-with-thanos-values.yaml \ |
| 99 | + --create-namespace |
| 100 | + |
| 101 | +# install other thanos components |
| 102 | +helm -n prometheus upgrade --install thanos \ |
| 103 | + bitnami/thanos --values ./thanos-values.yaml \ |
| 104 | + --create-namespace |
| 105 | + |
| 106 | +# install kserve |
| 107 | +# https://kserve.github.io/website/latest/admin/kubernetes_deployment/#2-install-network-controller |
| 108 | +arkade install cert-manager |
| 109 | + |
| 110 | +#gateway |
| 111 | +kubectl -n kserve apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml |
| 112 | + |
| 113 | +kubectl -n kserve apply -f - <<EOF |
| 114 | +apiVersion: gateway.networking.k8s.io/v1 |
| 115 | +kind: GatewayClass |
| 116 | +metadata: |
| 117 | + name: envoy |
| 118 | +spec: |
| 119 | + controllerName: gateway.envoyproxy.io/gatewayclass-controller |
| 120 | +EOF |
| 121 | + |
| 122 | +kubectl -n kserve apply -f - <<EOF |
| 123 | +apiVersion: gateway.networking.k8s.io/v1 |
| 124 | +kind: Gateway |
| 125 | +metadata: |
| 126 | + name: kserve-ingress-gateway |
| 127 | + namespace: kserve |
| 128 | +spec: |
| 129 | + gatewayClassName: envoy |
| 130 | + listeners: |
| 131 | + - name: http |
| 132 | + protocol: HTTP |
| 133 | + port: 80 |
| 134 | + allowedRoutes: |
| 135 | + namespaces: |
| 136 | + from: All |
| 137 | + - name: https |
| 138 | + protocol: HTTPS |
| 139 | + port: 443 |
| 140 | + tls: |
| 141 | + mode: Terminate |
| 142 | + certificateRefs: |
| 143 | + - kind: Secret |
| 144 | + name: my-secret |
| 145 | + namespace: kserve |
| 146 | + allowedRoutes: |
| 147 | + namespaces: |
| 148 | + from: All |
| 149 | + infrastructure: |
| 150 | +EOF |
| 151 | + |
| 152 | +helm -n kserve install kserve-crd oci://ghcr.io/kserve/charts/kserve-crd --version v0.15.0 |
| 153 | + |
| 154 | +helm -n kserve install kserve oci://ghcr.io/kserve/charts/kserve --version v0.15.0 \ |
| 155 | + --set kserve.controller.deploymentMode=RawDeployment \ |
| 156 | + --set kserve.controller.gateway.ingressGateway.enableGatewayApi=true --set kserve.controller.gateway.ingressGateway.kserveGateway=kserve/kserve-ingress-gateway |
| 157 | + |
| 158 | +# install coroot observability tool |
| 159 | +helm repo add coroot https://coroot.github.io/helm-charts |
| 160 | +helm repo update coroot |
| 161 | + |
| 162 | +helm install -n coroot --create-namespace coroot-operator coroot/coroot-operator |
| 163 | + |
| 164 | +helm install -n coroot coroot coroot/coroot-ce |
| 165 | + |
| 166 | +kubectl port-forward -n coroot service/coroot-coroot 8080:8080 |
| 167 | + |
| 168 | +helm uninstall coroot -n coroot |
| 169 | +helm uninstall coroot-operator -n coroot |
0 commit comments