Suggestion how to enable caching

Fabian Deutsch fdeutsch at redhat.com
Wed Aug 13 11:54:42 UTC 2014


Hey.

A couple of weeks ago I wrote about how I used squid to improve the build speed of images.

I think the minimal, easy to maintain and valuable solution is this simple config:

1. Setup squid on builders (default install on Fedora)
2. Add the following lines to the /etc/squid.conf

# Increase maximum size of cached objects and specify the cache_dir
# REMEMBER the ORDER
maximum_object_size 5 GB
cache_dir ufs /var/spool/squid 20000 16 256

3. Enable and start squid service

The service will only listen to connections from local networks, and will not proxy connections from public addresses.

The usage then is as follows:

Export http_proxy=127.0.0.1:3128 and all curl instances will pick up the proxy.
Similar parameters exist for other tools like the livemedia-creator too.

I am not familiar with writing a puppet class for this. But at least it is quite self contained.

Thoughts?

Geetings
fabian



More information about the Infra mailing list