If you have used Beaker extensively for system testing your Puppet roles and profiles, you will have no doubt had some coffees while waiting for RPMs to download that you may well have downloaded before.
I was pleasantly surprised to find that setting up a Squid Cache using SquidMan on my Mac OS X Yosemite laptop and then having Beaker point at it was fairly straightforward. Still, there are a few gotchas to justify a blog post on the subject.
Thanks go to Alexander Rumyantsev for his post on Using squid to cache RedHat/CentOS yum repositories, and also to My Private Network for their post on Setting up Squid Man.
Installing and configuring SquidMan
I downloaded SquidMan 3.6 from here, and installed as with any other DMG file (although, to be sure, I had to manually drag and drop the app into my
Having started I went to its Preferences and entered the following config:
That is, I set the port to 3128, increased the maximum object size to 256MB in case I need to deal with large RPMs, and set the cache size to 4GB, and then I went to the Clients tab:
And here I allowed Beaker to connect from whatever network it happens to be on, i.e. all. (Limit that as your needs for security dictate.) (If you forget this step, Beaker will error out during a Yum install with a 403 Forbidden error.)
After starting Squid, you can find its config file using:
$ ps -ef |grep squid 501 2955 1 0 8:17pm ?? 0:03.64 /Applications/SquidMan.app/Contents/Ma cOS/SquidMan 501 7283 1 0 8:28pm ?? 0:00.00 /usr/local/squid/sbin/squid -f /Users/ alexharvey/Library/Preferences/squid.conf 501 7285 7283 0 8:28pm ?? 0:00.08 (squid-1) -f /Users/alexharvey/Library /Preferences/squid.conf 501 13310 96095 0 8:43pm ttys003 0:00.00 grep squid