Student Feedback
AZ-204: Developing Solutions for Microsoft Azure Certification Video Training Course Outline
Introduction
Starting with Azure (Optional)
Develop Azure Infrastructure as ...
Develop Azure Platform as a Serv...
Develop for Azure Storage
Implement Azure Security
Monitor, troubleshoot, and optim...
Connect to and consume Azure and...
Introduction
AZ-204: Developing Solutions for Microsoft Azure Certification Video Training Course Info
Gain in-depth knowledge for passing your exam with Exam-Labs AZ-204: Developing Solutions for Microsoft Azure certification video training course. The most trusted and reliable name for studying and passing with VCE files which include Microsoft Azure AZ-204 practice test questions and answers, study guide and exam practice test questions. Unlike any other AZ-204: Developing Solutions for Microsoft Azure video training course for your certification exam.
Develop Azure Infrastructure as a Service compute solutions
12. AZ-204 - Introduction to the Azure Batch Service
Hi and welcome back. Now, before we move forward, it's important to understand the architecture of the Azure Bath Service. Basically, what are the important parts of the Azure BAT service now? So, let's say you have your application, and your application can make APA calls to the Azure Bat service. Now, along with your application and the Azure Batservice, you can also provision an Azure Storage account. So remember, your Azure Storage account can be used to store the input and output files for Azure Batch. So now let's say that your application is responsible for processing videos, so it could submit the videos to the Azure Bath service for processing. Now, when the request is made on the Azure Bat service, you basically make a request to basically create a job. The job would then have tasks. So let's say one of the tasks is basically to process the videos. Now, what the Azure Batch service will do is ensure that it creates a pool of virtual machines. These virtual machines will go ahead, pick up the tasks, and basically execute those tasks. Now, what is the underlying application or what's the underlying process that's going to run on this virtual machine? So, remember that your application—your main application—wants to ensure that the AzureBatch service will process the videos. So the application, or the module, that is required to process the video needs to be installed on each virtual machine so that particular module can be downloaded from the Azure Storage account. So the Azure Batch service will take that module, which is required to process the videos from the Azure Storage account, and then install it on the virtual machine. The virtual machine in that pool would then start converting or processing those videos. Now, the video itself is basically an input. So what your app can do is collect videos from users. It can store the videos as inputfiles in the Azure Storage account. Your Azure Batch service will then take the videos and input videos and give them to the virtual machines. The virtual machines will then begin processing the videos and any output. So remember that your batch service is executing something on these virtual machines. Whatever the output is can then be stored in the same place as your storage account. So these are all the important parts that we need to understand when it comes to the architecture of the Azure Batch service. So, first you have the service itself. It's basically something known as an account. So you create something known as an Azure Batch account. In your Azure Batch account, you basically have jobs. The job consists of tasks. Then there's the pool. So the pool is basically the virtual machines that are used to execute those tasks that are pertinent to the jobs. You then have your Azure Storage account, which can be used to basically store the applications that run on the virtual machines. It can also be used to store your input files and your output files as well. Let's be right, so this is just a quick take on the architecture of the Azure Bat service.
13. AZ-204 - Batch Service Architecture
Hi and welcome back. Now let's go through some of the important points for the Azure Bath service. So, use a service when you want to run large-scale power and high-performance computing jobs. Now, in the Bat service, remember that it will automatically manage the pool of nodes. So these are the virtual machines that will actually carry out those batch jobs. The batch service itself will also automatically install the required applications on the virtual machines. So whatever is required to actually process your jobs can be automatically installed by the Azure Bath service. It will also automatically schedule the job to run on the virtual machines. Now, some of the examples are given in the Microsoft documentation on the types of workloads you can run using the Bat service provider. So if you want to perform any 3D image rendering, then consider this as your bath service. If you want to calculate or do financial risk modelling using the Monte Carlo simulations, then consider this as your BA service if you want to carry out any image analysis or if you want to do any media transcoding. So all of these are reallyhigh compute resource intensive operations. So if you have any of these requirements, then consider using the Azure BAT service. You can use the virtual machine. The high-compute virtual machines to run inpanel have jobs using the Azure Bath service. Now let's quickly have a review of the basic service workflow in the Azure Bath service. Now the data files and the application files will reside in the Azure Storage account. So the application that needs to be installed on the virtual machines that will actually do the underlying processing will actually be stored in the Azure Storage account. And those files, which are basically input files for your Azure backup service, are basically what you need to process. So for example, if you want to process video files, these video files also need to reside in an Azure Storage account. The Bat service will automatically create a poolof compute nodes within create a job. In the BAT service, the job is nothing but a collection of tasks. The tasks of the job will run in a specific pool. Each task that is executed will also upload its output to the Azure Storage account. And we're going to see all of this in subsequent demos. Now, in your pool of notes, you can decide to either have dedicated compute nodes or low-priority compute nodes. So what's the core difference? Now that low-priority nodes are less expensive, they take advantage of the surplus capacity that is available in Azure. But what's the caveat? So, if there is insufficient capacity in Azure, then the low-priced nodes that are assigned to your batch job can be taken back. So if you decide to use the low-priority nodes as part of your batch service, then you have to keep this into account. So eight are left, and the capacity decreases to zero. Then these low-priority nodes can be taken back from you. Now, if this is done, the task that is running will be stopped and will only run again once a node is back online. So only consider low-party nodes when you have jobs that can be distributed across multiple nodes. So let's say that you have about five to ten nodes, and the jobs are being distributed across these nodes. So when there is less capacity in a year, maybe not all of the notes will be taken back from you, just a partial set of the nodes. So in such a case, use low parity nodes when your jobs can run on multiple virtual machines. Also, if the jobs can resume easily and a lot of work is not lost due to a cancelled task, then consider using low priority notes in case If you want to ensure that jobs are never terminated, then consider the use of dedicated compute nodes. Now, you can work with the Azure Bath service either via the portal, via the SDK, via API calls, or via the Azure command line interface. There is also a tool known as the Azure Batch Explorer that can be used to work with the Azure Batch service. Right, so this marks the end of this chapter in which we have looked at some of the important points of the Azure Batch service.
14. AZ-204 - Azure Batch Service - Important Points
Hi and welcome back. Now, before we go on to the Azure Portal and see how we're going to work with the Azure BatchService, let's have a quick understanding of what exactly we're going to do in our lab. Well, the first thing we're going to do is create the Azure Batch account. Along with that, we're also going to create an Azure Storage account. Now, in Alia Azure Storage account, we're going to store a video file known as Sample MP4. We're going to be using a tool. We're going to be downloading a tool known as FFMPG. So this is a freely downloadable tool. This is a tool that can be used to basically keep records. Or you could convert videos from one format to another, or you could even extract the audio from the video file. This is a multipurpose tool that's available on the Internet. We're going to associate this with an application with the Azure Batch account. And we're also going to associate the AzureBatch account with our Azure Storage account. In the Azure Batch account, we're going to create a pool of just one virtual machine that's going to be a dedicated virtual machine. In that batch account, we're going to create something known as a job and a task. This job and task will now take this file, our application, and do the following. So this is going to be our application. It's going to download and install the application. But in this case, it's just an executable. It will just download and place the executable on this virtual machine, and then it's going to execute a command as part of this task that's actually going to pick up this video file from your storage account. It's going to use Ffmpg.dot as an executable on this virtual machine, and it's going to extract the audio and create a new audio file. So this is going to be a simple example of how we're going to be using the Azure Batch Service. Remember, you can use the Azure Batch account to run multiple jobs, perform multiple tasks, take multiple video files in this example, and create multiple audio files. So depending upon what you want to process as part of the Azure Bat service, you can do so. But from an exam perspective, it's important to understand this entire workflow. So we're going to do this step-by-step and understand this. Why the execution of a simple example So let's move ahead with our lab.
15. AZ-204 - What are we going to do in our labs for Azure Batch
Hi and welcome back. So now we're going to go ahead and see how we can use the Azure BAT service from the Azure Portal. So now for this particular lab, we're going to be using a tool known as FFMPG. So this is an across-platform solution that can be used to record, convert, and stream audio and video. Now, just to give you an example, here we are at the command prompt. Now, in one of my folders, what I have is a sample.MP4 file. So this is just a sample video file. I've also gone ahead and downloaded the FFMPG executable. So on the site itself, you can go ahead and download the tool itself for the platform. So currently, since I'm on Windows, what I've done is that I've gone ahead and downloaded the zipfile, which is available for the Windows platform. I extracted the zip contents, and I have just taken the executable from that zip file. Now we can use this executable to actually extract the audio file from the sample MP4 file. So I would go ahead and execute this command, so it has an input. It would take the video file, and then it would go ahead and copy the extracted audio file. Now, once you execute this command, if I now look at my directory, I can now see that I have the extracted audio file. So what I've just done is to make sure that I understand the complete process that I want to execute using the Azure Batch service. So here we are in Azure. Now let's go ahead and first create a storage account. So remember, the storage account will be used to store the application, which is going to run on the underlying virtual machines in the Azure Bat service. It will also be used to store the input files and the output files from the Azure Batch service. So let's go ahead and do that. So we can go ahead and create a storage account. I'll choose the resource group. I'll give you a storage account name. I'll choose a region. I'll just keep the application locally run and in storage. I don't need high availability for the solution. since this is just a demo in advance. I'll keep everything as it is. I won't add any tags. I'll go on to review and create it. Let me go ahead and create this storage account. Now, once the storage account is in place, you can proceed with the resource. Now you can go on to the blobs. We can also go ahead and create a container known as input. So this can be used to store all the input files that are going to go into the bath service. You can also create another container known as output. Now, once this is done, let's go ahead and move on to blocks. Let's go on to the input container and let's upload our sample MP4 file. So remember, this is going to be our input file for the Azure Bath service. I'll click on Upload once a file is in place. Now let's go ahead and create it as your Batch account. So you can go ahead and choose the batch service. Click on Create, select a resource group, and give an account a name. I'll leave the location as "central US." You can select a storage account. Remember, we create a storage account. So I'm going to choose that. Go on to Next for advance. So now, in pool allocation mode, you have two choices. You have either a batch service or a user subscription. Now, if you choose the Batch service, then thosevirtual machines which are going to do the processingas part of the Azure Batch account will actuallybe managed by the account of the service itself. If you want to manage the virtual machines yourself, you can actually make it part of the user subscription. So I'm going to leave the default as the batch service. I won't add any tags. I'll go on to review and create, and then I'll go ahead and create the Batch account. Now, once your Batch account is in place, you can go ahead and add the resource. Now, the first thing we're going to do isthat we're going to go on to the applications. So now we'll go ahead and associate our video processing application, Ffmpeg, with the Azure Batch account. Now please know that you just have to go ahead and create a Zip file out of the executable. When the application is being used by the AzureBatch service, it only accepts ZIP-based files. So all you have to do is go ahead. So I already have an archive-based tool installed on my machine. You can just make sure it's in ZIP format. So let's go ahead and click on "Add." So over here, it's asking for an application ID. So let's enter the name. We can also enter the version number for our application. So the current version number of this application is actually 4.2. So I'll enter that. Now we have to go ahead and select our application package. So I'm going to select the Zip file that I have on my local machine. I'll click on "Submit." So it's uploading our zip package to our storage account right now. Now, once this is in place, you can now see your application. We can now proceed to Pools. And now we can add a pool for our virtual machines. So let's click on "Add. Let's give the pool an ID. So this is basically a name for the pool. Now, what is the underlying image type that you want for the underlying virtual machines? So I'm going to choose Windows only I'll choose the OS family as Windows Server 2016 and leave the OS version as it is. Now, if you scroll down, you can choose what should be the underlying size for the virtual machine. So I'll choose the recommended size for one laptop and 3.5 GB of memory. Now, here you can specify the number of dedicated nodes and the number of low-priority nodes. So remember that the low-priority nodes are the least expensive. But remember, if there is a shortage of resources on the SEO platform overall, then these nodes will be taken back from you. So, just for the purpose of this demo, I'm going to ensure that one dedicated node is part of my pool. If you want, you can also decide to auto-scale your entire scale settings. So if you go on to autoscale, you actually have to give a formula based on how you want to autoscale the number of virtual machines in the pool. For now, I'll just leave it as fixed. If you want, you can decide whether you want to have one task as a start task that will run each node when it is created as part of the pool. For now, I'll leave it disabled. As you can see, there are many other options that you can specify as part of the pool. I can also specify the application packages that need to be installed on the spool of virtual machines. So I can choose my FFMPEG application and the version of 4.2 and click on "Select." Now let me go ahead and click on OK. If I click on Refresh, you can now see that the demo pool has been created. You can see that now the allocation state is resizing. That means what it is doing is going ahead and creating one dedicated node. It's basically now spinning up a virtual machine to fill half of this pool. Our job, our V-processing job, will then run on this virtual machine in the spool. Please know that you can have a number of dedicated nodes, and if you have multiple jobs, they can run across these nodes. Just to make this lap simple for you to understand how this all works, we just have one node that has part of the pool and part of our patch account, right? So now we can see our allocation state is steady. That means we now have one virtual machine as part of our pool. Now the next thing is to go ahead and create a job. So the job has to run as part of our batch account. So let's go ahead and click on "Add." Now we can give the job a name or an ID number. We can select the pool. So this is the pool on which the job will run. So I'll select this pool and let's go ahead and create a job, right? So now the job is in place. Let's click on the job. Now we can add tasks to this job. So, what exactly do we want to run? Well, we want to run a task that's going to convert our sample MP file to a file in our container. in our storage account. So let's go ahead and click on "Add Over Here." Let's add the task ID. Or let's just give a name to the task. Now we must enter the command line. So what exactly is our task going to be? So let me go ahead and add the commandline. So let's go ahead and look at the command line. So how do we reference our package in the batch account? So that's why the command "easy underscore package" and then "underline what is the package ID" are used. So, if we gave an application versionID of Ffmpg and then hashand, what is the version number? So this is how we can use the command line to refer to the application. and then obviously this is just a reference to the application version. And, of course, we must mention our executive. And the rest of the command is the same. So it's taking the input of the sample MP4 file, and we're saying to copy the output as audio AAC, right? So this is our command line, which is going to run as part of the task, as part of the job, on the pool of one virtual machine. So how does the Azure Batch account actually get a sample MP4 file? So remember, that's in our storage account. So we have to mention it as part of the resource file. So these are the two important things that are important to understand from the Azure Bathservice when it comes to the exam. So we are going to choose the resource files. Now that we're here, we can go ahead and pick our storage container. Now, when the Azure Bath service makes a reference to the storage container, you have to make sure to use the shared access signature. This is a good practice. Now, in a subsequent chapter in another exam objective as part of this course, we have details on what the shared access signature is and what it essentially is: storage accounts. So if you don't have any knowledge about storage accounts and shared access signatures, you can always go on to those videos in the subsequent chapters. For now, what I'm going to do is that I'm going to click on Include SAS, the shared access signature, which expires in seven days, and let's click on okay. Now we'll go ahead and choose the container, which basically has a sample MPO file, and that's our input container. Now we can go ahead and click on Submit, right? So now our task is complete. We can go ahead and click on "Submit" for the task itself. Now, if you go ahead, you can click on Refresh to actually see what the state of the task is. So the task will automatically start running. Now, after about five to 10 seconds, you can see that the state of the task is completed. You can go on to the task itself. Now here, you can see the files that are on that virtual machine. So remember, the virtual machine has now completed a task. It has gone ahead and downloaded that sample MP4 file. It's done the processing, and also it has createda standard error and a standard output TXT file. Now, if you go on to the files on node, you can now see your audio AAC file. You can actually go ahead and download this file itself. So that means our task has desired. So remember, over here, we have just made our Azure Batch Service run a single job with a single task to basically convert a video file. You can actually expand this to create multiple jobs with multiple tasks and multiple input files. But for the purpose of the exam, it's very important to understand this workflow. How does the Azure BAT service actually work? And that's why we just gave a simple example of how to convert a single video file, right? So this marks the end of this chapter, in which we have seen how to use the Azure Batch account from the Azure Portal.
16. AZ-204 - Lab - Azure Batch Service - Azure Portal
Hi and welcome back. Now we are going to understand how to basically work with the batch service using a simple program. Now, we've already seen how to work with the bad service from the Azure Portal. Now we're going to see how we can work with it from a simple console-based dot-net application. Now, if I go onto Tools, I'm in Visual Studio. If I go on to the new Get package manager, let me manage the new Get packages for the solution, and let me just show you what I've installed. So when looking at the install packages, if I go to Microsoft Azure Patch, what I would point out is the version number. So over here I have version 9.1. Now, the current version of the Azero Batch package is basically 12.0. Now there are key differences in the package for Microsoft Azure Batch after version 100. Now, as part of the Microsoft documentation and the exam, I want to go through both of the changes or both of the versions of Microsoft Azure Batch. So in this lab, we're going to reference the version number that's prior to 10.0. And then I have another lab in which we will look at the recent version of Microsoft Azio batch.And then apart from that, I also have Microsoft Azure storage. So this is the version number that I have. So these are the two NuGet packages that are part of my project. The other packages were automatically installed when I installed the prior packages. Now let's go over to our program. Now, I just have one simple class, a programme CS class. So this is basically a console-based application. So let's go through the entirety of this code. So the first thing I have are basically constants, which have details of first our batch account name, our batch account key, and our batch account URL. Now you can get all of these details from the SEO portal. So if you go on to your batch account, if you go on to the keys over here, you can get your batch account name and your batch account URL, and you can use any one of the access keys. So I've gone ahead and added those to my program. Now, next we'll go ahead andadd our storage account details. Again, we have to add the storage account name and the account key. Again, you can get this from the Azure Portal. So if you go on to Azure, if you go on to your storage account, Now if you go on to access keys here, you have your storage account name, and you can take either key one or key two. In this example, I've gone ahead and copied key one. So you can just go ahead and click on Copy, and then go back to your programme and add it over here. Next are some other general values required for the batch service. So I'm just giving a pool ID a name for the job. What is the package ID? So our application ID and our application version Now, this particular programme is actually going to create a pool of virtual machines, create a job, and create a task. The Azure Batch account is going to already exist, and we are only going to ensure that the application has been uploaded onto our Azure Batch account. So these are the only prerequisites that we're going to do, or we will ensure it's done via the Azure Portal. The other aspects are going to be covered by this programme itself. Now, in the main function, I'm calling another method itself. Next, I'm going ahead and using the Batch plan to start working with our Azure Batch account. In order to authenticate my programme with the AzureBatch account, I'm using all of the account details to basically create batch shared key credentials. So I'm using that along with the Batch client to go ahead and now work with an Azure Batch account. So I have three other methods. So we're going to go ahead and create a pool of virtual machines, create a job, and then create a task. So, let's take a look at what's available in each of these methods. So if I go on to the pool creation method, I'm basically passing in the batch client and a pool ID. So what's the name of our pool? So the first thing I'm doing is basically making a reference to the underlying image I want to use for the virtual machine. So I'm going to be using Windows Server and the Skew of 2016 data center. I'm going to go ahead and make sure that I'm using an AMD 64 bit.If I scroll down, I am then going to initialise a demo pool that's of the type "cloud pool." I'm going to ensure now that I'm using the Batch client pool operations and the Create pool method to go ahead and create the pool. So over here, I'm making sure that I have one dedicated node, no priority nodes, and I'm giving a size for the virtual machine. I'm also making sure, if I scroll a little bit down, that the pool is going to reference our application. So remember, our application is only going to be part of the Azure Match account. And I'm just going to go ahead and do a commit sync. And this is going to ensure that it creates a pool of virtual machines. So this is the method of creating the virtual machine pool in the Azure Batch account. Let's go ahead and see how to create a job. So if I go down, let's go on to the job creation method. It's pretty simple. So over here, I'm using the cloud job type. I'm creating a job with the BatchClient joboperations. Now, from an exam perspective, it is important to understand these methods and these types, not only for the AzureBatch service but for other services as well. Now for the job, I'm making sure that I associate with the pool, and then finally I'm doing a commit sync to go ahead and create the job. So again, this is pretty simple. Now we come to the method of task creation. So over here I have my task ID, the name of the task, and what's my container? So remember the input and the blob name. So what exactly is the file I want to convert as part of the task? Now over here, I have basically the connection string. So first I'm going to go ahead and basically connect to my Azure Store account. I'm going to go ahead and create a cloud block client. So this is going to ensure that I can actually connect to the container and get a reference to the blob. Now I also have the resource files. So keep in mind that the resource file is essentially a pointer from the Azure Batch account to the storage account. It's based on these resource files that Azure Batch knows where to pick up those input files. Now in version 90, remember that we're using the package of version 90 for Azure Batch. This is how you can actually reference the resource files. When you go on to version ten and above, there is a key difference in how you basically reference the resource file. So currently over here, by using it, there is a list of resource files if I go a little bit down. So now I'm getting the container reference, then I'm getting the reference to the blob itself, to the sample MP file. Remember that in order for the Azure Blob service to make use of Azure Storage accounts like we saw in the Azure Portal, it was very easy to go and do a check and make sure that Azure Batch uses a shared access signature to reference the blob. in our storage account. Over here in the code, I am first going ahead and creating a constraint, and then after that I'm going ahead and creating a SAS token and then a SAS Blob URL. Remember that we have another chapter in which we will go ahead and understand what the concept of a shared access signature is. In case you're not aware, you can go on to the chapter, understand the shared access signature, and then come back to this code. Now, once we have the SAS URL for the blob, we can go ahead and add it to our resource files list. So if you have multiple video files that need to be processed, you can get the URL for each band and then add it to the list of resource files. We then have our application. So the format is still the same. Simple underscore batch, underscore app, underscore package, underscore the applicationID, and hash the application version are all available. Then we're going to build our command line. So this is the same thing we saw in the Azure portal. And then finally, we create a new cloud task with our command line and the ID, mention the resource files, and then finally, we add the task to the job. That's it. Now let's go ahead, execute each of these methods, and see how it works. So now that we're here, we are going to go ahead and run the program. So just to recap, as part of our batch account, we're going to use the same account that we created in the early chapter of the earlier lap. We still have our application, Ffmpg, but if you go on to the pool, you don't have a pool as of yet. And if you go on to the jobs, we don't have a job. So I've gone ahead and deleted the existing pool and the jobs. We'll basically make this out of our Net program. So in Net, please ensure that you've changed all the relevant storage account names, the storage account key, the batch account name, the batch account key, and the batch account URL. Now, what we're going to do is go ahead and execute each method one by one, just to see how it works. So first, there is basically the creation of the pool. So let me go ahead and run this path, right? So it's creating a pool of virtual machines. Now it's saying the programme is complete if you go on to our batch account. Let's go on to the pools. So now you can see that our demopool is in place. So now it's going ahead and creating thatvirtual machine which is part of the pool. Now let's go ahead and run the other parts of our program. So I'll just commit to it and go ahead and start looking for work. So I'll go ahead and run the program. So the programme is complete. If you go to Jobs, you can also see our job is in place. Let's now go ahead and run the programme with our newly created task creation.So it's gone ahead and created the task. Let's go back to onto zero. If you go on to our job, we can now see a task in the active state. And after some time, you can seethat the task is now run. So similar to what we saw in the lab in the Azure Portal, we also were able to ensure that a netprogram was able to run a task within the job based on a pool in the Azure Batch account. So this marks the end of this lab.
Pay a fraction of the cost to study with Exam-Labs AZ-204: Developing Solutions for Microsoft Azure certification video training course. Passing the certification exams have never been easier. With the complete self-paced exam prep solution including AZ-204: Developing Solutions for Microsoft Azure certification video training course, practice test questions and answers, exam practice test questions and study guide, you have nothing to worry about for your next certification exam.