[nycbug-talk] Random Server name generator

Pete Wright pete at nomadlogic.org
Thu Aug 2 13:27:39 EDT 2012


On Wed, Aug 01, 2012 at 03:58:07PM -0400, Mark Saad wrote:
> All
>   I wanted to share a bit of silly unix fun , here is how I pick new
> server hostnames.
> 
> /usr/games/random -f /usr/share/dict/web2 | head -n 1
> 
> An old topic but always a relevant one, how do you name your servers ,
> with logical names nybetaweb02 or
> memorable ones like "terraefilial"
> 
> 

for personal servers where i don't care about scalability i use
surfbreaks around my home in socal.  i guess the good bit about that is
it has caused me to keep less and less random servers laying around b/c
i'm running out of unique names ;P

for work i've used a couple of schemes.  my theory is that each host
should have an immutable FQDN that references the server hardware type
and revision.  then i will create a CNAME entry pointing to that server
to reflect what service it provides.  this way we can learn not only
what service a particulare network node provides, but by looking at its
FQDN we can learn what type of hardware we are running on.

so...the last time i did this i used the periodic table of elements b/c
i wanted to brush up on my chemistry, and it provided an external
logical structure that i could utilize as well.  so starting with the
second period on the table (Li, Be, Ne - only elements with two
character abbreviations were used) I assigned our lowest class hardware.
in this case Dell R200 series: 
r200 with low memory == lixxxx.POP.DOMAIN.COM
r200 with high memory == bexxxx.POP.DOMAIN.COM
and so on until my R900 class machines ended up using the Actinides
(which is sorta period 9 on the table).

I found it to work pretty good - there were def some issues since we
had a really heterogeneous hardware platform (we had like seriously 8
different hardware revs of the r400 class hardware iirc).  but i still
thought the idea was valid.  I reckon you could use any naming scheme
you want, one time I used bird names or even internal codes that mean
something to you company would work.  for me the big win is having that 
immutable FQDN, aside from making life easier when trying to figure out
"how much RAM does that vanish node which is acting up have again?" - it
should also make inventory management easier as well...

-pete

-- 
Pete Wright
pete at nomadlogic.org
twitter => @nomadlogicLA



More information about the talk mailing list