Which Azure CLI or PowerShell command should you run?

A company is developing a solution that allows smart refrigerators to send temperature information to a central location. You have an existing Service Bus. The solution must receive and store messages until they can be processed. You create an Azure Service Bus instance by providing a name, pricing tier, subscription, resource group, and location.

You need to complete the configuration.

Which Azure CLI or PowerShell command should you run?

A)

B)

C)

D)

A . Option A
B . Option B
C . Option C
D . Option D

Answer: D

Explanation:

A service bus instance has already been created (Step 2 below). Next is step 3, Create a Service Bus queue.

Note:

Steps:

Step 1: # Create a resource group

resourceGroupName="myResourceGroup"

az group create –name $resourceGroupName –location eastus

Step 2: # Create a Service Bus messaging namespace with a unique name

namespaceName=myNameSpace$RANDOM

az servicebus namespace create –resource-group $resourceGroupName –name $namespaceName –location eastus

Step 3: # Create a Service Bus queue

az servicebus queue create –resource-group $resourceGroupName –namespace-name $namespaceName –name BasicQueue

Step 4: # Get the connection string for the namespace

connectionString=$(az servicebus namespace authorization-rule keys list –resource-group $resourceGroupName –namespace-name $namespaceName –name RootManageSharedAccessKey –query primaryConnectionString –output tsv)

References: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-cli

How should you complete the CLI commands?

Testlet 2

Case Study

This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other question on this case study.

At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next sections of the exam. After you begin a new section, you cannot return to this section.

To start the case study

To display the first question on this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question , click the Question button to return to the question.

LabelMaker app

Coho Winery produces bottles, and distributes a variety of wines globally. You are a developer implementing highly scalable and resilient applications to support online order processing by using Azure solutions.

Coho Winery has a LabelMaker application that prints labels for wine bottles. The application sends data to several printers. The application consists of five modules that run independently on virtual machines (VMs). Coho Winery plans to move the application to Azure and continue to support label creation.

External partners send data to the LabelMaker app lication to include artwork and text for custom label designs.

Requirements

Data

You identify the following requirements for data management and manipulation:

• Order data is stored as nonrelational JSON and must be queried using Structured Query Language (SQL).

• Changes to the Order data must reflect immediately across all partitions. All reads to the Order data must fetch the most recent writes.

Security

You have the following security requirements:

• Users of Coho Winery applications must be able to provide access to documents, resources, and applications to external partners.

• External partners must use their own credentials and authenticate with their organization’s identity management solution.

• External partner logins must be audited monthly for application use by a user account administrator to maintain company compliance.

• Storage of e-commerce application settings must be maintained in Azure Key Vault.

• E-commerce application sign-ins must be secured by using Azure App Service authentication and Azure Active Directory (AAD).

• Conditional access policies must be applied at the application level to protect company content.

• The LabelMaker application must be secured by using an AAD account that has full access to all namespaces of the Azure Kubernetes Service (AKS) cluster.

LabelMaker app

Azure Monitor Container Health must be used to monitor the performance of workloads that are deployed to Kubernetes environments and hosted on Azure Kubernetes Service (AKS).

You must use Azure Container Registry to publish images that support the AKS deployment.

Architecture

Issues

Calls to the Printer API App fail periodically due to printer communication timeouts.

Printer communications timeouts occur after 10 seconds. The label printer must only receive up to 5 attempts within one minute.

The order workflow fails to run upon initial deployment to Azure.

Order .json

Relevant portions of the app files are shown below. Line numbers are included for reference only.

This JSON file contains a representation of the data for an order that includes a single item.

HOTSPOT

You need to ensure that you can deploy the LabelMaker application.

How should you complete the CLI commands? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: group

Create a resource group with the az group create command. An Azure resource group is a logical group in which Azure resources are deployed and managed.

The following example creates a resource group named myResourceGroup in the westeurope location.

az group create –name myResourceGroup –location westeurope

Box 2: CohoWinterLabelMaker

Use the resource group named, which is used in the second command.

Box 3: aks

The command az aks create, is used to create a new managed Kubernetes cluster.

Box 4: monitoring

Scenario: LabelMaker app

