Changes between Version 38 and Version 39 of JBSsandbox/PlasticSlices


Ignore:
Timestamp:
04/23/14 14:01:08 (7 years ago)
Author:
Josh Smift
Comment:

Deal with the fact that different people's usercred files are in different places.

Legend:

Unmodified
Added
Removed
Modified
  • JBSsandbox/PlasticSlices

    v38 v39  
    106106{{{
    107107renewdate="$(date +%Y-%m-%d -d 'now + 55 days') 23:00 UTC"
    108 for slicename in $slices ; do omni --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml renewslice $slicename "$renewdate" ; done
     108for slicename in $slices ; do omni renewslice $slicename "$renewdate" ; done
    109109}}}
    110110
     
    114114(cd ~/.gcf ; omni getusercred -o ; for slicename in $slices ; do omni getslicecred $slicename -o ; done)
    115115}}}
     116
     117Set $GENIUSERCREDFILE to the path to the file that 'omni getusercred -o' just created, e.g. something like
     118
     119{{{
     120export GENIUSERCREDFILE=/home/jbs/.gcf/jbs-geni-usercred.xml
     121
     122OR
     123
     124export GENIUSERCREDFILE=/home/tupty/.gcf/tupty-geni-usercred.xml
     125
     126OR
     127
     128export GENIUSERCREDFILE=/home/asydney/.gcf/asydne01-portal-usercred.xml
     129}}}
     130
     131with the path to your file.
    116132
    117133Set up variables to create the slivers:
     
    129145
    130146{{{
    131 for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am createsliver $slicename $rspec & done ; sleep 5m ; done
     147for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$GENIUSERCREDFILE --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am createsliver $slicename $rspec & done ; sleep 5m ; done
    132148}}}
    133149
     
    156172
    157173renewdate="$(date +%Y-%m-%d -d 'now + 4 days') 23:00 UTC"
    158 for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am renewsliver $slicename "$renewdate" & done ; sleep 5s ; done
     174for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$GENIUSERCREDFILE --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am renewsliver $slicename "$renewdate" & done ; sleep 5s ; done
    159175}}}
    160176
     
    170186  mkdir -p ~/tmp/renewsliver/$slicename
    171187  cd ~/tmp/renewsliver/$slicename
    172   for rspec in ${rspecs[$slicename]} ; do outfile=$(echo $(basename $rspec) | sed -e 's/.rspec$//') ; somni $slicename $rspec ; omni --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am sliverstatus $slicename >& $outfile ; done
     188  for rspec in ${rspecs[$slicename]} ; do outfile=$(echo $(basename $rspec) | sed -e 's/.rspec$//') ; somni $slicename $rspec ; omni --usercredfile=$GENIUSERCREDFILE --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am sliverstatus $slicename >& $outfile ; done
    173189  cd ~/tmp/renewsliver/$slicename
    174190  grep -h _expires * >> results.txt
     
    204220{{{
    205221cd ~/slices/plastic-slices/ssh_config
    206 for slicename in $slices ; do ams="" ; for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; ams="$ams -a $am" ; done ; readyToLogin --no-keys --output --prefix=$slicename --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml --slicecredfile=$HOME/.gcf/$slicename-cred.xml $ams $slicename ; done
     222for slicename in $slices ; do ams="" ; for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; ams="$ams -a $am" ; done ; readyToLogin --no-keys --output --prefix=$slicename --usercredfile=$GENIUSERCREDFILE --slicecredfile=$HOME/.gcf/$slicename-cred.xml $ams $slicename ; done
    207223for slicename in $slices ; do mv -f $slicename-sshconfig.txt $slicename ; rm -f $slicename*.xml $slicename*.json $slicename-logininfo.txt ; done
    208224}}}
     
    397413for slicename in $slices ; do rspecs[$slicename]=$(ls -1 ~/rspecs/request/$slicename/*.rspec) ; done
    398414for slicename in $slices ; do echo ${rspecs[$slicename]} ; done
    399 for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am deletesliver $slicename & done ; sleep 30s ; done
     415for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$GENIUSERCREDFILE --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am deletesliver $slicename & done ; sleep 30s ; done
    400416}}}
    401417
     
    403419
    404420{{{
    405 for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$HOME/.gcf/$USER-geni-usercred.xml --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am sliverstatus $slicename |& egrep -q -i '(code 12|code 2)' || echo "unexpected sliver in $slicename at $am" & done ; sleep 5s ; done | grep unexpected | grep -v omni
     421for slicename in $slices ; do for rspec in ${rspecs[$slicename]} ; do somni $slicename $rspec ; omni --usercredfile=$GENIUSERCREDFILE --slicecredfile=$HOME/.gcf/$slicename-cred.xml -a $am sliverstatus $slicename |& egrep -q -i '(code 12|code 2)' || echo "unexpected sliver in $slicename at $am" & done ; sleep 5s ; done | grep unexpected | grep -v omni
    406422}}}
    407423