Skip to content

Commit 8a30d03

Browse files
shivashant25mithunshanbhag
authored andcommitted
updates to L100 cloud native app walkthrough (#54)
1 parent 1abca30 commit 8a30d03

File tree

9 files changed

+144
-133
lines changed

9 files changed

+144
-133
lines changed
257 KB
Loading
1.34 MB
Loading
Lines changed: 35 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,70 @@
1-
# Cloud Native App Architecture Walkthrough : L100
1+
# Cloud Native App Architecture : Overview
22

3-
## Overview
3+
## Key Takeaways
44

5-
Contoso Traders is one of the leading E-Commerce platforms with a wide range of electronic products like desktops and laptops, mobile phones, gaming console accessories, and monitors. This includes a wide range of international brands like Microsoft Surface, XBOX, Samsung, ASUS, DELL etc. Contoso Traders Organization is using Microsoft 365 for their collaboration works internally.
5+
The key takeaways from this demo are:
66

7-
Contoso Traders has different departments like marketing, sales, accounts, HR, and IT. For internal communication, they are using Microsoft Teams and Outlook. In the Contoso Traders organisation, there are various functionalities with the Contoso Traders E-commerce platform like product approval, product price approval, Product price update approval etc.
7+
* You'll get an overview of the application's architecture.
8+
* You'll also get an insight into the various Azure services that this application leverages.
89

9-
## Context
10+
## Before You Begin
1011

11-
You will explore the Contoso traders code base present in a GitHub repository which contains all the files related to the application’s UI, backend APIs, deployment files, GitHub workflows, and deployment guides. You will also launch the application and review the functionalities of it.
12+
* No prerequisites are required for this specific demo.
1213

13-
## Solution Architecture
14+
## Walkthrough: Exploring the application's architecture and the Azure services leveraged
1415

15-
Contoso Traders is a 2 tier application and consists of Client tier.
16+
Let's take a quick peek into Contoso Traders's application architecture. The various components can be broadly categorized as follows:
1617

17-
Presentation tier conatins the React JS application that acts as a client, collects the the information given by the user and passes it to Database tier. It consists of a collection of small, autonomous services. Each service is self-contained and should implement a single business capability within a bounded context. A bounded context is a natural division within a business and provides an explicit boundary within which a domain model exists.
18+
![Contoso Traders Architecture](./media/cni1.png)
1819

19-
## Major components of Solution Architecture:
20+
### DevOps
2021

21-
### DEVOPS
22+
The application's source code, tests, deployment scripts (IaC), tests are all available in this GitHub repository itself. We also have CI/CD pipelines (github workflows) that build the various application components, and deploy them to Azure Cloud.
2223

23-
The word DevOps is a combination of the terms development and operations, meant to represent a collaborative or shared approach to the tasks performed by a company's application development and IT operations teams.
24+
An Azure Container Registry (ACR) is used to store the container images for the application's microservices. The ACR is integrated with the GitHub repository, and the container images are built and pushed to the ACR whenever there is a commit to the repository's `main` branch.
2425

25-
DEVOPS consists of 2 components:
26+
### Front-End Infrastructure
2627

27-
1. **GitHub (Reposistry and Actions)**: A code hosting platform for version control and collaboration.
28+
The front-end is a React JS application that is hosted on Azure App Service. The front-end application is also configured to use Azure Application Insights for monitoring and telemetry.
2829

29-
- **GitHub Repository**: A repository contains all of your project's files and each file's revision history. You can discuss and manage your project's work within the repository. You can find the **ContosoTraders** Application's GitHub repository here `https://github.com/microsoft/ContosoTraders`.
30-
- **GitHub Actions**: A continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. In this application you are deploying Azure Infrastructure using the Bicep template with the GitHub Workflow.
30+
Power Apps is used to create the Shipping Management App where this app will be managing shipment. Storage Account is used to store the images of the products available in the application.
3131

32-
2. **Container Registry**: Allows you to build, store, and manage container images and artifacts in a private registry for all types of container deployments.
32+
CDN is used to cache the static content of the application, and to serve it from the nearest edge location. This helps in reducing the latency and improving the performance of the application.
3333

34-
### MICROSERVICES
34+
### Back-End Infrastructure
3535

36-
Microservices are a popular architectural style for building applications that are resilient, highly scalable, independently deployable, and able to evolve quickly. It consists of a collection of small, autonomous services. Each service is self-contained and should implement a single business capability within a bounded context. A bounded context is a natural division within a business and provides an explicit boundary within which a domain model exists.
36+
API Management (gateway) is used to expose the application's microservices to the front-end. Common policies such as authentication, authorization, rate limiting, caching etc. are configured in API Management. The API Management is also configured to use Azure Active Directory for authentication and authorization.
3737

38-
Backend tier consists of 3 API components that are containerized:
38+
### Back-End APIs and Databases
3939

40-
1. **Shopping Cart**: Azure Container App is fully managed serverless container service for building and deploying modern apps at scale which helps in deploying containerised apps without managing complex infrastructure. Azure Cosmos DB is a fully managed NoSQL and relational database for modern app development. Cosmos DB holds the data of products which you add to the shopping cart.
40+
The application's APIs are built using .NET 6, and are deployed as containerized applications. We have three primary APIs:
4141

42-
2. **Products and Stocks/Inventory**: Azure Kubernetes service simplifies deploying a managed Kubernetes cluster in Azure by offloading the operational overhead to Azure. Controller commands, Service layer repositories and Data Model encapsulated in AKS. Azure SQL Database is an always-up-to-date, fully managed relational database service built for the cloud. Build your next app with the simplicity and flexibility of a multi-model database that scales to meet demand. It offers single-digit millisecond response times, automatic and instant scalability, along with guarantee speed at any scale.
42+
* Products/Stocks API: This API is deployed as a containerized application on Azure Kubernetes Service (AKS). It is used to manage the products and their inventory. It uses both Azure SQL Database (product catalog) as well as Azure Cosmos DB (stock/inventory) for its persistence.
4343

44-
3. **Image Search**: An image search engine is a tool that helps you find appropriate images to use in your online store. The Computer Vision service provides developers with access to advanced algorithms for processing images and returning the product information that are stored in the storage account. The storage account provides a unique namespace which provides highly available, durable, scalable and redundant storage. Here, in this application storage accounts stores the images of the products available in the application, which can be accessed by computer vision and app service.
44+
* Carts API: This API is deployed as a containerized application on Azure Container App (ACA). It is used to manage the shopping carts operations. It uses Azure Cosmos DB as its repository.
4545

46-
### Gateway & IAM
46+
* Image Search API: This API is deployed as a containerized App Service. It is used to search for matching products with user-submitted images. It primarily relies on Azure Cognitive Search (Computer Vision).
4747

48-
Application Gateway is a web traffic load balancer that enables you to manage traffic to your web applications. IAM is a cloud service that controls the permissions and access for users and cloud resources.
48+
All these microservices are also configured to use Azure Application Insights for monitoring and telemetry.
4949

50-
1. **Azure Active Directory**: Azure AD is an integrated cloud identity and access solution, and a leader in the market for managing directories, enabling access to applications, and protecting identities.
50+
### Monitoring and Telemetry
5151

52-
2. **API Managemnet (Gateway)**: Azure API Management offers a scalable, multi-cloud API management platform for securing, publishing and analysing APIs.
52+
Application Insights is used to monitor the application's performance and health. It is also used to collect telemetry data (metrics, events, logs) from the application's various components. The telemetry data is used to generate dashboards and alerts.
5353

54-
### Front End
54+
### Security
5555

56-
The Front End is the part of the website where users can see and interact with such as the graphical user interface (GUI) and the command line including the design, navigating menus, texts, images, videos, etc.
56+
Azure Active Directory (AAD) is used to manage the application's users and groups. AAD is also used to authenticate and authorize the application's users. The application's APIs are configured to use AAD for authentication and authorization.
5757

58-
The primary use of a CDN is to decrease load times across a geographical area and DNS plays a major part in this. In order to make use of a CDN, the domain must point to a CDN provider. There are two App Service's in the application, one created with React JS is used as main website for ContosoTraders and other created using C#/ASP.Net for Rewards App. Power Apps is used to create the Shipping Management App where this app will be managing shipment. Storage Account is used to store the images of the products available in the application.
58+
Microsoft Defender is used to monitor the application's security posture. It is also used to detect and respond to security threats to the infrastructure.
5959

60+
## Walkthrough: Launching the application
6061

61-
![](https://raw.githubusercontent.com/microsoft/ContosoTraders/main/docs/architecture/contoso-traders-enhancements.drawio.png)
62+
1. Open browser and navigate to [https://www.contosotraders.com/](https://www.contosotraders.com/)
6263

64+
![Contoso Traders App](media/launchapp.png)
6365

64-
## Instructions
65-
66-
1. Open browser, using a new tab navigate to `https://github.com/microsoft/ContosoTraders` GitHub repository. This repository conatins all the neccessary files and documents which will guide you to host the contoso traders application from the scratch.
67-
68-
1. Navigate to github/workflows folder, it contains the workflow YAML files using which you can the deployment resources. Please see the individual workflows for more information.
69-
70-
1. contoso-traders-infra-deployment.yml will deploy the infrastructure into Azure which includes resource groups, resources, sets access policies to key vaults, and seeds the database from storage accounts into an Azure SQL database. This workflow will invoke the Bicep template that deploys the ACI app and AKS cluster.
71-
72-
1. contoso-traders-app-deployment.yml deploys the application to Azure cloud. The application is configured to use the pre-deployed resources.
73-
74-
1. contoso-traders-load-testing.yml configures the load testing for the application.
75-
76-
## Launch App
77-
78-
1. Open browser and navigate to [https://contosotraders.com/](https://www.contosotraders.com/)
79-
80-
![](media/launchapp.png)
81-
82-
In the webpage you will be able to see the ecommerce store with clsuter of electronic products such as Laptops, Xbox controllers, Desktops, mobile phones and monitors of different brands.
66+
On this webpage, you'll be able to see the e-commerce store with clusters of electronic products such as laptops, game controllers, desktops, mobile phones and monitors of different brands.
8367

8468
## Summary
8569

86-
You have got an overview of the ContosoTraders Application and also walkthrough of the App Architecture.
70+
Hope this demo was helpful in giving you an overview of the application's architecture and the various Azure services that this application leverages. We have a more detailed technical walkthrough of this application in [the next demo](./technical-walkthrough.md).

demo-scripts/cloud-native-app-architecture/technical-walkthrough.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
# Technical Walkthrough: Cloud Native Infrastructure
22

3-
## Overview
3+
## Overview of the Contoso Traders application
44

55
Contoso Traders is one of the leading E-Commerce platforms with a wide range of electronic products like desktops and laptops, mobile phones, gaming console accessories, and monitors. This includes a wide range of international brands like Microsoft Surface, XBOX, Samsung, ASUS, DELL etc. Contoso Traders Organization is using Microsoft 365 for their collaboration works internally.
66

77
Contoso Traders has different departments like marketing, sales, accounts, HR, and IT. For internal communication, they are using Microsoft Teams and Outlook. In the Contoso Traders organisation, there are various functionalities with the Contoso Traders E-commerce platform like product approval, product price approval, Product
88

9-
## Context
9+
## Key Takeway
1010

11-
## Steps
11+
1. **Archiecture Contoso Traders application**: The complete architecture of the Contoso Traders application is explained. The architecture is divided into multiple sub-components which covers different aspect of the application.
12+
13+
1. **Demo of Azure Deployment**: You
14+
15+
16+
## Walkthrough
17+
18+
### Archiecture Contoso Traders application
19+
20+
In this walkthrough, You will understand the architecture of the Contoso Traders application and its different components.
1221

1322
1. Open browser, using a new tab navigate to `https://github.com/microsoft/ContosoTraders` GitHub repository. This repository conatins all the neccessary files and documents which will guide you to host the contoso traders application from the scratch.
1423

@@ -24,19 +33,23 @@ Contoso Traders has different departments like marketing, sales, accounts, HR, a
2433

2534
- **FRONTEND**: Frontend is basically a ReactJS application hosted in Azure App service which works with backend(microservices) in a synchronized manner to get data.
2635

27-
- **MICROSERVICES (3)**: There are 3 components of the application which are containerized that is, Shopping cart, products + carts, and Image search.**Shopping cart** is hosted in Azure container instance which pulls the image from container instance. **Products + carts** is hosted in Azure Kubernetes cluster which is deployed by pulling the image from container instance. **Image search** is hosted in conatinerzied App service.
36+
- **MICROSERVICES**: There are 3 components of the application which are containerized that is, Shopping cart, products + carts, and Image search.**Shopping cart** is hosted in Azure container instance which pulls the image from container instance. **Products + carts** is hosted in Azure Kubernetes cluster which is deployed by pulling the image from container instance. **Image search** is hosted in conatinerzied App service.
2837

2938
- **GATEWAY & IAM**: All the resources, identities communicate using Azure APIs to provide seamless experience inorder to keep up the website up and running. Azure Key vault is used to store all the sensitive keys and secrets, access policies are created which is assigned to resources and identities which uses the stored keys and secrets as needed.
3039

3140
- **MONITORING AND TELEMETRY**: Azure Monitor, Application Insights, and Log Analytics is used to collect the logs and telemetry which can be used to check features like availabilty, performance, scability, etc of the resources.
3241

3342
- **SECURITY**: Microsoft Defender for cloud and DevOps are used th protect the resources and GitHub repository from vulnerabilities and threats.
3443

35-
![](media/cni1.png)
44+
![](media/cni13.png)
3645

3746
1. Open browser, using a new tab navigate to your forked **ContosoTraders** repo (`https://github.com/<GITHUB USERNAME/ContosoTraders`) GitHub repository. This repository conatins all the neccessary files and documents which will guide you to host the contoso traders application from the scratch.
3847

3948
![](media/cni6.png)
49+
50+
### Deploying the application to Azure
51+
52+
In this walkthrough, Let's explore and understand the GitHub Wworkflows which deploys the Contoso traders application in detail.
4053

4154
1. Navigate to **github/workflows (1)** folder, it contains the **workflow YAML files (2)** using which you can deploy and configure the resources. Each workflow has its own functionality.
4255

@@ -48,7 +61,7 @@ Contoso Traders has different departments like marketing, sales, accounts, HR, a
4861

4962
1. The first job **provision-infrastructure** is the one which deploys the Infrasructure to Azure. Let us look at the each component of the job.
5063

51-
- **checkout code (1)**: The checkout component step automates the Azure sign in using the details defined in a secret named **SERVICEPRINCIPAL**.
64+
- **azure login (1)**: The checkout component step automates the Azure sign in using the details defined in a secret named **SERVICEPRINCIPAL**.
5265

5366
- **create resource group (2)**: This step creates an **Azure resource group**, A bicep template named **createResources.bicep** bicep template which is present in `ContosoTraders/iac` directory.
5467

@@ -62,6 +75,12 @@ Contoso Traders has different departments like marketing, sales, accounts, HR, a
6275

6376
- **purge CDN endpoint (7)**: This step purges the **CDN Endpoint**.
6477

65-
![](media/cni9.png) 
78+
![](media/cni11.png) 
79+
80+
1. The second job **deploy-carts-api**, it builds a docker image of the carts-api and pushes it to Azure container instance. Let us look at the each component of the job.
81+
82+
- **azure login (1)**: The checkout component step automates the Azure sign in using the details defined in a secret named **SERVICEPRINCIPAL**.
83+
84+
-
6685

6786

75.4 KB
Loading
101 KB
Loading
105 KB
Loading
1.29 MB
Loading

0 commit comments

Comments
 (0)