mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-24 00:47:00 +00:00
second checkpoint
This commit is contained in:
parent
67f19f76b2
commit
645e55a450
4 changed files with 78 additions and 17 deletions
38
docs/source/distributions/k8s/install-prometheus.sh
Normal file
38
docs/source/distributions/k8s/install-prometheus.sh
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
# Script to install prometheus-community/kube-prometheus-stack using Helm
|
||||
|
||||
# Exit immediately if a command exits with a non-zero status
|
||||
set -e
|
||||
|
||||
# Add the Prometheus community Helm repository if it doesn't exist
|
||||
if ! helm repo list | grep -q "prometheus-community"; then
|
||||
echo "Adding prometheus-community Helm repository..."
|
||||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||
fi
|
||||
|
||||
# Update Helm repositories
|
||||
echo "Updating Helm repositories..."
|
||||
helm repo update
|
||||
|
||||
# Create namespace for monitoring if it doesn't exist
|
||||
if ! kubectl get namespace monitoring &> /dev/null; then
|
||||
echo "Creating monitoring namespace..."
|
||||
kubectl create namespace monitoring
|
||||
fi
|
||||
|
||||
# Install kube-prometheus-stack
|
||||
echo "Installing kube-prometheus-stack..."
|
||||
helm install prometheus prometheus-community/kube-prometheus-stack \
|
||||
--namespace monitoring \
|
||||
--set grafana.enabled=true \
|
||||
--set prometheus.enabled=true \
|
||||
--set alertmanager.enabled=true \
|
||||
--set prometheus.service.type=ClusterIP \
|
||||
--set grafana.service.type=ClusterIP \
|
||||
--set alertmanager.service.type=ClusterIP \
|
||||
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \
|
||||
--set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false
|
||||
|
||||
echo "kube-prometheus-stack has been installed successfully!"
|
||||
echo "To access Grafana UI, run: kubectl port-forward -n monitoring svc/prometheus-grafana 3000:80"
|
||||
echo "Default Grafana credentials - Username: admin, Password: prom-operator"
|
||||
Loading…
Add table
Add a link
Reference in a new issue