Q16: Give me example of various "As Code" practices in Azure/ DevOps
- Operation As Code
- Performance As Code
- Pipeline As Code
- Quality As Code
- Config As Code
- Infra As Code
Q17: Give Some examples of Quality checks and tests that can be integrated in Azure Devops pipeline.
Q18:
Q19:
Q20:
==========================================================================
Q16: Give me example of various "As Code" practices in Azure/ DevOps
- Operation As Code
- Performance As Code
- Pipeline As Code
- Quality As Code
- Config As Code
- Infra As Code
Answer:
Below are the As Code practices practice examples
Operation As Code - Azure Logical Apps and Azure Functions are two great examples of automating Operations as Code. Azure Logic Apps can be created in JSON defination. Azure Functions are well known for they are coding in languages like C#, Java, Python etc.
Performance As Code: Azure ARM templates can be used to implement Azure monitor for monitoring, alarm, logging etc.
Pipeline As Code: We can create Azure DevOps pipeline file azure-pipelines.yml file to define pipeline stages, jobs and tasks. This YAML can easily be used to deploy pipelines again and again.
Quality As Code: With the help of Azure Devops pipeline multiple Quality Checks and test can be implemented in states in pipeline. Multiple automation test can be written in pipeline in sameway.
Config As Code: Azure Desired State Configuration (DSC) of your infrastructure or application in code. Azure DSC powershell scripts can be created and used in Azure Automation.
Infra As Code: The well-known example of Infrastructure as Code is ARM Templates, CFT (Cloud Formation Templates), biceps and terraforms.
==========================================================================
Q17: Give Some examples of Quality checks and tests that can be integrated in Azure DevOps pipeline.
Answer:
1. Unit Tests
2. Code Quality Analysis
3. Security Vulnerability Scanning.
4. Integration Testing
5. Performance Testing
6. Code Coverage
Unit Tests - eg. Testing individual component of dotnet application. Ensure each method works as expected. This will run the unit test case already written. I have written unit test cases in nUnit Framework.
YAML
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '6.x'
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: dotnet test --logger:trx
displayName: 'Run Unit Tests'
Code Quality Analysis- eg usage of sonarCloud to analyze the code quality, code smell, bugs and vulnerabilities
Security Vulnerability Scanning:
Integration Testing: Testing the interaction between different services in a microservices architecture. Usage: Ensure that services work together as expected.
docker-compose.yml is the file that can be used for Integration Testing. We have to write Integration test cases as well.
Performance Testing: JMeter can be used for load testing and performance testing of a web application.
Code Coverage: For code written in python, Code Coverage utility can be run to check the code coverage
==========================================================================
Q18:
==========================================================================
Q19:
==========================================================================
Q20:
==========================================================================
No comments:
Post a Comment