Skip to content

matpimenta/vagrant-chef-squid

 
 

Repository files navigation

Description

Vagrant and chef files for configuring squid as a caching proxy.

I modified the original recipe so it can cache large static files (.deb, .gz, ...) by default and the cache size is big enough.

It can be started locally in a vagrant box (basic authentication is enabled):

$ vagrant up

Proxy address: http://squid:squid@10.0.0.10:3128

To check cache usage:

$ vagrant ssh
$ sudo tail -f /var/log/squid3/access.log

Original README:

Recipes

default

The default recipe installs squid and sets up simple proxy caching. As of now, the options you may change are the port (node['squid']['port']) and the network the caching proxy is available on the subnet from node.ipaddress (ie. "192.168.1.0/24") but may be overridden with node['squid']['network']. The size of objects allowed to be stored has been bumped up to allow for caching of installation files.

Usage

Include the squid recipe on the server. Other nodes may search for this node as their caching proxy and use the node.ipaddress and node['squid']['port'] to point at it.

Databags are able to be used for storing host & url acls and also which hosts/nets are able to access which hosts/url

Example Databags

squid_urls - yubikey item

{ "urls": [ "^https://api.yubico.com/wsapi/2.0/verify" ], "id": "yubikey" }

squid_hosts - bastion item

{ "type": "src", "id": "bastion", "net": [ "192.168.0.2/32" ] }

squid_acls - bastion item

{ "id": "bastion", "acl": [ [ "yubikey", "allow" ], [ "all", "deny" ] ] }

License and Author

Author:: Matt Ray (matt@opscode.com) Author:: Sean OMeara (someara@opscode.com)

Copyright 2012 Opscode, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Vagrant/Chef files for squid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%