egads is a set of commands for deploying applications without depending on a git server.
Put egads
in your Gemfile:
# ./Gemfile
gem 'egads', require: nil
On remote machines (to which you deploy), egads
must be in your PATH.
So install egads
as a system gem:
gem install egads
See egads -h
for the most robust & up-to-date info. Here's a whirlwind tour.
Egads has two types of commands. Local commands run on your development machine or continuous integration environment. Remote commands run on deployed servers.
Commands are either porcelain commands that you should call directly as part of a typical workflow; or plumbing commands that are invoked by porcelain commands, and rarely invoked directly.
egads check SHA
- checks if a deployable tarball of the current commit exists on S3.egads build SHA
- makes a deployable tarball of the current commit and upload it to S3 (if missing).egads upload SHA
- (plumbing, called bybuild
) Uploads a pre-built tarball.
egads stage SHA
- Prepares an extracted tarball for release: runs bundler, copies config files, etc.egads release SHA
- Symlinks a staged release to current, restarts servicesegads extract SHA
- (plumbing, called bystage
) Downloads and untars a tarball from S3.egads clean
- (plumbing, called byrelease
) Deletes old releases to free space.
There are two config files:
egads.yml
(example) is in your git repo and tarballs. It has instructions for building, staging, and releasing tarballs./etc/egads.yml
(example) on remote servers has some configuration for downloading and extracting tarballs from S3; and some environment variables that could vary across environments. This file is presumably provisioned by a tool like Chef or Puppet.
The deploy process is:
- Run
egads build
from a server with a full git checkout (e.g. your local machine). This ensures there's a tarball for the remote servers to download. - Run
egads stage SHA
on all the remote servers to download, extract, and configure the SHA for release. - Run
egads release SHA
on all the remote servers to symlink the staged SHA to 'current', and restart services.
To publish a new version of egads
:
- Update
Egads::VERSION
- Commit and push to GitHub
- Create a new GitHub release
- Monitor the Test and Release action to ensure the gem is published successfully
Copyright (c) 2013 Kickstarter, Inc
Released under an MIT License