diff --git a/hack/Azure/setup/README.md b/hack/Azure/setup/README.md index 5d0218d49..0a9abceaf 100644 --- a/hack/Azure/setup/README.md +++ b/hack/Azure/setup/README.md @@ -49,11 +49,13 @@ If you would like to add a prometheus server to access metrics, run the followin kubectl get service -n fleet-system ```` -2. Install the Prometheus community Helm Chart +2. Get the Prometheus community Helm Chart ``` - helm install prom prometheus-community/kube-prometheus-stack -f prommethus.yaml + helm repo add prometheus-community https://prometheus-community.github.io/helm-charts + helm repo update ``` - The `prommethus.yaml` file should contain the following YAML code: + +3. Edit the prometheus.yaml file in this directory to replace `` with the external IP address obtained previously.: ```yaml prometheus: service: @@ -64,7 +66,10 @@ If you would like to add a prometheus server to access metrics, run the followin static_configs: - targets: [":8080"] ``` - Replace `` with the external IP address obtained previously. +4. Install the Prometheus server + ``` + helm install prom prometheus-community/kube-prometheus-stack -f ./hack/Azure/setup/prometheus.yaml + ``` diff --git a/hack/Azure/setup/createHubCluster.sh b/hack/Azure/setup/createHubCluster.sh old mode 100644 new mode 100755 index fe0d3ca92..005c4248b --- a/hack/Azure/setup/createHubCluster.sh +++ b/hack/Azure/setup/createHubCluster.sh @@ -4,7 +4,7 @@ export HUB_CLUSTER=$1 az account set -s ${SUB} az group create --name $RESOURCE_GROUP --location $LOCATION -az aks create --resource-group $RESOURCE_GROUP --name $HUB_CLUSTER --node-count 2 +az aks create --resource-group $RESOURCE_GROUP --name $HUB_CLUSTER --location $LOCATION --node-count 2 az aks get-credentials --resource-group $RESOURCE_GROUP --name $HUB_CLUSTER export HUB_CLUSTER_CONTEXT=$(kubectl config view -o jsonpath="{.contexts[?(@.context.cluster==\"$HUB_CLUSTER\")].name}") diff --git a/hack/Azure/setup/joinMC.sh b/hack/Azure/setup/joinMC.sh index 8daf18467..7487bb1fc 100755 --- a/hack/Azure/setup/joinMC.sh +++ b/hack/Azure/setup/joinMC.sh @@ -71,6 +71,7 @@ kubectl config use-context $MEMBER_CLUSTER_CONTEXT # Create the secret with the token extracted previously for member agent to use. echo "Creating secret..." +kubectl delete secret hub-kubeconfig-secret kubectl create secret generic hub-kubeconfig-secret --from-literal=token=$TOKEN echo "Uninstalling member-agent..." @@ -86,7 +87,7 @@ helm install member-agent charts/member-agent/ \ --set image.pullPolicy=Always \ --set refreshtoken.pullPolicy=Always \ --set config.memberClusterName=$MEMBER_CLUSTER \ - --set logVerbosity=5 \ + --set logVerbosity=8 \ --set namespace=fleet-system \ --set enableV1Alpha1APIs=false \ --set enableV1Beta1APIs=true diff --git a/hack/Azure/setup/prommethus.yaml b/hack/Azure/setup/prometheus.yaml similarity index 100% rename from hack/Azure/setup/prommethus.yaml rename to hack/Azure/setup/prometheus.yaml