cartage 1.2
Cartage provides a plug-in based tool to reliably create a package for a Bundler-based Ruby application that can be used in deployment with a configuration tool like Ansible, Chef, Puppet, or Salt. The package is created with its dependencies bundled in +vendor/bundle+, so it can be deployed in environments with strict access control rules and without requiring development tool access. Cartage has learned its tricks from Heroku, Capistrano, and Hoe. From Hoe, it learned to keep a manifest to control what is packaged (as well as its plug-in system). From Heroku, it learned to keep a simple ignore file. From Capistrano, it learned to mark the Git hashref as a file in its built package, and to timestamp the packages. Cartage follows a relatively simple set of steps when creating a package: 1. Copy the application files to the work area. The application’s files are specified in +Manifest.txt+ and filtered against the exclusion list (+.cartignore+). If there is no +.cartignore+, try to use +.slugignore+. If there is no +.slugignore+, Cartage will use a sensible default exclusion list. To override the use of this exclusion list, an empty +.cartignore+ file must be present. 2. The Git hashref is written to the work area (as +release_hashref+) and to the package staging area. 3. Files that have been modified are restored to pristine condition in the work area. The source files are not touched. (This ensures that +config/database.yml+, for example, will not be the version used by a continuous integration system.) 4. Bundler is fetched into the work area, and the bundle is installed into the work area’s +vendor/bundle+ without the +development+ and +test+ environments. If a bundle cache is kept (by default, one is), the resulting +vendor/bundle+ will be put into a bundle cache so that future bundle installs are faster. 5. A timestamped tarball is created from the contents of the work area. It can then be copied to a more permanent or accessible location. Cartage is extremely opinionated about its tools and environment: * The packages are created with +tar+ and +bzip2+ using <tt>tar cfj</tt>. * Cartage only understands +git+, which is used for creating <tt>release_hashref</tt>s, +Manifest.txt+ creation and comparison, and even default application name detection (from the name of the origin remote).