Azure Monitor Container Health must be used to monitor the performance of workloads that are deployed to Kubernetes environments and hosted on Azure Kubernetes Service (AKS).

You must use Azure Container Registry to publish images that sup

How should you configure the Logic App?

DRAG DROP

A company backs up all manufacturing data to Azure Blob Storage. Admins move blobs from hot storage to archive tier storage every month.

You must automatically move blocks to Archive tier after they have not been accessed for 180 days. The path for any item that is not archived must be placed in an existing queue. This operation must be performed automatically once a month. You set the value of TierAgeInDays to 180.

How should you configure the Logic App? To answer, drag the appropriate triggers or action blocks to the correct trigger or action slots. Each trigger or action block may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: Recurrence

This operation must be performed automatically once a month.

Box 2: Condition

Move blocks to Archive tier after they have not been accessed for 180 days.

Box 3 (if true): Tier Blob

Move blocks to Archive tier after they have not been accessed for 180 days.

Box 4: Put a message in a queue

The path for any item that is not archived must be placed in an existing queue.

References: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-perform-data-operations

How should you complete the commands?

HOTSPOT

A company is developing a Java web app. The web app code is hosted in a GitHub repository located at https://github.com/Contoso/webapp.

The web app must be evaluated before it is moved to production. You must deploy the initial code release to a deployment slot named staging.

You need to create the web app and deploy the code.

How should you complete the commands? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: group

# Create a resource group.

az group create –location westeurope –name myResourceGroup

Box 2: appservice plan

# Create an App Service plan in STANDARD tier (minimum required by deployment slots).

az appservice plan create –name $webappname –resource-group myResourceGroup –sku S1

Box 3: webapp

# Create a web app.

az webapp create –name $webappname –resource-group myResourceGroup

–plan $webappname

Box 4: webapp deployment slot

#Create a deployment slot with the name "staging".

az webapp deployment slot create –name $webappname –resource-group myResourceGroup

–slot staging

Box 5: webapp deployment source

# Deploy sample code to "staging" slot from GitHub.

az webapp deployment source config –name $webappname –resource-group myResourceGroup

–slot staging –repo-url $gitrepo –branch master –manual-integration

References:

https://docs.microsoft.com/en-us/azure/app-service/scripts/cli-deploy-staging-environment

Which method should you use?

Question Set 4

You are writing code to create and run an Azure Batch job. You have created a pool of compute nodes. You need to choose the right class and its method to submit a batch job to the Batch service.

Which method should you use?
A . JobOperations.EnableJobAsync(String, IEnumerable<BatchClientBehavior>,CancellationToken)
B . JobOperations.CreateJob()
C . CloudJob.Enable(IEnumerable<BatchClientBehavior>)
D . JobOperations.EnableJob(String,IEnumerable<BatchClientBehavior>)
E . CloudJob.CommitAsync(IEnumerable<BatchClientBehavior>, CancellationToken)

Answer: E

Explanation:

A Batch job is a logical grouping of one or more tasks. A job includes settings common to the tasks, such as priority and the pool to run tasks on. The app uses the BatchClient.JobOperations.CreateJob method to create a job on your pool.

The Commit method submits the job to the Batch service. Initially the job has no tasks.

{

CloudJob job = batchClient.JobOperations.CreateJob();

job.Id = JobId;

job.PoolInformation = new PoolInformation { PoolId = PoolId };

job.Commit();

}



References: https://docs.microsoft.com/en-us/azure/batch/quick-run-dotnet

What should you do?

DRAG DROP

You are developing a software solution for an autonomous transportation system. The solution uses large data sets and Azure Batch processing to simulate navigation sets for entire fleets of vehicles. You need to create compute nodes for the solution on Azure Batch.

What should you do? Put the actions in the correct order.

Answer:

Explanation:

With the Azure CLI:

Step 1: In the Azure CLI, run the command: az batch account create

First we create a batch account.

Step 2: In Azure CLI, run the command: az batch pool create

Now that you have a Batch account, create a sample pool of Linux compute nodes using the az batch pool create command.

Step 3: In Azure CLI, run the command: az batch job create

