Saturday, September 3, 2011

Equipment naming convention

Why it is so important?
Having a clear and meaningful equipment naming convention will help you to:
  • minimize human errors of executing right commands on wrong servers
  • spend less time analyzing monitoring alerts and log messages
  • have less problems while automating system management tasks
  • have more understandable engineering and operational description of your network
  • make your network more manageable and scaleable

There are several approaches for naming network/server hosts:
  1. Use personal names like planet names, movie heroes, flower names, etc. Example are "SATURN", "MARS", "MOON", "RAMBO". The method is quite simple, and does not require to change the host name when it changes its function. From my experience, the method is only suitable for really small deployments (like a few servers or a home lab), and does not scale.
  2. To code inside a host name as much as possible information about the host: hardware type, host function, OS version, rack location, site location, etc. A host name may look like "SunSol9OracleDBRack6Floor1NY" - an Oracle database server running Solaris 9 on Sun hardware located in rack 6 on floor 6 on NY site. The method is great for automation tools, but quite complicated for human operators.
  3. To use function-related names (like in method 2), but specify only minimally required information like device function and location. The method is described in details below in the post.

General rule
I would recommend to compose an equipment name from four components:
  • equipment function name
  • equipment number
  • site name
  • site number (optional)
The four components can be composed together like the following:

[FUNCTION_NAME][EQUIPMENT_NUMBER]-[SITE_NAME][SITE_NUMBER]

For example: INSTALL01-LSAG01

Equipment function name should clearly define what the equipment is doing - is this a database server, application server, Hadoop data node, VPN server, router, switch, managed PDU or serial console server? Examples of equipment names are "DB" for a database server, "VPN" for a VPN server, etc - see the server and network equipment names sections below for more examples of suggested equipment function names.

What to do if a machine performs several functions or runs several applications? Don't do it - it is not secure and not scaleable. PCI standard 2.0 even has requirement 2.2.1 that only one primary function will be implemented per server, and in the age of total server virtualization it is really easy to implement the requirement.

Equipment number should be a two or three digit number specifying the sequential number of the same type of equipment on the same physical site. In the most cases I would suggest using two digit numbers (with leading zero), and only for really large cluster deployments (like a 200 nodes Hadoop cluster) use three digit numbers (also with leading zeros).

