This repository contains information to demo quality gates on azure devops
- Create AKS (Azure Kubernetes Service) cluster with ACR (Azure Container Registry) integration. Check out https://docs.microsoft.com/en-us/azure/aks/cluster-container-registry-integration for more details. Keep note of the registry endpoint
xxx.azurecr.io
- Create a new project inside Azure Devops (https://dev.azure.com/)
- Import this repository
- Once the import has been completed, go to
Project Settings
(bottom-left side of the screen) - Navigate to
Service connections
and add the following. You can select the cluster and registry from your subscription created earlier - Connect to the kubernetes cluster (can be via Cloud Shell) and install the
ingress-nginx
Ingress controller (https://kubernetes.github.io/ingress-nginx/deploy/) - Get the external ip of the
ingress-nginx-controller
, e.g. using the commandkubectl -n ingress-nginx get svc ingress-nginx-controller
- Deploy the
OneAgent Operator
on the kubernetes cluster where the application will be deployed - Deploy Keptn Quality Gates on the kubernetes cluster (or elsewhere) and ensure it is exposed. Also install the dynatrace-service, dynatrace-sli-service and jmeter-service Note the Keptn Endpoint, Keptn API token and Keptn Bridge URL. Check out Keptn documentation for more info
- Open the
azure-pipelines.yml
file (this can be done in the Azure DevOps UI) and fill in the variables:
variables:
- name: KEPTN_ENDPOINT
value: 'https://xxx.nip.io/api'
- name: KEPTN_BRIDGE
value: 'https://xxx.nip.io/bridge'
- name: KEPTN_API_TOKEN
value: xxx
- name: KEPTN_PROJECT # can be chosen freely
value: 'simplenode-azure'
- name: KEPTN_SERVICE # can be chosen freely
value: 'simplenodeservice'
- name: KEPTN_STAGE # can be chosen freely
value: 'staging'
- name: KEPTN_MONITORING
value: 'dynatrace'
- name: SIMPLENODE_VERSION
value: '1'
- name: APP_NAME
value: 'simplenodeservice'
- name: INGRESS_ENDPOINT # this is the ingress for the simplenode application
value: 'xxx.xxx.xxx.xxx.nip.io'
- name: REGISTRY_NAME
value: 'ACE Registry' # as configured in the service connection in step 5
- name: REGISTRY # endpoint
value: 'aceegistry.azurecr.io'
- name: AKS_NAME # as configured in the service connection in step 5
value: 'AKS'
- Save and commit the changes
- Go to the
Pipelines
section and click onCreate Pipeline
, SelectAzure Repos Git
and select your created project repo. - This will open the
azure-pipelines.yml
file with the changes made above. - Click on
Run
on the top-right of the screen. The Pipeline will now start. - Verify in Dynatrace and Keptn Bridge after the run is complete
- To change the simplenodeservice behavior, set the
SIMPLENODE_VERSION
variable to 1(fast), 2(slower), 3(fast), 4(slow)