Now that you have a pool, create a job to run on it. A Batch job is a logical group for one or more tasks. A job includes settings common to the tasks, such as priority and the pool to run tasks on. Create a Batch job by using the az batch job create command.

Step 4: In Azure CLI, run the command: az batch task create

Now use the az batch task create command to create some tasks to run in the job.

References: https://docs.microsoft.com/en-us/azure/batch/quick-create-cli

Which two actions should you perform?

You are developing a mobile instant messaging app for a company.

The mobile app must meet the following requirements:

– Support offline data sync.

– Update the latest messages during normal sync cycles.

You need to implement Offline Data Sync.

Which two actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.
A . Retrieve records from Offline Data Sync on every call to the PullAsync method.
B . Retrieve records from Offline Data Sync using an Incremental Sync.
C . Push records to Offline Data Sync using an Incremental Sync.
D . Return the updated At column from the Mobile Service Backend. Sort data based on the updated At column.
E . Return the updated At column from the Mobile Service Backend. Sort data based on the message id.

Answer: BE

Explanation:

B: Incremental Sync: the first parameter to the pull operation is a query name that is used only on the client. If you use a non-null query name, the Azure Mobile SDK performs an incremental sync. Each time a pull operation returns a set of results, the latest updated At timestamp from that result set is stored in the SDK local system tables. Subsequent pull operations retrieve only records after that timestamp.

E (not D): To use incremental sync, your server must return meaningful updated At values and must also support sorting by this field.

However, since the SDK adds its own sort on the updated At field, you cannot use a pull query that has its own order By clause.

References: https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-offline-data-sync

Which four commands should you use to develop the solution?

DRAG DROP

You plan to create a Docker image that runs as ASP.NET Core application named ContosoApp. You have a setup script named setupScript.ps1 and a series of application files including ContosoApp.dll.

You need to create a Dockerfile document that meets the following requirements:

– Call setupScript.ps1 when the container is built.

– Run ContosoApp.dll when the container starts.

The Dockerfile document must be created in the same folder where ContosoApp.dll and setupScript.ps1 are stored.

Which four commands should you use to develop the solution? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.

Answer:

Explanation:

Step 1: WORKDIR /apps/ContosoApp

Step 2: COPY ./-

The Docker document must be created in the same folder where ContosoApp.dll and setupScript.ps1 are stored.

Step 3: EXPOSE ./ContosApp/ /app/ContosoApp

Step 4: CMD powershell ./setupScript.ps1

ENTRYPOINT ["dotnet", "ContosoApp.dll"]

You need to create a Dockerfile document that meets the following requirements:

– Call setupScript.ps1 when the container is built.

– Run ContosoApp.dll when the container starts.

References:

https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-custom-docker-image

What should you use?

DRAG DROP

You manage several existing Logic Apps. You need to change definitions, add new logic, and optimize these apps on a regular basis.

What should you use? To answer, drag the appropriate tools to the correct functionalities. Each tool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: Enterprise Integration Pack

After you create an integration account that has partners and agreements, you are ready to create a business to business (B2B) workflow for your logic app with the Enterprise Integration Pack.

Box 2: Code View Editor

To work with logic app definitions in JSON, open the Code View editor when working in the Azure portal or in Visual Studio, or copy the definition into any editor that you want.

Box 3: Logical Apps Designer

You can build your logic apps visually with the Logic Apps Designer, which is available in the Azure portal through your browser and in Visual Studio.

References:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-enterprise-integration-b2b

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-author-definitions

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview

Which WebJob type should you recommend?

DRAG DROP

You are developing Azure WebJobs. You need to recommend a WebJob type for each scenario.

Which WebJob type should you recommend? To answer, drag the appropriate WebJob types to the correct scenarios. Each WebJob type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: Continuous

Continuous runs on all instances that the web app runs on. You can optionally restrict the WebJob to a single instance.

Box 2: Triggered

Triggered runs on a single instance that Azure selects for load balancing.

Box 3: Continuous

Continuous supports remote debugging.

Note:

The following table describes the differences between continuous and triggered WebJobs.

References:

https://docs.microsoft.com/en-us/azure/app-service/web-sites-create-web-jobs