Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve the azure setup script #877

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions hack/Azure/setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<EXTERNAL-IP>` with the external IP address obtained previously.:
```yaml
prometheus:
service:
Expand All @@ -64,7 +66,10 @@ If you would like to add a prometheus server to access metrics, run the followin
static_configs:
- targets: ["<EXTERNAL-IP>:8080"]
```
Replace `<EXTERNAL-IP>` 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
```
</details>


Expand Down
2 changes: 1 addition & 1 deletion hack/Azure/setup/createHubCluster.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
3 changes: 2 additions & 1 deletion hack/Azure/setup/joinMC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand All @@ -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
Expand Down
File renamed without changes.
Loading