Project

gearship

0.0
No commit activity in last 3 years
No release in over 3 years
Quickly set up a docker host and deploy your app with ease.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 2.2
~> 0.19
 Project Readme

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 gearship
  • gearship init
  • update gearship.yml with server configuration
  • update gearship.sh with install configuration
  • gearship go setup_host
  • gearship go deploy_app
  • your app is live!

Quickstart

Install Gem:

$ gem install gearship

cd into your project directory then create the gearship folder:

$ cd my_project
$ gearship init

cd 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_host

Ship your dockerized project to the docker host:

$ gearship go deploy_app

gearship performs missions which are composed of actions.

  • Shell scripts under the missions directory, such as setup_host.sh or deploy_app.sh, are automatically recognized as a mission.

  • The actions folder has reusable actions that can be called from any mission_name.sh with source 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 the compiled/actions folder in the compile phase.

  • gearship go install_app is equivalent to running gearship.sh, followed by install_app.sh.

What gearship does when gearship go setup_app is called

  1. Compile gearship.yml to generate attributes, retrieve remote actions, and copy files from cargo into the compiled directory. Append setup_app.sh file to a copy of gearship.sh in the compiled directory.
  2. SSH to the server specified in gearship.yml
  3. Transfer the content of the compiled directory to the remote server and extract in $HOME/gearship
  4. Run gearship.sh on the remote server.

Commands

$ gearship                                        # Show command help
$ gearship init                                   # Install gearship into project
$ gearship go [mission]                           # go docker project

Passing 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.