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

Latest Fixes and Updates made for the working demo #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 11 additions & 8 deletions .github/workflows/advanced-scenario.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ jobs:
helm upgrade $RELEASE_NAME_LOWERCASE . --install
echo "CLUSTERIP=$(kubectl get service "nginx-ingress-nginx-controller" -n default -o jsonpath="{.status.loadBalancer.ingress[0].ip}")" >> $GITHUB_ENV

# Deploy Prometheus service to Kubernetes
- name: Deploy Prometheus service to Kubernetes
# Deploy Prometheus and grafana service to Kubernetes
- name: Deploy Prometheus and Grafana services to Kubernetes
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
Expand All @@ -143,11 +143,11 @@ jobs:
$RESOURCE_GROUP = "${{ secrets.AZURE_RG }}"
$SUBSCRIPTION_ID = "${{ secrets.AZURE_SUBSCRIPTION }}"
$TARGET_TYPE = "Microsoft-AzureKubernetesServiceChaosMesh"

# echo resolved command
echo az rest --method put --url "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ContainerService/managedClusters/$AKS_NAME/providers/Microsoft.Chaos?api-version=2023-11-01" --body '{\"properties\":{\"enabled\":true}}'

az rest --method put --url "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ContainerService/managedClusters/$AKS_NAME/providers/Microsoft.Chaos/targets/Microsoft-AzureKubernetesServiceChaosMesh?api-version=2023-11-01" --body '{\"properties\":{}}'
$jsonBody = @{
properties = @{}
} | ConvertTo-Json -Compress
az rest --method put --url "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ContainerService/managedClusters/$AKS_NAME/providers/Microsoft.Chaos/targets/Microsoft-AzureKubernetesServiceChaosMesh?api-version=2023-11-01" --body $jsonBody --headers "Content-Type=application/json"

# Create The Capabilities On The Target
- name: Create The Capabilities On The Target
Expand All @@ -156,8 +156,11 @@ jobs:
$AKS_NAME = "${{ env.KUBERNETESSERVICENAME }}"
$RESOURCE_GROUP = "${{ secrets.AZURE_RG }}"
$SUBSCRIPTION_ID = "${{ secrets.AZURE_SUBSCRIPTION }}"
$jsonBody = @{
properties = @{}
} | ConvertTo-Json -Compress

az rest --method put --url "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ContainerService/managedClusters/$AKS_NAME/providers/Microsoft.Chaos/targets/Microsoft-AzureKubernetesServiceChaosMesh/capabilities/StressChaos-2.1?api-version=2023-11-01" --body '{\"properties\":{}}'
az rest --method put --url "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.ContainerService/managedClusters/$AKS_NAME/providers/Microsoft.Chaos/targets/Microsoft-AzureKubernetesServiceChaosMesh/capabilities/StressChaos-2.1?api-version=2023-11-01" --body $jsonBody --headers "Content-Type=application/json"

# Deploy Bicep file Azure Load Testing --- TODO Param northeurope
- name: Deploy Bicep file Azure Load Testing
Expand Down
2 changes: 1 addition & 1 deletion Bicep/ACS/mainACS.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ param experimentSteps array = [
{
type: 'continuous'
selectorId: guid('Selector1')
duration: 'PT6M'
duration: experimentConfiguration.duration
parameters: [
{
key: 'jsonSpec'
Expand Down
4 changes: 2 additions & 2 deletions Bicep/ACS/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"parameters": {
"experimentConfiguration": {
"value": {
"duration": "30s",
"duration": "PT6M",
"namespace": "demo-performance"
}
}
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project contains a pipeline that deploys all the previous components to an
- the Nginx Ingress Controller
- the web app to be tested
- Prometheus and Grafana to monitor the web app metrics
- the Chaos Mesh to simulate random faults
- the Chaos Mesh to simulate faults

Finally creates and runs the JMeter load test and the Chaos Experiment during the load test, to cause really high CPU usage in your app pods.

Expand Down