Giter Site home page Giter Site logo

borg's Introduction

Borg

This is a project inspired by Caphub. It expands on the concept and makes it into a framework for multi application deployment.

Build Status Dependency Status Code Climate

Setup

Deployer Package

borgify Sets up the following structure

my-deployer-package
├── cap
|   ├── applications
|   |   ├── application1.rb
│   |   └── application2.rb
|   ├── initilizers
|   |   ├── initializer1.rb
│   |   └── initializer2.rb
|   └── recipies
|       ├── recipe1.rb
│       └── recipe2.rb
├── Capfile
├── Gemfile
└── Gemfile.lock

Default Capfile contents

# provides a performance report at the end of execution
# set :borg_performance_reports, true

# runs on :exit events when ctrl-c is hit
# set :borg_sigint_triggers_exit, true

require 'borg-rb'
# require any other borg gems here.

Services Package

borgify plugin Sets up the following structure

my-service-package
├── cap
|   ├── initilizers
|   |   ├── initializer1.rb
│   |   └── initializer2.rb
|   └── recipies
|       ├── recipe1.rb
│       └── recipe2.rb
├── my-service-package.gemspec
├── Gemfile
└── Gemfile.lock

Guidelines

  • While working on this there was a realization that the if you write a "on :exit" event then make sure it is executable even if it is called when ctrl-c is hit.

Borg Application Config

Borg provides a application and stage config setup. One can define applications with the format.

application :app_name do
  # do things needed to setup the application environment.
end

stage :app_name, :stage_name do
  # do things for specific stage for the applications.
end

By default borg looks for application confi files in cap/applications and loads all those files. If multiple application and stage blocks with the same parameters are defined then all the blocks will be run for that application/stage.

The CLI enforces that all configs be specified at the start. Consider the command borg app1:stage1 app2 deploy will result in config app1:stage1, all configs for app2 (1 config for each stage, if there is no stage it assumes the app is the only stage) to be load and the deploy task be run against all of them.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Ruby Style Guidelines: We like this one https://github.com/styleguide/ruby

borg's People

Contributors

ktham avatar phil-monroe avatar tmandke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.