gearship deploys dockerized projects to virtual machines.
Created as a micro alternative to puppet, chef, capistrano, etc, for managing droplets on digital ocean.
Caution: Currently under development - breaking changes can occur at any time.
Overview
gem install gearshipgearship init- update
gearship.ymlwith server configuration - update
gearship.shwith install configuration gearship go setup_hostgearship go deploy_app- your app is live!
Quickstart
Install Gem:
$ gem install gearshipcd into your project directory then create the gearship folder:
$ cd my_project
$ gearship initcd into the gearship folder and edit gearship.yml with your server configuration
Run gearship go setup_host to install docker on a new server:
$ cd gearship
$ gearship go setup_hostShip your dockerized project to the docker host:
$ gearship go deploy_appgearship performs missions which are composed of actions.
-
Shell scripts under the
missionsdirectory, such assetup_host.shordeploy_app.sh, are automatically recognized as a mission. -
The actions folder has reusable actions that can be called from any
mission_name.shwithsource actions/action_name.sh. -
Actions can be retrieved remotely via HTTP. Put a URL in the actions section of
gearship.yml, and gearship will automatically load the content and put it into thecompiled/actionsfolder in the compile phase. -
gearship go install_appis equivalent to runninggearship.sh, followed byinstall_app.sh.
What gearship does when gearship go setup_app is called
- Compile
gearship.ymlto generate attributes, retrieve remote actions, and copy files fromcargointo thecompileddirectory. Appendsetup_app.shfile to a copy ofgearship.shin thecompileddirectory. - SSH to the server specified in gearship.yml
- Transfer the content of the
compileddirectory to the remote server and extract in$HOME/gearship - Run
gearship.shon the remote server.
Commands
$ gearship # Show command help
$ gearship init # Install gearship into project
$ gearship go [mission] # go docker projectPassing setup variables to scripts during compilation
Ruby
Attributes defined in gearship.yml are accessible from any file with <%= @attributes.attribute_name %> when eval_erb: true is set in gearship.yml
Bash
Attributes defined in gearship.yml are split into individual files in compiled/attributes.
Refer to them by $(cat attributes/attribute_name) in the script.