Site name should clearly define a geographic location of the site. There are two main approaches for defining a site name:
  • to use IATA three-letter code of the closest large airport. For example, a site located in San Francisco, CA can be named SFO, a site located in Chicago, IL - ORD, and a site in Tel-Aviv, Israel - TLV. Sometimes airport code names (like JFK or LGA) do not provide any clue about the geographic location of the airports, so if you are not an American (who are more or less familiar with the names of local airports) and don't travel a lot, you may need some learning period to map all used locations to airport code names
  • to use a short coded name of the city the site is located in. For example, a site in San Jose, CA can be named "SANJ" (a short code name from "SAN Jose", a site in Los Angeles, CA - "LSAG", a site in Singapore - "SING", a site in Tokyo - "TOKY". Please see section "Sites name" below in the post for more examples of short code names of some popular cities
Optional site number should be one or two digit number specifying the sequential number of the site at the same geographic area. One-digit number will be suitable for the most of small and medium deployments, and two-digit site number will be required for really large deployments (when you can have, for example, 12 small data centers in a large metro area like NYC).

Server equipment function names
The following are some examples of server function names:
  • "DB" - database server
  • "INSTALL" - installation server with local OS repository and PXE boot service
  • "MONITOR" - monitoring server
  • "DNS" - DNS server
  • "PROXY" - proxy server
  • "HADOOPDN" - Hadoop datanode (DN) server
  • "HADOOPNN" - Hadoop namenode (NN) server
  • "SOLR" - server running Solr software
  • "CNR" - server running Cisco Network Register software
  • "ABCD" - server running application "ABCD"

Network equipment function names
I would recommend to code inside the network equipment name two parameters:
  1. The equipment vendor (like Cisco, Brocade/Foundry, HP, Juniper, etc)
  2. The equipment function (like router, switch, load balancer, etc)
For equipment vendor code I would use one character; for example:
  • "H" - HP
  • "C" - Cisco
  • "B" - Brocade
  • "F" - Foundry (now Brocade)
  • "J" - Juniper 
For equipment function code I would recommend using two letters; for example:
  • "RT" - L3 router
  • "SW - L2 switch
  • "LB" - load balancer
Examples of network equipment names:
  • "HSW" - HP switch
  • "CRT" - Cisco router
  • "LRT" - Linux-based router (software router)
  • "FLB" - Foundry load balancer
  • "LLB" - Linux-based load balancer (for example, running LVS or HAProxy)
Normally there are also some management devices like serial console servers and managed PDUs used on remote sites. I would code the device names like the following:
  • "PDU" - PDU device
  • "CPS" - Console Port Server (serial console)
Since the management devices from different vendors are managed and accessed in different ways I would also recommend to prefix the management device names with a one character vendor code; for example:
  • "A" - APC (for PDU) or Avocent (for console servers)
  • "S"-  Schleifenbauer Products
  • "D" - Digi International
Some examples of management device names:
  • "APDU" - APC switched PDU
  • "ACPS" - Avocent console server
  • "DCPS" - Digi console server

Site names
The following are some examples of four-character sites names based on city names:
  • "MIAM" - Miami, FL
  • "CHIC" - Chicago, IL
  • "DALL" - Dallas, TX
  • "SANJ" - San Jose, CA
  • "NYNY" - New York, NY
  • "TORN" - Toronto, ON
  • "RIOJ" - Rio de Janeiro, Brasil
  • "PARS" - Paris, France
  • "AMST" - Amsterdam, Netherlands
  • "LOND" - London, UK
  • "SING" - Singapore
  • "TOKY" - Tokyo, Japan

Some examples of site names in accordance with IATA three-letter code of the closest large airport:
  • "LGA" - New York, NY
  • "IAD" - Ashburn, VA 
  • "MIA" - Miami, FL 
  • "ORD" - Chicago, IL
  • "DFW" - Dallas, TX 
  • "SFO" - San Jose, CA 
  • "LAX" - Los Angeles, CA
  • "LON" - London, UK 
  • "FRA" - Frankfurt, Germany 
  • "AMS" - Amsterdam, NL 
  • "PAR" - Paris, France 
  • "TLV" - Tel-Aviv, Israel
  • "HKG" - Hong Kong 
  • "SIN" - Singapore 
  • "SYD" - Sydney, Australia
  • "TYO" - Tokyo, Japan 
  • "SEL" - Seoul, Korea 

Examples of equipment names
  • "DB01-LOND01" - first database server on first London site
  • "PROXY03-AMST02" - third proxy server on second Amsterdam site
  • "LLB01-NYNY01" - first Linux load balancer on NYC site
  • "LRT01-SING01" - first Linux router on Singapore site
  • "CSW01-SANJ01" - first Cisco switch on San Jose, CA site
  • "HSW02-DALL02" - second HP switch on second Dallas, TX site
  • "APDU03-TOKY01" - third APC managed PDU on first Tokyo site
  • "DCPS01-LSAG03" - first Digi console server on third Los Angeles, CA site

Login prompt
It is important to configure your equipment to display the host name in CLI prompt - this is a quite important factor protecting you from executing a right command on wrong server. While you type a critical command on a server or router you should clearly see the name of the host you are going to reboot or format.

To distinguish the host name in the CLI prompt I highly recommend to specify the host name in uppercase characters (and the commands are normally specified in lowercase characters).

Cisco network equipment and RHEL/CentOS/Ubuntu servers are configured by default to show the host name in the login prompt. Other systems may require some configuration tweaking, but in the most cases it will be a quite simple procedure.

Coming soon:
- Assigning DNS names for network interface IP addresses
- Assigning a domain name to host names

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. The usage of third party storage system for the data storage can be avoided in cloud computing and we can store, access the data through internet.
    cloud computing training in chennai | cloud computing courses in chennai

    ReplyDelete
  3. The information about the naming convention was very much useful My sincere thanks for sharing this post please continue to share this post
    Hadoop Training in Chennai

    ReplyDelete