From fcfd9c516ec231c9cd8121b3e110e5a6d1f8b3ff Mon Sep 17 00:00:00 2001 From: Bruno Tavares Date: Thu, 20 Feb 2014 13:19:43 -0300 Subject: [PATCH] Introduce kickstart deploy --- README.md | 20 ++++++++++++++++++++ lib/kickstart-deploy | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 lib/kickstart-deploy diff --git a/README.md b/README.md index 316e34d..bc74c4b 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,26 @@ Compile the current workspace into the folder to be packaged on deploy kickstart compile ``` +#### deploy +Takes an host target and deploy the compiled code on it. + +```bash +kickstart deploy [target] [roles ...] +``` + +##### Examples +Deploy a role on a host + +```bash +kickstart deploy vagrant@localhost nodejs +``` + +Deploy two roles on a host with an alternative port + +```bash +kickstart deploy "-p 2222 vagrant@localhost" nodejs redis +``` + ### Thanks This project was inspired on [sunzi](https://github.com/kenn/sunzi) diff --git a/lib/kickstart-deploy b/lib/kickstart-deploy new file mode 100755 index 0000000..1dcd696 --- /dev/null +++ b/lib/kickstart-deploy @@ -0,0 +1,18 @@ +#!/bin/bash -e + +target=$1 +[ "$target" ] || echo "Please, provide an ssh target" +shift + +remote_command=$( +cat <