Server names in Dnsmasq

Dev, DevOps
My domain name service (DNS) is running on a router using the wonderful Tomato firmware. When a computer boots up, it sends its hostname (i.e. "sally") to the router, which records the hostname and returns the corresponding IP ("192.168.7.10"). This is all grand. But, what if different services require a computer to have multiple names? That is, when the Puppet service fires up on my lappytop, it looks for the hostname "puppet" by default. Given the above scheme, a computer has one and only one name; DNS doesn't know that "sally" is also known as "puppet". Here's how to fix that. The router is running Tomato, which uses Dnsmasq as the DNS service. It automatically figures out the normal hostname/IP mapping, for instance "sally" in the above example. We can…
Read More

Fast Parallel Downloading (for apt-get)

Dev, DevOps
I'm rebuilding a Ubuntu server. Normally apt-get downloads one file at a time, which can get dull when you're installing 598 files. I found the tool "apt-fast" which downloads one or two files quickly, by downloading with multiple streams per file. This is somewhat sketchy, as it requires installation of additional software, assumes the file gets spliced together correctly, and doesn't gracefully handle network problems.I have a solution: xargsXargs walks on water. It is incredibly useful. In a nutshell, it runs a single command on a list of files. I'll post a lot more later, but here's how to speed up apt-get:cd /var/cache/apt/archives/apt-get -y --print-uris install ubuntu-desktop^ > debs.listegrep -o -e "http://[^']+" debs.list | xargs -l3 -P5 wget -nvapt-get -y install ubuntu-desktop^Replace "ubuntu-desktop^" with whichever task or package you want.…
Read More