A rather direct provisioning and deployment system in ruby, bash over ssh, and rsync. SyncWrap is a refreshingly straightforward, DSL-free non-framework with no central server or repository requirements. The “magic”, if any, lies in the elegant component model, the shell command queue, and a few powerful methods like rput (augmented rsync).



Simplest example. Place the following in a sync.rb file:

class Greeter < SyncWrap::Component
  def install

  def say_it
    sh <<-SH
      echo "Hello from #{}"

host 'localhost',

Try it via the command line:

gem install syncwrap
syncwrap --help
syncwrap -f ./sync.rb --list  # -f default; list
syncwrap                      # Run it
syncwrap -v                   # Run it with full verbose output
syncwrap -v Greeter.say_it    # Without Greeter#install default

Output from syncwrap -v (minus the terminal color):

== localhost #<Module:0x00000001e95678>::Greeter#install: enqueue
<-- sh localhost (-v coalesce live)
echo "Hello from localhost"
Hello from localhost
--> Exit 0 (success)

See more elaborate examples, including ec2 provider support, in the examples directory and LAYOUT.


Component hierarchy implementing SyncWrap::Distro, for common methods like dist_install and other distribution-specific behaviors:

Non-exhaustive list of components implementing #install:

Other utilities:

SyncWrap makes customizing the above or implementing new components easy, as needed in your own projects.


Copyright © 2011-2018 David Kellum

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.