Introduce kickstart deploy

This commit is contained in:
Bruno Tavares
2014-02-20 13:19:43 -03:00
parent a833d374d1
commit fcfd9c516e
2 changed files with 38 additions and 0 deletions

18
lib/kickstart-deploy Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash -e
target=$1
[ "$target" ] || echo "Please, provide an ssh target"
shift
remote_command=$(
cat <<CMD
[ -d ~/kickstart ] && rm -rf ~/kickstart
mkdir ~/kickstart
cd ~/kickstart
tar xz
bash install.sh
CMD
)
kickstart compile $@
tar chz -C compile . | ssh $target "$remote_command"