Skip to content

Commit

Permalink
Add link checking for stress CI (#3826)
Browse files Browse the repository at this point in the history
* Add link checking for stress CI

* Remove region segment from stress testing links
  • Loading branch information
benbp authored Aug 3, 2022
1 parent dc59535 commit a2f2292
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion eng/common/pipelines/templates/steps/verify-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ steps:
-branchReplacementName ${{ parameters.BranchReplacementName }}
-devOpsLogging: $true
-checkLinkGuidance: ${{ parameters.CheckLinkGuidance }}
-inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt"
-inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function CheckDependencies()
},
@{
Command = "az";
Help = "Azure CLI must be installed: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli";
Help = "Azure CLI must be installed: https://docs.microsoft.com/cli/azure/install-azure-cli";
}
)

Expand Down
12 changes: 6 additions & 6 deletions tools/stress-cluster/chaos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The chaos environment is an AKS cluster (Azure Kubernetes Service) with several

Technologies used:

1. [Azure AKS](https://docs.microsoft.com/en-us/azure/aks/)
1. [Azure AKS](https://docs.microsoft.com/azure/aks/)
1. [Kubernetes](https://kubernetes.io/)
1. [Chaos Mesh](https://chaos-mesh.org/)

Expand All @@ -41,8 +41,8 @@ You will need the following tools to create and run tests:
1. [Docker](https://docs.docker.com/get-docker/)
1. [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
1. [Helm](https://helm.sh/docs/intro/install/)
1. [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
1. [Powershell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004) (if using Linux)
1. [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli)
1. [Powershell Core](https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004) (if using Linux)

## Access

Expand Down Expand Up @@ -422,7 +422,7 @@ spec:

For more detailed examples, see:

- [Chaos Experiments](https://chaos-mesh.org/docs/chaos_experiments/networkchaos_experiment) docs for all possible types
- [Chaos Experiments](https://chaos-mesh.org/docs/simulate-network-chaos-on-kubernetes/) docs for all possible types
- `./examples/network_stress_example/templates/network_loss.yaml` for an example network loss manifest within a helm chart
- The [Faults via Dashboard section](#faults-via-dashboard) for generating the configs from the UI

Expand Down Expand Up @@ -507,7 +507,7 @@ script](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/st
This script handles: cluster and container registry access, building the stress test helm package, installing helm
package dependencies, and building and pushing docker images. The script must be run via powershell or powershell core.

If using bash or another linux terminal, a [powershell core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004) shell can be invoked via `pwsh`.
If using bash or another linux terminal, a [powershell core](https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004) shell can be invoked via `pwsh`.

The first invocation of the script must be run with the `-Login` flag to set up cluster and container registry access.

Expand Down Expand Up @@ -575,7 +575,7 @@ kubectl logs -n <stress test namespace> <stress test pod name>

## Configuring faults

Faults can be configured via kubernetes manifests or via the UI (which is a helper for building the manifests under the hood). For docs on the manifest schema, see [here](https://chaos-mesh.org/docs/user_guides/run_chaos_experiment).
Faults can be configured via kubernetes manifests or via the UI (which is a helper for building the manifests under the hood). For docs on the manifest schema, see [here](https://chaos-mesh.org/docs/define-chaos-experiment-scope/).

### Faults via Dashboard

Expand Down
13 changes: 13 additions & 0 deletions tools/stress-cluster/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ pr:
- tools/stress-cluster

jobs:
- job: Analyze
pool:
name: 'azsdk-pool-mms-ubuntu-2004-general'
vmImage: 'MMSUbuntu20.04'
steps:
- template: /eng/common/pipelines/templates/steps/verify-links.yml
parameters:
Directory: tools/stress-cluster
- template: /eng/common/pipelines/templates/steps/verify-links.yml
parameters:
Directory: eng/common/scripts/stress-testing


- template: /eng/pipelines/templates/jobs/stress-test-release.yml
parameters:
Environment: pg
Expand Down
8 changes: 4 additions & 4 deletions tools/stress-cluster/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Table of Contents
This directory contains all configuration used for stress test cluster buildout (azure and kubernetes buildout), as well
as a set of common stress test config boilerplate (helm library).

The `./azure` directory contains [Azure Bicep](https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview)
files for deploying Azure resources (mainly [AKS clusters](https://azure.microsoft.com/en-us/services/kubernetes-service/)
The `./azure` directory contains [Azure Bicep](https://docs.microsoft.com/azure/azure-resource-manager/bicep/overview)
files for deploying Azure resources (mainly [AKS clusters](https://azure.microsoft.com/services/kubernetes-service/)
to support stress testing (for dev/playground and/or production).

Azure Bicep comes pre-installed with the Azure CLI, and is a DSL for generating ARM templates.
Expand All @@ -34,8 +34,8 @@ easier to make and roll out config changes to tests across repos by using helm c

# Dependencies

- [Powershell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004)
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
- [Powershell Core](https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#ubuntu-2004)
- [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli)
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
- [helm](https://helm.sh)
- [kind](https://github.com/kubernetes-sigs/kind/releases) (if testing locally)
Expand Down
2 changes: 1 addition & 1 deletion tools/stress-cluster/cluster/azure/cluster/cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ resource cluster 'Microsoft.ContainerService/managedClusters@2020-09-01' = {

// Add Monitoring Metrics Publisher role to omsagent identity. Required to publish metrics data to
// cluster resource container insights.
// https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-update-metrics
// https://docs.microsoft.com/azure/azure-monitor/containers/container-insights-update-metrics
resource metricsPublisher 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
name: '${guid('monitoringMetricsPublisherRole', resourceGroup().id)}'
scope: cluster
Expand Down
6 changes: 3 additions & 3 deletions tools/stress-cluster/cluster/azure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resource group 'Microsoft.Resources/resourceGroups@2020-10-01' = {
}

// Add unique suffix to monitoring resource names to simplify cross-resource queries.
// https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cross-workspace-query#identifying-an-application
// https://docs.microsoft.com/azure/azure-monitor/logs/cross-workspace-query#identifying-an-application
var resourceSuffix = uniqueString(group.id)

module logWorkspace 'monitoring/log-analytics-workspace.bicep' = {
Expand Down Expand Up @@ -106,8 +106,8 @@ var appInsightsConnectionStringSecretName = 'appInsightsConnectionString-${resou
var appInsightsConnectionStringSecretValue = 'APPLICATIONINSIGHTS_CONNECTION_STRING="${appInsights.outputs.connectionString}"\n'

// Storage account information used for kubernetes fileshare volume mounting via the azure files csi driver
// See https://docs.microsoft.com/en-us/azure/aks/azure-files-volume#create-a-kubernetes-secret
// See https://docs.microsoft.com/en-us/azure/aks/azure-files-csi
// See https://docs.microsoft.com/azure/aks/azure-files-volume#create-a-kubernetes-secret
// See https://docs.microsoft.com/azure/aks/azure-files-csi
var debugStorageKeySecretName = 'debugStorageKey-${resourceSuffix}'
var debugStorageKeySecretValue = '${storage.outputs.key}'
var debugStorageAccountSecretName = 'debugStorageAccount-${resourceSuffix}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class JobWithAzureResourceDeployment : BaseJob

private string BicepContents = @"
// Add Bicep file contents here.
// [Overview] https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview
// [Overview] https://docs.microsoft.com/azure/azure-resource-manager/bicep/overview
// [Examples] https://github.com/Azure/bicep/tree/main/docs/examples
";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spec:
provider: azure
secretObjects:
# Storage account information used for kubernetes fileshare volume mounting via the azure files csi driver
# See https://docs.microsoft.com/en-us/azure/aks/azure-files-volume#create-a-kubernetes-secret
# See https://docs.microsoft.com/en-us/azure/aks/azure-files-csi
# See https://docs.microsoft.com/azure/aks/azure-files-volume#create-a-kubernetes-secret
# See https://docs.microsoft.com/azure/aks/azure-files-csi
- secretName: debugstorageaccountconfig
type: Opaque
data:
Expand Down

0 comments on commit a2f2292

Please sign in to comment.