Hi,
3.1 - Naming Conventions
A good naming convention should be in place before creating any artifact in an azure account. A naming convention ensures that all the resources will have a predictable name, which helps lower
the administrative burden associated with management of those resources.
Each customer may choose to follow a specific set of naming conventions defined for the customer as a whole, for a particular Azure account, or for an Azure subscription.
It is easy for individuals to establish implicit rules when working with Azure resources. However, when a team needs to work on a project on Azure, that model does not scale well.
The important point is that the customers agree upon the set of naming conventions up front.
3.1.1 - General Considerations
There are some considerations regarding naming conventions that cut across the sets of rules that make up those conventions. The following sections describe these considerations.
3.1.1.1 - Affixes
When creating certain resources, Microsoft Azure will use some defaults to simplify management of the resources associated to these resources. For instance, when creating the first virtual machine
for a new cloud service, Azure will suggest using the virtual machines name as the name for the cloud service.
Although this will not present problems, it may be beneficial to identify types of resources that need an affix to identify that type. In addition, clearly specify whether the affix will be at
the beginning of the name (prefix) or at the end (suffix).
For instance, here are two possible names for a service hosting a calculation engine:
-
SvcCalculationEngine (prefix)
-
CalculationEngineSvc (suffix)
Affixes can refer to different aspects that describe the particular resources. The following table shows some examples typically used.
Aspect
|
Example
|
Notes
|
Environment
|
dev, stg, prod
|
Depending on the purpose and name of each environment.
|
Location
|
uw (US West), ue (US East)
|
Depending on the region of the datacenter or the region of the intended audience.
|
Instance
|
01, 02
|
For resources that may have more than one instance. For example, load balanced web servers in a cloud service.
|
Product
|
ce (for CalculationEngine)
|
Depending on the product for which the resource provides support.
|
Role
|
sql, ex, ora, sp, iis
|
Depending on the role of the associated VM.
|
Make sure that the naming conventions clearly state which affixes to use for each type of resource, and in which position (prefix vs suffix).
3.1.1.2 - Dates
Many times, it is important to determine from the name of an resource, the date of creation. We recommend specifying dates in the
YYYYMMDD format. This format ensures that not only the full date is recorded, but also that two resources whose names differ only on the date will be sorted alphabetically and chronologically at the same time.
3.1.2 - Naming Resources
Customers must define each type of resource in the naming convention, which should have rules that define how to assign names to each resource created. These rules should apply to all types of
resources, for instance:
-
Accounts
-
Subscriptions
-
Affinity Groups
-
Storage Accounts
-
Virtual Networks
-
Subnets
-
Availability Sets
-
Cloud Services
-
Virtual Machines
-
Endpoints
-
Roles
-
Etc.
3.1.2.1 Descriptive Names
Names should be as descriptive as possible, to ensure that the name can provide enough information to determine to which resource it refers.
3.1.3 - Computer Names
When administrators create a virtual machine from the gallery, Microsoft Azure will require them to provide a virtual machine name. Microsoft Azure will use the virtual machine name as the Azure
virtual machine resource name. Azure will use the same name as the computer name for the operating system installed in the virtual machine. However, these names may not always be the same. In cases in which a virtual machine is created from a .vhd file that
already contains an operating system, the virtual machine name in Microsoft Azure may differ from the virtual machines OS computer name. This situation may add a degree of difficulty to virtual machine management and we discourage it. Always ensure that the
Azure virtual machine resource name is the same name as the computer name as assigned to the operating system of that virtual machine.
We recommend that the Azure Virtual Machine name be the same as the underlying OS computer name. Because of this, follow the NetBios naming rules as described in this article:
http://support.microsoft.com/kb/188997.
3.1.4 Storage Account Names
Storage accounts have special rules governing their names. In general, they are lower case names, and the assigned name, concatenated to the service (blob, table, or queue) and the default domain
(core.windows.net) should render a valid, unique DNS name. For instance, if the storage account is called mystorageaccount, the following resulting URLs should be valid, unique DNS names<sup><sup>[1]</sup></sup><sup>[1]</sup>:
-
mystorageaccount.blob.core.windows.net
-
mystorageaccount.table.core.windows.net
-
mystorageaccount.queue.core.windows.net
In addition, storage accounts may take advantage of containers. These must adhere to the naming conventions as described
in Naming and Referencing Containers, Blobs, and Metadata.
Reference:
http://blogs.msdn.com/b/thecolorofazure/archive/2014/05/13/azure-implementation-guidelines.aspx
https://msdn.microsoft.com/en-us/library/azure/dd135715.aspx
Regards,
Nithin Rathnakar