Permalink
Browse files

Merge pull request #278 from teharrison/develop

add shell script for loading memcached on magellan VM
  • Loading branch information...
2 parents 9cf31cf + 78ace85 commit 5e4fa093dff8a2ec3d5b55e163c8e0e0d65eda40 @teharrison teharrison committed Apr 2, 2013
Showing with 22 additions and 0 deletions.
  1. +22 −0 src/Babel/bin/load_memcache.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+LOAD=$HOME/ach/md52memcache.pl
+DEPLOY=/mnt/ach
+VACH='1'
+MKEY='_ach'
+MHOST='localhost:11211'
+TYPES=( 'source' 'organism' 'function' 'ontology' 'md5_lca' 'md5_protein' 'md5_rna' 'md5_ontology' 'md5' )
+
+sudo mkdir $DEPLOY
+sudo chown ${USER}:${USER} $DEPLOY
+
+for T in "${TYPES[@]}"; do
+ echo "downloading $T ..."
+ wget -q -O ${DEPLOY}/${T}_map.gz ftp://ftp.metagenomics.anl.gov/data/MD5nr/memcached/v${VACH}/${T}_map.gz
+ echo "gunzipping $T ..."
+ gunzip -v ${DEPLOY}/${T}_map.gz
+ echo "loading $T ..."
+ $LOAD --verbose --mem_host $MHOST --mem_key $MKEY --map ${DEPLOY}/${T}_map --option $T
+done
+echo "Done loading memcache"
+

0 comments on commit 5e4fa09

Please sign in to comment.