In this video, learn about the benefits and use case of application packages and Azure Scheduler. The demonstration includes implementing and configuring both services.
- [Speaker] Now that we've had an overview of the batch service, let's take a look at Application Packages and running a batch job on a schedule. Let's start off with the Application Packages. You can deploy an application package to the compute nodes in the Azure batch pool. These packages will contain the application and files required for that compute process. And when I say applications, I'm referring to a set of binaries that includes versions.
And keep in mind that application packages must be a zip file and have an associated storage account. There are two types of application packages that we can deploy. First there's the Pool application package and this'll be deployed to every node within that pool. And when a new node joins the pool, is rebooted or reimaged, that application package is then redeployed. There's also a Task application package and this is deployed to only the node on which the task will run.
The workflow for application packages is as follows. In our example here, we have Application 1.X and Application 2.X within the associated storage accounts. Each of these applications then have application packages. Please note they are versioned and these application packages would be zip files. You would then deploy the appropriate package to the pool or the specific node within the pool. Now let's move on to the Azure Schedule which is used to schedule batch jobs to run.
If this sounds familiar, you are correct. This is the same service we've explored in previous courses. The Azure Scheduler will create, maintain and invoke tasks in Azure, on-premise, or even with another provider. We can set a reoccurring schedule or schedule a job to run at a future date. The two most common used cases for the Azure Scheduler include routine maintenance such as cleaning up files or when we need to run reoccurring application actions such as processing images.
You can configure the Azure Scheduler using either the Azure portal, through code, a REST API, or Azure PowerShell, whichever one works best for you. And with that, let's pop into a demo and show you both of these services in action. As you can see, I'm in our LinkedIn Learning batch demo account that we created in the previous lesson. I'm going to scroll to features and click on applications. You'll notice that I do not have any applications as of yet.
I'm going to go ahead and add an application for this batch account. I'm going to click on Add, I need to provide an Application ID. Next you'll need to provide a Version number. I'm going to use 1.2 in this one and now I can go ahead and select my application package. Now this will be on my Local machine, and this has to be a zip file. I'm going to go ahead and click Open. Now I'm going to be perfectly honest with you, this is an empty zip file, I'm just using this for demonstration purposes.
I'm going to go ahead and click OK. That application package is now going to be uploaded to our associated storage account. And that's all there is for uploading our applications. Next let's go ahead and look at our job schedules. I don't have any job schedules associated with this batch account. To add one, I'm going to go ahead and click Add. I'm going to add in an ID and a display name if you wish. Next we can go ahead and configure our schedule.
Our first option is when do we want to start our schedule. We can go ahead and select a day, I'm going to go ahead and say September 25th, and I'll have it run until the 29th. Next we have the Start window. By default, this schedule will run all the time. If you want it to restrict when that job was to be created within that start time, you would go ahead and click on the Start window and enter in the number of units.
Let's say every one day. If that batch does not run within that time frame, then it will not run at all until the next recurrent interval. And let's say we're going to do this everyday. I am going to click Unlimited, that way it will run, I don't have to worry about it being lost. Go ahead, click OK. We can go ahead and enter in a display name if we wanted to do so. Now we go ahead and select the pool that we want this to run on.
We're going to use the pool that I created in the previous lesson. And I just used a Pool ID of one. If had any job manager tasks, I would go ahead and configure them now. And for the most part, that's all we're going to cover here. And then go ahead and click on OK. That's it, our job schedule has now been successfully created. And we could modify it as required. We can go ahead and change the job manager task or the job preparation task as well.
And then go ahead, close that blade. To quickly recap, applications are binaries that we apply to our node or nodes in our pool for processing and we can use the Azure job scheduler to create, maintain, and invoke tasks within that batch account.
- Creating compute-intensive applications
- Creating long-running applications
- Implementing messaging systems
- Azure Service Bus relays
- Using Azure Storage queues
- Creating an Azure Event Hub
- Creating Azure WebJobs
- Managing cloud environments with Azure Active Directory Domain Services