As MaxMedia’s virtualized infrastructure grows, I’ve found myself tiring of looking up IP addresses every time I need to SSH into a box. Deciding it was time to work smarter, I threw together a quick ruby script that will generate a local hosts file that maps a nodes ip address to it’s fully qualified domain name (fqdn). This task was a piece of cake with Knife (Chef’s command-line utility), the Chef server search index, and a little ruby-foo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Just paste the output into your Mac’s /etc/hosts file and your ready to roll.