In addition to using your own templates you can choose from templates already provided by the community. You will learn how to deploy an Azure Quickstart Template into your Azure deployment.
- [Instructor] Up until now, we've been using the template that we created from one of our deployments but there are hundreds of templates already prebuilt for you. One of the easiest ways to locate these is in your favorite search, type in azure quickstart templates. And you'll notice that we have a couple of options when we do that, we have Azure quickstart templates GitHub, and we have templates via microsoft.com. Let's go ahead and take a quick look at the Azure quickstart templates at GitHub first and you'll notice that we have hundreds here that are available to us and these aren't just for VMs.
We have vault, we have a template here for creating a point to site connection, we talked about that in our virtual network course. Creating security groups, and we can search on these if we wish as well. I'm going to go back and I'm going to use the Azure quickstart templates that are available via Microsoft. So I'm going to go ahead and click our third link. Now, most of these templates are the same templates that you will see on GitHub, I just find this more neatly organized, I'm going to go ahead and do a search for virtual machine, just to go ahead and pull a template.
We're going to go ahead and pull the two VMs in a VNET with an internal load balancer and load balancing rules. Now I can browse this on GitHub and take a look at all the code if I wish to do so or, in our example, I'm going to go ahead and deploy it right to Azure. You can also view these on GitHub. Pull down all the code and then modify it to best meet your needs. So you don't have to create these really long, tedious, templates. This will look very familiar to when we redeployed the template we created.
They've cleaned theirs up, it looks a little nicer than what mine did. I'm just going to call this LB for load balance. We're going to provide the virtual network name, the network interface name, the load balancer name, again, in a production environment you'd use more descriptive names than what I'm using here in our demo. Provide a username and password. Here we already have some prepopulated values, we could edit these as required. We're going to provide the VM name and a storage account name.
This will have to be unique, yep, I'm okay there. And then we can choose our VM size. This template has already been populated with a Standard_D1, I'm going to go ahead and use that. As before, we have terms and conditions that we must agree to and, again, the button specifies purchase because we are purchasing these services be aware about when you're using templates. It's going to validate and we do have an error. My error here happens to be with my storage account name.
So even though it checked green, it didn't like it. Hopefully that does the trick. There we go. And that was my error, it wasn't an error in the template itself. I'm going to go ahead and open up that resource group. I called that resource group LB. We also have a LoadBalancing resource group which we created manually for a previous Azure course. It would've been so much easier to go ahead and have a template and then just revision it all in a couple of quick clicks and you can see here that that resource group is now being populated with all the required resources for that deployment.
I don't want you to be intimidated by templates because of all the code that is required. As you can see, there are hundreds of prepopulated templates all ready for you to go, you can use them as is or edit them to best meet your needs.
- Implementing Azure Resource Manager templates
- Creating a template from a deployment
- Deploying a template using the portal
- Deploying a template using PowerShell
- Using Azure Quickstart Templates
- Using service principals
- Locking Azure resources
- Securing Azure subscriptions
- Azure active directory roles
- Designing custom RBAC roles