diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-09-20 19:27:31 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-09-20 19:27:31 -0300 |
commit | 7f0bf86913cea7929931b6b276e88cc55311d167 (patch) | |
tree | 05f06fd718cafa56a1b1fe17b3341266a7c1bfb4 /share | |
parent | 91581c1ed778b5dccd472201cc14be2eaca6b1a4 (diff) | |
download | hydra-7f0bf86913cea7929931b6b276e88cc55311d167.tar.gz hydra-7f0bf86913cea7929931b6b276e88cc55311d167.tar.bz2 |
Switching to simpler rsync installation
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/deploy | 2 | ||||
-rwxr-xr-x | share/hydra/install | 17 | ||||
-rwxr-xr-x | share/hydractl/install | 16 |
3 files changed, 22 insertions, 13 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy index 0c01623..3705a9e 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -39,7 +39,7 @@ for node in $NODES; do # Sync repository to server # Exclude eventual keys and version control files - rsync -CrltDv --no-perms --exclude=keys --delete --remote-rsync "sudo rsync" $HYDRA_FOLDER/puppet/ $node:/etc/puppet/ + rsync -CrltDv --no-perms --exclude=keys --delete --rsync-path "sudo rsync" $HYDRA_FOLDER/puppet/ $node:/etc/puppet/ # Run puppet $HYDRA_CONNECT $node <<EOF diff --git a/share/hydra/install b/share/hydra/install index 739589b..b16cf02 100755 --- a/share/hydra/install +++ b/share/hydra/install @@ -36,6 +36,10 @@ fi # Deploy for node in $NODES; do echo "Installing to $node..." + + # Rsync version + rsync -CrltDv --no-perms --exclude=keys --delete --rsync-path "sudo rsync" $APP_BASE/ $node:/usr/local/hydra/ + $HYDRA_CONNECT $node <<EOF ##### BEGIN REMOTE SCRIPT ##### if ! which git &> /dev/null; then @@ -44,12 +48,13 @@ for node in $NODES; do sudo aptitude install git-core -y fi - if [ ! -d /usr/local/hydra ]; then - sudo git clone $ORIGIN /usr/local/hydra - ( cd /usr/local/hydra ; sudo git reset --hard $COMMIT ) - else - ( cd /usr/local/hydra ; sudo git pull ; sudo git reset --hard $COMMIT ) - fi + # Git version + #if [ ! -d /usr/local/hydra ]; then + # sudo git clone $ORIGIN /usr/local/hydra + # ( cd /usr/local/hydra ; sudo git reset --hard $COMMIT ) + #else + # ( cd /usr/local/hydra ; sudo git pull ; sudo git reset --hard $COMMIT ) + #fi # Update symlinks sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydra diff --git a/share/hydractl/install b/share/hydractl/install index db45614..7eb6830 100755 --- a/share/hydractl/install +++ b/share/hydractl/install @@ -39,12 +39,16 @@ if ! which git &> /dev/null; then $sudo aptitude install git-core -y fi -if [ ! -d /usr/local/hydra ]; then - $sudo git clone $ORIGIN /usr/local/hydra - ( cd /usr/local/hydra ; $sudo git reset --hard $COMMIT ) -else - ( cd /usr/local/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT ) -fi +# Git version +#if [ ! -d /usr/local/hydra ]; then +# $sudo git clone $ORIGIN /usr/local/hydra +# ( cd /usr/local/hydra ; $sudo git reset --hard $COMMIT ) +#else +# ( cd /usr/local/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT ) +#fi + +# Rsync version +$sudo rsync -av --delete $APP_BASE/ /usr/local/hydra/ # Update symlinks $sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydra |