Naming Convention
- Tags:
- systems,
- server,
- professional,
- practice,
- name,
- hostname,
- host,
- DNS,
- convention,
- best,
- administration
Well not "Best Practice" as such, just the way I do things and not really recommended from anywhere, just something I've been thinking about.
The relevant RFC is 1178, however I specifically disagree with some of the recommendations in there, such as...
While computers aren't quite analogous to people, their names are. Nobody expects to learn much about a person by their name. Just because a person is named "Don" doesn't mean he is the ruler of the world (despite what the "Choosing a Name for your Baby" books say). In reality, names are just arbitrary tags. You cannot tell what a person does for a living, what their hobbies are, and so on.
...due to sometimes less than glorious reasons, in any number of societies you certainly could and in some cases still can tell what someone did from their name. Two examples; the most common surname in the England, Australia and the USA is Smith, originally deriving from smið or smiþ, the Old English term meaning "one who works in metal". Secondly, if you told me your name was Mr./Mrs/Ms Bowes-Lyon or Rothschild I'm guessing I'd be able to take a wild stab at what you, your parents or at least what your grandparents did ;^). I realise those are perhaps looking a bit archaic but you can see the original intention of a human name was to convey information and perhaps more relevantly to provide a unique identifier, in at least a general context such as a village or community.
So you should be able to tell something about a server from it's name but the "theme" idea is quite sensible if not entirely accurate, I'd suggest that in most modern enterprises there are "communities" of servers, web facing, MIS, back-end processing and so on, the specifics dependent on your situation of course. So the name should convey information from a selection of defined themes. To put it plainly, the name should provide some level of general information as a starting point and contextual-anchor but should avoid transient or overly specific information. This is of course where it goes wrong, the definition of transient or overly specific information may well depend on your own criteria that I can't pre-empt. Do you have multiple testing environments? Do you have a mix of 32/64 bit, window/linux servers or are they all identical? Do you have multiple sites spread across a village, town, city, country, continent or planet or are they all hiding underneath your desk? Is geography even relevant?
The general logic behind my conclusions therefore, are as follows...
* Sub-domains should be employed to some extent at least, to provide some "grouping" and context and can still be completely divorced from the actual IP, VLAN or subnet arrangements.
* However, more than three sub-domains gets confusing and there must be some limit to the character length, in a squeeze hyphens can aid readability.
* We will presume that where applicable left is most specific, right is least.
* We will assume that the primary motivation for employing a naming scheme is that you wish to provide a human and machine readable method for identifying, managing or manipulating the servers at a company-wide asset level.
* Pre-existing standards are good.
* In my experience 3 or 4 letter acronyms work well in the English language because if chosen appropriately they can form a pronounceable mnemonic or syllable. Much like trying to remember a random string of letters for a password verses remembering something that is at least formed out of 3 or 4 common place syllables.
For this example the domain name shall be philipmather.me.uk, however please don't try to infer anything about the internal structure of my home network, I simply don't have that many machines ;^)
What could I encode?
Lets start with a comprehensive list of almost all the possible characteristics you could want to encode...
* General Location (location on planet, country and/or city)
* Specific Location (location in facility, rack and/or U)
* Owner, maintainer or technical contact
* Manufacturer
* Hardware Type
* Hardware architecture
* Primary application, purpose and/or function (web, dns, caching, processing etc...)
* Operating System.
* Application Disposition (active, cold standby, warm standby, hot standby, mirror, member of a HA pair).
* Environment Disposition (Production, development, testing, regression, live, ad-hoc).
* Locally existing distinctive name or term.
* Business distinctive name or term (project or department affiliation).
General Location
Obviously the ISO country and region codes = {ISO 3166-1 Alpha-2 country code}-{ISO 3166-2 Regional subdivision code alphanum 1-3 chars}
Unfortunately to get full coverage without making stuff up the region codes have to be the variable length version, not everyone has a fixed three letter one. Also, in the cases where a Country is too small to have subdivisions (Gibraltar, Guernsey, Vatican?) the three letter country code shall be repeated. Hence examples would be...
GB-LND
GB-LIV
GB-KEC
GB-BDG
GB-BIR
GB-NGM
GB-SRY
GI-GIB
IT-RM
and gives at most 7 characters. See the following links...
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
http://en.wikipedia.org/wiki/ISO_3166-2
http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes
Specific Location
Rather depends on company, location and facility, my recommendations would be...
* Facility, almost certainly dependent on company and facility. Provisionally three letters and one number.
* Floor, by number, starting at zero to replace ground, prefixed by "F".
* Data hall, prefixed by "H".
* Isle, by number, prefixed with "I".
* Rack, by number, prefixed with "R".
* U, by number, prefixed with "U".
* Perhaps phase by number, prefixed with "P".
...hence, for instance TeleCity's DCs (http://www.telecitygroup.com/european-data-centres.htm) could be...
* Meridian Gate, floor 4 = TMG-F4I4R3U21
* Williams and Kilburn, Colo 1 = TWKF1I3R21U30
* Lyoner Strasse, data hall 3 = TLS-H3I3R1U4
...or if you're in an office based situations the format could be more colloquial EBH-F0IAR3U7.
Purpose
I've used this previously to define both purpose and owner, I tend towards slightly more specific terms avoiding anything quite as generic as "web" or "dba" my suggestions would be again three letters...
* SWI - standard switch.
* COS - switch, core.
* DIS - switch, distribution.
* WEB - very generic web server, too generic for my liking.
* DAB - database, again a bit too generic.
* NET - Networking device of some flavor, again a little to generic for me.
* ROT - Router.
* LOB - Load balancer.
* DIR - Director (similar to load balancer).
* ALB - Application load balancer.
* DNS - Domain Name Server
* POX - Proxy of some sort.
* SEC - Security device of some sort.
* FIL - Firewall.
* EFI - External Firewall.
* IFI - Firewall internal.
* MAN - Management server.
* NTP - Time server.
* MAL - Mail.
* PHP - PHP node.
* JAV - Java node.
* PYN - Python node.
* LIG - Lighttpd server.
* NGX - NGINX.
* APA - Apache.
* CAC - Cache server of some sort.
* MEM - Memcache server
* ORA - Oracle database of some sort
* RAC - Oracle RAC node.
* RES - RedHat Satellite
* SPW - Spacewalk Server (open source version of RHS)
* SWP - Spacewalk Proxy
Arbitrary Name
A somewhat more arbitrary moniker than "purpose", what you call them in day to day discussion
OS Type
OSes
* DOS - DOS (general)
* DDS - DR-DOS
* IDS - IBM DOS
* AIX - IBM AIX
* BSD - BSD
* NSD - NetBSD
* FSD - Free BSD
* LIN - Linux (general)
* CEN - CentOS
* DEB - Debian
* FED - Fedora
* RET - RedHat (general)
* SLK - Slackware
* ZEN - Zenwalk
* UBU - Ubuntu
* ULT - Ubuntu Long Terms Support
* LIS - Linux From Scratch
* ORX - Oracle Unbreakable Linux
* MAA - Madriva
* LMT - Linux Mint
* WIN - Windows (general)
* WNT - Windows NT (general)
* W31 - Windows NT 3.1 (OS/2 3.0 - Windows 3.1)
* W35 - Windows NT 3.5 (Windows 3.5)
* W36 - Windows NT 3.51 (Windows 3.51)
* W40 - Windows NT 4.0 (Windows 4)
* W2K - Windows 2000 (Windows NT 5.0 - Windows 5)
* WXP - Windows XP (Windows NT 5.1 - Windows 5.1) (codename: Whistler)
* W23 - Windows Server 2003 (Windows NT 5.2 - Windows 5.2) (codename: Whistler Server)
* WVI - Windows Vista (Windows NT 6.0 - Windows 6) (codename: Longhorn)
* WS8 - Windows Server 2008 (Windows NT 6.0 - Windows 6) (codename: Longhorn Server)
* WI7 - Windows 7 (Windows 6.1 - previously codenamed Blackcomb, then Vienna)
* WPE - Windows Preinstallation Environment (WinPE)
* SOL - Solaris
* OSO - Open Solaris
* OS2 - OS2
* HPX - HP-UX
* NOV - Novel (general)
* NEE - NetWare
* OES - Open Enterprise Server, the successor to NetWare.
* SUE - SUSE operating system (formerly SuSe and s.u.s.e)
* OSU - OpenSUSE
* SCO - SCO (general)
* SC5 - SCO OpenServer 5
* SC6 - SCO OpenServer 6, SVR5 (UnixWare 7)
Hypervisors
* ESX - VMWare Server
* ESI - Bare Metal VMWare
* KVM - Bare metal
* ZVM - IBM bare metal
* PVM - IBM Power Hyper visor
* HYV- Hyper V
* QEM - QEMU
* OVM - Oracle
Others
* Cisco
* Juniper
* Cross beam
* F5
* blue coat
* IBM
* BMS - Building Management System?
* IOS - Cisco ISO
* CAT - Cisco CAT
* JUN - Juniper
* BRO - Brocade device
* BIP - Big IP Appliance
* BLU - Other Blue Coat Appliance
* DCX - Brocade DCX
* LTM - F5
* GTM - F5
* BSG - Blue Coat ProxySG
* BPS - Blue Coat Packet Shaper
* BAV - Blue Coat AV
* BCD - Blue Coat Director
Hardware Type
Preferably the ticker symbol of the manufacturer where they are floated and use 3 letters or contracted to 3 when they are 4...
* MSI - Microstar International
* SGI - Guess
* IBM - Guess
* HPQ - HP
* CPQ - Compaqs
* DEL - Dell
* SUN - Sun, no not JAVA or JAV fer-christ-sake
* FFI - F5
* CSC - Cisco
* JNP - Juniper
* BCS - Blue coat systems
{OS/Manufactuer TLA}-{Device Catagory TLA}.{Server/service name}[Server Index}
gbr-lon1.win-dba.spo125
gbr-lon1.aix-vmw.12
gue-gue2.lin-app.sta191
