Develop Azure compute solutions (25–30%) Flashcards

1
Q

You are working on a Python web app named myCompanyApp1. All the source code is hosted in a GitHub repository. The repository URL is https://github.com/myCompanyApp1/. You want to test the application before releasing it to production. You decide to create a deployment slot on your app service named StagingSlot.

You need to use the Azure command-line interface (CLI) to write a script that will create the web app and deploy your application to StagingSlot.

How should you complete the Azure CLI script? To answer, select the appropriate options from the dropdown menus.

Choose the correct options

gitRepo = "https://github.com/myCompanyApp1/"
appPlan = "myCompanyAppPlan1"
appName = "myCompanyWebApp1"
slotName = "StagingSlot"
rgName = "myCompanyResourceGroup"
az
group
create --location centralus --name SrgName
az
appservice plan
create --name $appPlan --resource-group $rgName --sku P3V2
az
webapp
create --name $appName --resource-group $rgName --plan $appPlan
az
webapp deployment slot
create --name $appName --resource-group $rgName --slot $slotName
az
webapp deployment source
config --name $appName --resource-group $rgName --slot $slotName \
--repo-url $gitRepo --branch master --manual-integration
A

You should complete the CLI script as follows:

gitRepo = "https://github.com/myCompanyApp1/"  
appPlan = "myCompanyAppPlan1"  
appName = "myCompanyWebApp1"  
slotName = "Stagingslot"  
rgName = "myCompanyResourceGroup"  
az group create --location centralus --name \$resourcegroupname  
az appservice plan create --name \$appPlan --resource-group \$resourcegroupname --sku  
P3V2  
az webapp create --name \$appName --resource-group \$resourcegroupname --plan  
\$apprian  
az webapp deployment slot create --name \$appName --resource-group  
\$resourcegroupname --slot \$slotName  
az webapp deployment source config --name \$appName --resource-group  
\$resourcegroupname --slot \$slotName  
--repo-url \$gitRepo --branch master --  
manual-integration  

You should first create the resource group using the az group create command.
In the same resource group, you should then create the app service plan using the az appservice plan create command.

Once the app service plan is created, you create the app service using the az webapp create command.
To create the deployment slot where you want to test your application, you need to create the slot first. When you create an app service, only one slot is created for the production application. You need to run the az webapp deployment slot create command to create the staging slot.

Once the deployment slot for testing is created, you can then configure the source of where the source code would be deployed from. In this case, you want to deploy the code from the GitHub repository. You can use the az webapp deployment source config command to set the repository for the source code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Your company is developing an ASP.NET Azure Web app. The company wants to use mTLS authentication. You request a client certificate from a trusted CA and need to ensure the client cert is avvailable to the app.

How should you make the client cert available

A

Through the HttpRequest.ClientCertificate property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You are developing an Azure function as a timer-triggered function. The function should trigger once every three hours.

You need to determine the correct NCRONTAB expression to control the timer.

Which expression should you use?

A

0 0 */3 * * *

Fields in the NCRONTAB expression are defined as

`{second} {minute} {hour} {day-of-month} {month} {day-of-week}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly