Skip to content

Project 3 submission for the Udacity nanodegree course "Cloud DevOps using Microsoft Azure". It shall demonstrate knowledge of Quality Assurance techniques and tools acquired in the course. These tools and techniques are integrated in Azure pipelines.

Notifications You must be signed in to change notification settings

schildner/udacity-azure-course-project3

Repository files navigation

Overview

Build Status

This is a final project submission for Udacity Azure DevOps Course: Ensuring Quality Releases.

Project Specifications

1. Create Azure DevOps CI/CD pipeline

Create the tasks that allow for Terraform to run and create the resources below

Resource Created with Terraform Status
AppService
Network
Network Security Group
Public IP
Resource Group
Linux VM (created using Packer -- using a Standard_B1s size for lowest cost)

Execute Test Suites

Test Type Technology Stage in CI/CD pipeline Status
Integration Postman Test Stage - runs in Microsoft-hosted VM
Functional Selenium Test Stage - runs in custom linux VM
Performance JMeter Test Stage - runs against the AppService

2. Azure Monitor

Goal Status
Configure an Action Group (email)
Configure an alert to trigger given a condition from the AppService.
The time the alert triggers and the time the Performance test is executed ought to be very close.
Direct the output of the Selenium Test Suite to a log file, and execute the Test Suite.
Configure custom logging in Azure Monitor to ingest this log file. This may be done non-CI/CD.

Test Suites Execution Details

1. Postman

  • Create a Regression Test Suite from the Starter APIs.
  • Use the Publish Test Results task to publish the test results to Azure Pipelines.
  • Create a Data Validation Test Suite from the Starter APIs.

2. Selenium

  • Create a UI Test Suite that adds all products to a cart, and then removes them.
  • Include print() commands throughout the tests so the actions of the tests can easily be determined.
  • Deploy the UI Test Suite to the linux VM and execute the Test Suite via the CI/CD pipeline.

3. JMeter

  • Use the starter APIs to create two Test Suites.
  • Using variables, reference a data set (csv file) in the test cases where the data will change.
  • Create a Stress Test Suite
  • Create a Endurance Test Suite
  • Generate the HTML report (non-CI/CD)

IMPORTANT: Since the AppService is using the Basic/Free plan, start small (2 users max) and once you are ready for the final submission, use up to 30 users for a max duration of 60 seconds. The "Data Out" quota for the AppService on this plan is only 165 MiB.

Instructions to Deploy Cloud Infrastructure from local PC with Terraform

  • Configure Authentication via Service Principal and Client Secret

    Following this guide we can set up the service principal allowing terraform to change resources in selected subscription scope.

    Executing az ad sp create-for-rbac command as described in the guide above the following output gets printed on console.

    {
      "appId": "00000000-0000-0000-0000-000000000000",
      "displayName": "azure-cli-2017-06-05-10-41-15",
      "name": "http://azure-cli-2017-06-05-10-41-15",
      "password": "0000-0000-0000-0000-000000000000",
      "tenant": "00000000-0000-0000-0000-000000000000"
    }

    Then we need to export the following environment variables which are then read by terraform:

    export ARM_CLIENT_ID=<value corresponds to appId printed on console>
    export ARM_CLIENT_SECRET=<value corresponds to password>
    export ARM_TENANT_ID=<value corresponds to tenant>
  • Navigate to the environment / test directory, then run terraform init, plan, apply.

cd terraform/environment/test
terraform init
terraform plan -out solution.plan
terraform apply "solution.plan"

About

Project 3 submission for the Udacity nanodegree course "Cloud DevOps using Microsoft Azure". It shall demonstrate knowledge of Quality Assurance techniques and tools acquired in the course. These tools and techniques are integrated in Azure pipelines.

Topics

Resources

Stars

Watchers

Forks