AZ-203 Exam QuestionsBrowse all questions from this exam

AZ-203 Exam - Question 8


DRAG DROP -

You are creating a script that will run a large workload on an Azure Batch pool. Resources will be reused and do not need to be cleaned up after use.

You have the following parameters:

Exam AZ-203 Question 8

You need to write an Azure CLI script that will create the jobs, tasks, and the pool.

In which order should you arrange the commands to develop the solution? To answer, move the appropriate commands from the list of command segments to the answer area and arrange them in the correct order.

Select and Place:

Show Answer
Correct Answer:

To create a script that will run a large workload on an Azure Batch pool, the commands should be arranged in the following order: 1. Create the pool - This step will initiate the pool where the tasks will run. Use a command similar to: az batch pool create --id mypool --vm-size Standard_A1 --target-dedicated 2 --image canonical:ubuntuserver:16.04-LTS --node-agent-sku-id "batch.node.ubuntu 16.04" 2. Create the job - This command will encapsulate the tasks that will be added. Use a command similar to: az batch job create --id myjob --pool-id mypool 3. For loop to iterate through the number of tasks - This loop will be used to create multiple tasks in the job. Use a command similar to: for i in {1..$numberOfJobs} do 4. Create tasks - Add tasks to the job. This step will create the necessary tasks and make use of the loop variable. Use a command similar to: az batch task create --job-id myjob --task-id task$i --command-line "/bin/bash -c 'printenv AZ_BATCH_TASK_WORKING_DIR'" This order ensures that the pool is created first, then the job, followed by a loop to create the required number of tasks. Each task in the loop is created with a unique task ID.

Discussion

8 comments
Sign in to comment
Dann1112
Feb 24, 2020

Should be: Create Pool Create Job For loop Create Task Reference: https://docs.microsoft.com/bs-latn-ba/azure/batch/quick-create-cli#create-tasks

Daltonic75
Mar 11, 2020

Agree. "Create task"uses "$i" concatenated to the task ID value, where "i" is the loop index.

Juanlu
Dec 14, 2020

Agree !

PraPat
Jan 4, 2020

Check https://vceguide.com/which-order-should-you-arrange-the-commands-to-develop-the-solution/ for options

DanielNadjbabi
Dec 25, 2020

https://vceguide.com/which-order-should-you-arrange-the-commands-to-develop-the-solution/

AK89
May 26, 2020

Should be: Create Pool Create Job For loop Create Task

SilNilanjan
Aug 29, 2020

The order given in the question should be the correct order, there is nothing to alter

triptimandal01
Jul 29, 2020

I agree for loop should be #3 and var i is refereed in create task commands. So which means the order in question is right order..no need to change.

ss22
Feb 11, 2021

https://docs.microsoft.com/bs-latn-ba/azure/batch/quick-create-cli#create-tasks

Deputy_Cartman
Apr 8, 2021

Another incorrect answer on this website. In other news, water remains wet. 1. az batch pool create 2. az batch job create 3. for i in {1..4} 4. az batch task create https://docs.microsoft.com/en-us/azure/batch/quick-create-cli Last updated: 13 August 2020 https://docs.microsoft.com/en-us/azure/batch/quick-create-cli

jhonattansolarte
Jul 12, 2021

*** RESPONSE (Image) https://user-images.githubusercontent.com/8276103/125328926-7fe7ae00-e30a-11eb-8bb9-55e5c3932e0b.jpeg