This is Part 5 of Azure Tutorial. In this video, we'll understand what are azure resources and
resource groups. First, let's understand, what are azure resources? Resources are instances of azure
services that you create like virtual machines, app services, storage accounts, SQL databases,
function apps, etc. All these are azure services. So, every time you create an instance of a
service, you are creating an azure resource. There are hundreds of azure services. You can
see the complete list of services by navigating to this URL. Obviously, you need to log into the
azure portal, otherwise it will redirect you to the login page. On the left, you see the service
categories like general, compute, networking, storage etc. For example, if you want to create
a storage account to store your data, click on the "Storage" category and then you obviously see
all the services related to storage. Now, let's say we are developing a web application and we
want to store all images and videos related to our web application in a storage account. So, let's
create a storage account. I simply hover the mouse over "storage accounts" and then click "Create"
Storage account is an azure service and we are creating an instance of that service right here.
So, what we are essentially doing is, creating an azure resource and anytime when we create an azure
resource the first thing that we obviously need to select is the "Subscription". At the moment,
I'm using my free trial subscription, so that's what is selected here and then we need to select
a "Resource Group". We don't have any resource groups yet. So, first let's create a resource
group. Before that, let's understand what is a resource group. As the name implies,
a resource group is a group of azure resources like virtual machines, app services, storage
accounts, sql databases etc. It's a logical container for grouping related azure resources.
Let's say, we are developing a web application. There are several ways to do this. To keep this
example simple, let's just assume we need the following three azure resources. First,
a virtual machine - we need this to host and run our web application and then a
storage account - to store images videos and any other resources that our web application needs,
and then finally a sql database - to store our application data. Now, let's say for this example
sake, we have the following environments. Most organizations, have these deployment
environments - Development, Testing, Staging, Pre-production, and Production. Let's say,
our web application name is PragimeTech.com. We might create the following four resource groups,
one for each environment. Now, if you notice the names of these resource groups, we have
a naming pattern here. The prefix "rg" stands for "Resource Group" and then we have a dash and then
our application name, in this case "pragimtech" and then another dash and followed by that,
our deployment environment name "development", "staging", "pre-production" or "production".
Now, in this example we are grouping the resources by "Deployment Environment", and it is just
one way of grouping. Obviously, you can group resources any way you want, anyway that makes
sense to your organization really - by department, by country, by application, by resource type or a
combination of these. In general, resources that share the same deployment life cycle are grouped,
so these resources can be easily provisioned that is created, deployed, updated and deleted
as a single unit. There are several benefits of grouping resources. First, let's create a
resource group. One way to do that is by clicking on this "Create New" link on this "Create storage
account" page or click on "All services" and then make sure you click on this "All" category here,
so we have all the services listed. Search for "resource group" using this search text box
and then we want to create the resource group. So, let's click this button. A resource group
is also a resource. So, as usual anytime when we create an azure resource, the first thing
that we need to select is the "Subscription". I'm using my "free trial" subscription and then
we need to provide a name for our resource group. I'm going to use the naming pattern that we have
just seen on the slide, "rg" for "resource group" dash, our application name - "pragimtech" dash,
the deployment environment name. So, let's create a resource group for "development" environment.
Next, we need to specify the azure region. Let's actually select "India". Notice, when I type
"India", we see all the azure regions in "India" geography. Let's select "South India". It is this
region where the metadata about this resource group will be stored, but then one important
point to keep in mind is, the resources themselves that we add to this resource group can be in any
azure region. They don't necessarily have to be in the same region as this resource group. Next,
we can add "tags" if we want, but then we'll discuss tags in a later video. For now, let's
review this resource group and create it. There we go, our resource group is created, and to see that
resource group, we can click on this resource groups icon here or click on "more services".
This obviously takes us to the all services page and here search for "resource groups"
and then click on "Resource Groups". There we go, we see our resource group and when I click
on the name, it takes us to the "Overview" page of our resource group. Now, in azure terms,
these tabs that we see on the left here are called blades. At the moment, we are on the "Overview"
blade. When I click on "Tags" we are on the "Tags" blade, and notice on the "Overview" blade you see
this message "No resources to display". So, in this resource group, at the moment we don't have
any resources. Let's add, an azure resource. Let's search for "storage account"
and then click "Create"
"Subscription" is "Free trial" and notice it has selected by default the resource
group that we have just created. If you want, you can create a new resource group,
and then, let's specify a unique name for our storage account. Since this is a storage account,
I'm going to prefix it with "st" for "storage" and then "pragimtechdata",
because we're going to use this storage account to store images, videos and any other resources
our web application needs. Next, we have location. Notice, it defaulted to "South India". Remember,
this is the region where we have our resource group created, but then, you're not limited to
"South India" azure region. You can select any region you want. We'll discuss the rest
of these options in a later video. For now, let's review and create this storage account.
There we go, our storage account is successfully created.
Now, let's navigate to our resource group, by clicking on the resource group name right here.
There we go, in our resource group, at the moment we have
just one resource - a storage account. In azure, resource groups are very important. They offer
several benefits. We'll discuss these benefits in detail, in our next video.