- Contoso Finance is a N-tier application. A frontend, API and a database
- This is a script that creates the needed services on Azure to host the Contoso Finance
- Reference steps can be found here
- Run the file
contosofinance.azcli
in vscode to create the environment.
- Create a new SQL Hosting Server in the Azure portal. During creation, set the size of the new hosting server in GB to 100.
- You should have a new SQL Hosting Server resource provisioned in the Azure portal
-
Deploy a new Azure SQL Database instance in the Azure portal using the following configuration:
-
Database Name: ContosoFinanceWebDB
-
Max Size in MB: 250
-
Resource group: ContosoFinanceApp
-
Location: Local
-
-
Copy the connection string for later reference
- A deployed SQL Database in the Azure portal portal and a copy to the connection string
Duration: 15-30 minutes
In this exercise, you will provision a website using the Azure portal. The Web App will leverage the SQL DB running in Azure. This is the front-end website that customers will see when browsing for a Mortgage or other financial services products.
-
Create a new Azure Web App in the Azure portal portal using the following configuration:
-
App Name: Specify a unique and valid URL (until the green check mark appears)
-
Resource group: ContosoFinanceApp
-
- A functioning web app deployed in the Azure portal portal
-
Create a new Azure Storage Account in the Azure portal portal using the following configuration:
-
Name: unique value for the storage account (ensure the green check mark appears)
-
Resource Group: ContosoFinanceApp
-
- A storage account deployed in the Azure portal Portal
-
Add a new App setting for the Contoso Financial Web Application with the following values:
-
Key: AzureQueueConnectionString
-
Value: enter the Connection String for the Storage Account that was just created
-
-
Locate Connection Strings below App settings in the Azure Global Add a new Connection String with the following values:
-
Name: ContosoFinance
-
Value: enter the Connection String for the SQL Database in Azure you just updated
-
Type: SQL Database
-
- The application settings for the web app should be configured to reference the newly created storage account and Azure SQL Database
- Deploy the web app from the following GitHub repository: https://github.com/wshamroukh/contosofinanceweb
- Navigate to the URL of your Azure Web App and click the Products link. The products catalog should load.
Note: You may get an error about CORS. This can be ignored, as it will be configured later in the lab.
Duration: 15-30 minutes
In this exercise, you will provision an Azure API App using the Azure portal. This API application is part of the front-end Web Applications and makes recommendations to the user on products the company wishes to highlight. The API App will leverage the SQL Database deployed previously.
-
Create a new Azure API App using the same resource group as the web app
-
Configure Cross-Origin Resource Sharing (CORS) on the new app to use ALLOWED ORIGINS
-
The new API app should be deployed in the same resource group as the web app
-
CORS should configured to allow all origins for the API app
- Deploy the following application to the new API App: https://github.com/wshamroukh/contosofinanceoffers
- The API app should be populated with the code from the GitHub repository
-
Add a new App Setting for the Contoso Financial Web Application with the following values:
-
Key: offersAPIUrl
-
Value: enter the HTTPS URL for the Offers API App with /api/get appended to the end
Example: https://contosofinanceapi.azurewebsites.net/api/get
-
- The web app should now show special offers when loaded from the home page
Duration: 15-30 minutes
Contoso wants to automate the process of generating applications in PDF format and using Azure Functions. In this exercise, you will provision a Function App using the Azure portal. This Function App will watch the Azure Storage Queue for a message that the web application has submitted, process the application creating a PDF and storing it in Azure Blob Storage.
-
Create a new Azure Function in the Azure portal portal using the same resource group as the web app
-
Deploy the code from the following repository: https://github.com/wshamroukh/contosofinancefunction
-
Scroll down to the Application settings and click +Add new setting to add a storage connection. This storage account will be used to write the PDFs to blob storage.
-
Name: contosofinancestorage (must be this name exactly)
-
Value: paste the connection string for the storage account created earlier in the lab
-
-
Locate Connection Strings below Application settings, and click +Add a new Connection String with the following values:
-
Name: ContosoFinance (must match exactly -- case sensitive)
-
Value: enter the Connection String for the SQL Database
-
-
Type: SQL Azure
- The function code should be deployed and configured to connect to the Azure SQL Database and the Storage Account for the Contoso Web App
Duration: 15-30 minutes
In this exercise, you will provision the admin website to be used by employees to review applications submitted.
-
Create a new web app in the Azure portal portal that will be used for the admin web app
-
Add a new connection string so it can connect to the Azure SQL Database for the web app
-
Name: ContosoFinance
-
Value: enter the Connection String for the SQL Database
-
Type: SQL Database
-
- The web app should be deployed with the connection string configured correctly in application settings
- Deploy the web app from the following GitHub repository: https://github.com/wshamroukh/contosofinanceadmin to the newly deployed web app
- The web app should load, and any orders that are submitted through the web app should show in the admin portal with the ability to download the PDF