Hostnames
seriss.com
seriss.com
"Choosing a name for your computer" http://tools.ietf.org/html/rfc1178
Shades of colours, for example https://en.wikipedia.org/wiki/Category:Shades_of_blue, are a good, safe source of names.
https://en.wikipedia.org/wiki/Category:Shades_of_gray
For a network of 50 computers :)
There's something super memorable about Blastoise, Slowbro, Squirtle, Ninetales, Jigglypuff...
I also color my tabs the color of the Pokemon for fast reference.
This inspired a researcher to create a card game similar to Pokemon, but for our biosphere: http://phylogame.org/
ftp://ftp.rpi.edu/etc/hosts
(btw, the mail infra consisted only of carebears... I'm looking at YOU J.P.!)
At $work we maintain setups for customers, and our FQDNs are roughly <function><counter><environment>.<customer>.<ourdomain>.tld. So the second database server in the testing environment for customer "nasa" (hypothetical, of course) would be called db02t.nasa.<ourdomain>.<tld>.
It does make it pretty obvious from the FQDN what the used is being used for.
- Cloud: "Who cares? Name them after pokemon or dinosaurs, you can always reprovision and they won't last very long."
- Datacenter: "But what if the name doesn't make sense 16 months from now??"
Also notable is that of my ISP - they use words ending in “less”, for example: “priceless” is the accounting system, “thankless” the support ticket system and “clueless” the customer login.
Usually you see the theme based names in much smaller environments, though I've seen it up to hundreds of machines. One problem I have with this approach is that people begin to personify machines, excusing their behavior. "Oh that's just akira being akira." This is counter to actually understanding and diagnosing problems. You're also relying on potentially faulty/emotional memories rather than having an actual stored account of issues. Not to mention, once you have a sufficient number of machines you're going to need a decent service database to know what runs what anyways.
Function/Role based names are what I have the most historical experience with. CBS Interactive, CNET, YouTube, and Dropbox all went this route. This often seems like a great idea and can get you really far. Most configuration management allows you to define classes/nodes/etc based on regular expressions. Sudoers has built in support for hostname globbing. It's also easy to tell what a machine's role is when you get an alert. So why wouldn't you want to go this route?
This method has some pitfalls that become increasingly burdensome as you grow into a larger amount of machines. You might have many types of services that run on a single hardware class. This introduces overhead whenever you need to update a machines role. Imagine it's Saturday and your mobile-web pool is suddenly under provisioned. Well, we have plenty of capacity in our web pool. Just need to rename the host in the machine database, update DNS, update DHCP, etc. While this might not seem like a lot of effort it definitely adds up. When I worked on a fantasy sports product we were constantly renaming hosts as various seasons came around. Same thing with just keeping spare/provisioned hosts around. How do you know how to name the host so that someone can just grab it when they need it? You also eventually get the boxes that serve more roles than the box describes itself as. You'll end up with a box call misc or admin and no one remembers that one day someone set it up as your static origin.
Another fun problem is the inability to describe more in depth what a box does. mysql255 doesn't tell you if it's a master/slave, which data is on it, should it be backed up? I've actually seen places that encoded all of this in a hostname. This is the extreme but it does happen.
The interesting thing about both theme and function/role based names is that to use them effectively in a large environment you already need good tools for managing the roles because the hostname is not effective enough.
At Dropbox, they started with functional/role based names but we decided to move to positional hostnames. These encode the dc, rack, position, and chassis. One immediate benefit we saw with this was quickly identifying when a rack or quad goes down. It's very apparent in monitoring just at a glance. We also have a service database that maps hostnames to tags/roles and those tags appear along-side alerts so you can tell right away which service is affected. We get benefits in easy preprovisioning and reprovisioning. Our configuration has become more generic and easier to comprehend. We can run multiple roles easily on one machine and it's easily discoverable what machine serve what role. In puppet we use an External Node Classifier rather than regex. We only have to worry about base config when a rack is initially installed.
That's not to say this method is flawless. One of the biggest drawbacks to this approach is that machines become harder to talk about and typing them is more difficult. I'd argue that you shouldn't care about specific machines unless they're a problem and in that instance copy/paste should always be used to avoid typos. There's some cool things you can do with PowerDNS' Pipe Backend to get dynamic resolution to service names. Another problem with this approach is it just requires a lot more tooling to get started. Obviously not everyone has the time to build all of the infrastructure around this ideal.
Anyways, sorry for the rant, but everywhere I've worked we've started with role based names and regretted it in the long term. Now that I've finally been able to live what I've long dreamed of, I couldn't imagine choosing another solution.
Obviously hostname conventions are a contentious issue so I won't say anyone is wrong, but these are my experiences.
Edit: I just reread your paragraph about using positional hostnames. This seems like a good use, because the main problem I see with role based hostnames is that hosts can take on multiple roles. But in general the hostname seems unimportant if you are tagging your hosts with roles.
(Fortunately some entires in /etc/hosts + a local Apache server set up with RedirectRules fixes this annoyance, at least for myself…)
It can only get error prone if you have two hosts with similar names in the same project (made up example: lnx4739p34 vs. lnx4793p34) in the same project, i've seen hostnames getting reassigned because of regular mix ups.
If you happen to do ssh logins and manual troubleshooting, to make sure you're not messing with the wrong machine it's great to have puppet maintain CMDB data like service level, machine purpose, owner and open tickets etc. in a nicely formatted /etc/motd file, along with a autmatic "who" output in .bashrc to see who else is logged in.
Another question regarding hostnames is the use of (sub)domains. I find it highly annoying to deal with hosts like "mysql04.customer.vlan33.berlin2.intranet.my-company.com" instead of "lnx4739p34.myco.net", regardless of the global location.
Our naming scheme for the servers is similar to how you describe dropbox - there is a generic prefix and then a rack+uposition number (ie: gen0112). This has worked out pretty well. When we build a site or replace a server, we record the mac address. Then we can assign role-based child hostnames to the physical server name, update the cobbler config, and everything gets built accordingly.
Of course, there is a nice host database to track all these mappings as well as scripts to generate and push those cobbler configurations.
Does that hold with all themes? My first employer named computers after aircraft parts; easy to remember, made it clear that people were talking about a computer rather than anything else, but it never seemed to lead us to personify them.
> I'd argue that you shouldn't care about specific machines unless they're a problem
True once you've scaled up to the point that all your services are distributed, but before then it's worth having an awareness of what runs on what box. Memorable names help with that.
One other downside you've missed with location-based is that it makes it harder to move a machine.
Shortly after setting it up, I pinged it from a Solaris box. The response was 'passion is alive'.
I tell this story every time there is a 'what do you call your hosts?' discussion!
Indian food dishes (30 of em! "where is jalfrazie?") Great US mountains (ugh.) 'win2003' the Sun box (ugh again. don't name the box after the OS running on it...)
...i'd say my favorite was 'appname-colo-number#-rackunit#-rack#.airportcode.yourdomain'. This way, the db server in your new york colo JFK1 is easily found in rack unit 20 of rack #5 (db01-20-5.jfk1.example.com).
Once you have +200 servers, having physical location and role mapped to the hostname is a game changer. Even better would be having just a six digit hex hash that you could look up in a noc dashboard.
Note that all that other cutesy stuff is fine as a CNAME, but the FQDN might as well be made significant since it needs to be unique anyway.
Even if you're not doing any of that, it only takes one move and you have to rename your systems, a process that is varying degrees of tricky.
You might as well just call them "1", "2", and "3". The only time this kind of
naming scheme is appropriate is when you have a lot of machines and there are
no reasons for any human to distinguish between them. For example, a master
computer might be controlling an array of one hundred computers. In this case,
it makes sense to refer to them with the array indices.
When you're starting off with your cute naming scheme, how do you know how many machines you'll manage in the end? Most places I've worked at have hundreds of servers. Using a simple, easy to follow, don't-make-me-think standard from the beginning is the only thing that makes sense IMO.To give a server a meaningful name, use DNS.
edit: Also, to take your complaint about "i-977.. what was the rest of it?" and turn it around - imagine this scenario: provision 20 new app servers named foo40..foo59 OR provision 20 new app servers and think of 20 cool names to match our existing cool naming scheme of leonardo donatello michaelangelo raphael master-splinter shredder blah blah blah :)
python -c "import random; print random.choice(open('/usr/share/dict/words').read().split())"
Nerd factor: really, really high.P.S. you're still allowed to exercise the power of veto.
I've managed to convince others to let me use this technique to form a team name in a couple of Uni projects.
"protonymphal" -- I think I want to call my new band that.
«We used to treat our physical machines as home pets, having few of them, giving them proper names, caring about them individually.
Now we treat virtual machines as cattle on a large farm, marking them with numbers, denying them any individuality, and killing them when we don't need them any more.»
It ended up taking a few months, and one day, they called her and said, "Hey, we're ready to image the new Webteam workstation. What should we set the hostname to?" "Waytso." "Waytso? What does that mean?" "Why Are You Taking SO long!?"
I miss some other traditional in other locations of the world, but still for me it's a great compilation I just saved for "the next time I see myself searching for it".
Thanks.
- "Hey, I will run some experiments on zeppelin tonight. Is she free? Thank you." - "All our computers play a song from its hostname band. Except pinkfloyd. No one had patience to listen to a song for 20 minutes."
The host names were invented so people won't have to memorize IP addresses. IT morons here with their "functional hostnames" have managed to defeat the purpose of hostnames, so that they are now harder to remember than IP addresses!
Please please please get a clue, use geography, mythology, Simpsons, anything but stupid "bisappjmpthatthislakdh000283".
Some examples:
- Alesia
- Concorde
- Dupleix
- Exelmans
- Madeleine
- Pyramides
- Solferino
- Trocadero
- Voltaire
- Wagram
As a bonus, you can use the Métro lines' color to visually identify your themes (or hostnames).[1] http://en.wikipedia.org/wiki/List_of_Paris_metro_stations
accting-ws-01
email-server-01
building1-upstairs-switch-01
eastgroup-noc-router-01
Why go cutesy when you can actually define what they do and where they are?Renaming machines is a pain, and they inevitably end up with more/different stuff on them than was originally intended, then your "helpful" name like pukweb01 (production, uk, web, 01) is worse than "pikachu" (as it's incorrect).
the correct way to do this is to give the machine a name with no meaning (maybe pikachu, maybe box005) and have a list of the services running on each machine, and use DNS for those (say www1/ns1 that CNAMEs to the actual hostname).
personally, I'd argue that anyone that calls machines things like "pukweb01" has had little to no experience with a rapidly evolving system...
A new job for a machine calls for a new OS install/etc.
Sure it's not cutesy as "pikachu" or "bobasaur", but it will sure make your nagios/copperegg dashboard make lot more sense. And when shit hits the fan you won't think your servers are cute, despite their clever names.
Many years ago, I originally assigned descriptive names to machines as I deployed them, but this didn't scale well as we wanted to move services (and their related hostames) to other machines. So I started assigning unique names to machines, using famous figures born on the day of configuration (as in http://en.wikipedia.org/wiki/October_12#Births). That was 'cute' for a while, but now I just generate random 4-letter words and pick the ones I like. The namespace is large enough for my purposes, the names are short enough for easy typing (ssh fang), and everything aligns nicely in text (zone files, inventory, etc.). In some cases, I've even replaced descriptive names with TXT records in DNS associated with the unique name.
foo-prod-1101.sea1.company.com foo-dev-1201.sea2.company.com foo-test-2101.ord1.company.com
'foo' is whatever, and 'mysql' is bad while 'corp-db' is better as other commentators mentioned.
for XYnn match X to the airport code of the datacenter, match Y to the sequence number of the datacenter, and 'nn' is a 2-digit code for the number in the cluster.
all short names are unique this way. all datacenter can have a mix of prod/int/dev/test. you can use DNS name resolution search path to lookup services like 'ldap' in your local datacenter.
don't use serial numbers. foo-123456789 is annoying for humans to use and will get truncated with interesting results. i had a discussion one time on chat with another engineer where i was looking at box '123' and he was looking at box '789' and we were both getting real confused because it seemed like we were on the same box... because we were...
also only use "company.com" as your domain for every server and desktop in your company. if you need "company.co.uk" then it should only host websites "www.company.co.uk" that points at VIPs and the servers behind that should all still live in company.com. if you have windows boxes then setup a domain for AD "ad.company.com" or "win.company.com" and let your domain servers own that and setup proper DNS delegation from the parent.
We have IP addresses. They are unique numbers that will always resolve to one unique machine, on which a network service exists that we want to talk to. We use the hostname to refer to the unique instance, and a URI's protocol name to refer to the service we want.
smtp. ntp. www. ftp. These are all short names that work great at expressing both what and where the service you want is, under your domain. But what if you have more than one? is it www2? ntp4? ftp3? which host/service do I want?
Context is everything. Your hostnames should be a representation of what you want to access, assuming a service with a default port. Instead of www2, www-devel. Instead of mysql255, mysql-qa-dev-ext. These are contexts that are specific to what you want, not just random identifiers you can use to pinpoint an exact thing.
Renaming hosts is a pain. It should be minimized, which is why CNAMEs are useful. If you can, try to give teams DNS control over the records pointing to the hosts they manage, so they can control them without waiting for the DNS admin to put a change through in a week. Make DNS changes work automatically and immediately (trust me, it's perfectly doable even in large environments). In most cases, you don't really need a host's name changed, you just need a CNAME to the new host you want to use.
-tsunami
-apocalypse
-famine
-avalanche
-hailstorm
-lightning
-heatwave
-locusts
-tornado
-fallingrocks (<-- my favorite)
Interestingly, though run on a shoestring, this proved to be one of the most reliable set of servers on campus. I guess the disaster naming was a sort of a reverse jinx.It is therefore much better to have important network machines and kit named in a logical manner, e.g. location-purpose-number.
As for what people have on their own desks, some people might detest whatever your cutesy name scheme is and be irked at having to use a machine called 'jigglypuff' just because they really never liked Teenage Mutant Ninja Turtles. They might also not really take to their workstation being impersonal, e.g. 'ldn-gfx-23'. Hence, on the desktop let people have a machine name of their choosing.
AlphaTrion is the PDC, A-3 is the BDC/SDC. Iacon is the SQL machine (VectorSigma is the name of the LVM pool). OmegaSupreme/Metroplex/FortressMaxiums are the gateways. Gestalts (Defensor, Computron, Superion) are used for the SANs and any other clusters.
Considering we try to be good guys, we only allow Autobot names for workstations. Starfire, Starscream, Punch-Counterpunch, and other fence sitters are not allowed. I lobbied for Wheelie to be included in that list, but was overruled by others.
[EDIT] I could see how this might have limitations on scale, but we haven't hit those limits internally, so it doesn't affect me yet. :)
http://computernamer.com is good too.
Routers are named after species of penguin!
At my company: For machines where usually you should NOT log in we use:
http://en.wikipedia.org/wiki/List_of_distilleries_in_Scotlan...
That is because they are so hard to spell! You really need to put the effort into it (e.g. Bruichladdich)
For the ones you should be logging into we use the most popular out of:
http://en.wikipedia.org/wiki/Category:Home_appliance_brands
Which also fits in well with what the machines do... number crunching!
It's a great piece of software for the VFX/post-production industry, and he's by far the best software vendor I've ever worked with.
[2] http://www.oscars.org/press/pressreleases/2011/20110107.html
These days, I go with colors - I usually get a handy 7 right from the start - so I don't need to dig in too much. I've also gone with desserts or sweets and I'm sure Android was a big inspiration (albeit subconsciously) for that.
It doesn't matter is my conclusion. where I work we have the remnants of about 5 different naming schemes living side by side (very big environment) and we're not missing out our gaining a thing.
We always resort to some external db (Sometimes just a spreadsheet) to lookup particular hosts based on whatever today's criteria is.
TL;DR it's a distraction. Don't waste time on it.
"Wait, was Magneto the master DB or the NFS server? Did we move DB off there? Is it in Atlanta, or San Francisco, or Phoenix?"
Eventually we reached a point where we had a spreadsheet mapping hostnames to architecture functions and physical locations. We realized that, even though our naming scheme was cool, it wasn't going to scale much further.
At work though it's all business; purpose, environment, number, etc.
We had a 'bad idea' theme once which included:-
port23
dotat
But my favourite for one of our build machines and appeared in -version output of our product was sigsegv.I've settled on the elements with atomic number as last octet and the handy shorthands, but that's for home dev network.
For company stuff they get named by function/env/counter.
Myself, I use types of alcohol.
Unrelated: if you use the time measurement list for hostnames, or anything else that other people have to type, please for the love of God spell "millennium" correctly.
I worked in a computer graphics group that used artist names, like vermeer, escher, davinci, etc. My system was bonestell. In another group I was in, we used names of dances, like bolero, foxtrot, tango, etc. The guy who suggested bolero was thinking of Bo Derek, but I took the idea of dance names and ran with it. My system was tarantella, which was hard enough to spell that people stayed off of it.
At home, I don't follow a pattern, but I have used names from "A Wrinkle in Time". My first quad core linux system was called tesseract and my Windows box was camazotz. I've always like the names of the earliest computers like ENIAC, EDSAC, UNIVAC, etc., so I named my Mac Pro prozac. I've considered naming my two raspberry pis colossus and guardian...
http://googlesystem.blogspot.com/2012/11/google-sets-still-a...
I do love the idea of elements though, with their atomic symbols as CNAMEs.
* Heisenberg is our Hypervisor server. Running everything.
* Combo is our MySQL database.
* Ehrmantraut is our Git server.
* Skyler is our build server.
Basically that. It's a bit of fun. There are 5 of us in the web team who all watched BB.
(With one pseudo-exception: my first laptop was protium, my previous deuterium, my current tritium. Next one will probably be hydrogen.)
So 192.168.1.30 is zinc. :)
On VPSes I like names like London<optional digit>PROD/DEV.
Guess which is my favourite game series.
my current machines are
lakehylia, lostwoods, termina, koholint, skyloft, deathmountain, minishwoods
Like Aegwynn, AeriePeak, Alterac, Arathi, etc.