An API for obtaining and reusing computing resources.

## CRCache

Licensed under either the Apache License, Version 2.0 or the BSD 3-clause license at the users choice. A copy of both licenses are available in the project source as Apache-2.0 and BSD. You may not use this file except in compliance with one of these two licences.

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

## Overview

crcache - Compute resource cache - is a command line tool that abstracts out obtaining, using and reusing computing resources. This permits separation of project concerns (such as ‘run dpkg-buildpackage’) from environmental concerns (such as using a Debian wheezy chroot to run the command in).

crcache lets you write programs that need to scale to multiple machines without tying yourself to one particular provisioning system. For instance, running tests locally, in lxc containers or in a compute cloud can be done with one crcache call, and the user can tell crcache where (and how) to obtain the compute resource to run the test in. A simple configuration system and command line API make it easy to reconfigure at will.

The default configuration will run commands locally with no container or any other isolation:

$crcache acquire local$ crcache run local echo foo
foo

## Requirements

crcache is intended to be widely portable. It should run (and if it doesn’t, its a bug) on any platform as long as you have:

• Python 2.6+ or 3.2+.

• The ‘extras’ Python module.

• The ‘six’ Python module.

Some of the provider plugins for cr_cache may be less portable. When a provider depends on things outside the standard library (or newer than the version range above), it is placed in a separate tree, so that its installation is optional.