Skip to content

Commit

Permalink
Merge pull request #567 from qmhu/local-env
Browse files Browse the repository at this point in the history
Local Env Setup
  • Loading branch information
qmhu authored Sep 25, 2022
2 parents ffe2c40 + ec97c92 commit 6f5ca94
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions hack/local-env-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

CRANE_KUBECONFIG="${HOME}/.kube/config_crane"
CRANE_CLUSTER_NAME="crane"

echo "Step1: Create local cluster: " ${CRANE_KUBECONFIG}
kind delete cluster --name="${CRANE_CLUSTER_NAME}" 2>&1
kind create cluster --kubeconfig "${CRANE_KUBECONFIG}" --name "${CRANE_CLUSTER_NAME}"
export KUBECONFIG="${CRANE_KUBECONFIG}"
echo "Step1: Create local cluster finished."

echo "Step2: Installing Prometheus "
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install prometheus -n crane-system \
--set pushgateway.enabled=false \
--set alertmanager.enabled=false \
--set server.persistentVolume.enabled=false \
-f https://raw.githubusercontent.com/gocrane/helm-charts/main/integration/prometheus/override_values.yaml \
--create-namespace prometheus-community/prometheus
echo "Step2: Installing Prometheus finished."

echo "Step3: Installing Grafana "
helm repo add grafana https://grafana.github.io/helm-charts
helm install grafana \
-f https://raw.githubusercontent.com/gocrane/helm-charts/main/integration/grafana/override_values.yaml \
-n crane-system \
--create-namespace grafana/grafana
echo "Step3: Installing Grafana finished."

echo "Step4: Installing Crane "
helm repo add crane https://gocrane.github.io/helm-charts
helm repo update
helm install crane -n crane-system --create-namespace crane/crane
helm install fadvisor -n crane-system --create-namespace crane/fadvisor
echo "Step4: Installing Crane finished."

kubectl get deploy -n crane-system
echo "Please wait for all pods ready"

0 comments on commit 6f5ca94

Please sign in to comment.