]> gitweb.fluxo.info Git - hydra.git/commitdiff
Switching to simpler rsync installation
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 20 Sep 2015 22:27:31 +0000 (19:27 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 20 Sep 2015 22:27:31 +0000 (19:27 -0300)
share/hydra/deploy
share/hydra/install
share/hydractl/install

index 0c01623c2a02644399d80bedc4ac30ce435de922..3705a9e23b57bf9d58f23219b126ac5e9adc18a2 100755 (executable)
@@ -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
index 739589b8851c5bd3c48f598eb6fda13ed02549b4..b16cf0211cabdf657a15f6ef2cecb237cacdf567 100755 (executable)
@@ -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
index db456145d30f874d852d3983903f15373d797735..7eb6830a635349940a85f25e37013917303f002c 100755 (executable)
@@ -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