--- virt-cluster/create_vcoc.sh 2012/08/29 08:38:28 5 +++ virt-cluster/create_vcoc.sh 2012/10/09 15:11:42 16 @@ -1,6 +1,19 @@ #!/bin/bash # +# BonFIRE Virtual Clusters on Federated Clouds Demonstration Kit +# +# Copyright (c) Fundacion Centro Tecnologico de Supercomputacion de Galicia 2012 +# +# License Apache Software +# +# The research leading to these results has received funding from +# the European Community's Seventh Framework Programme (FP7/2007-2013) +# under agreement number 257386 +# +# This software is provided with ABSOLUTELY NO WARRANTY +# +# # Before you use this script, you must configure restfully # @@ -90,6 +103,8 @@ case "$optname" in "o") OVF=1 + echo "Option not yet supported" + exit ;; "n") N=${OPTARG} @@ -206,29 +221,34 @@ echo " " } >> $FILE echo " "] >> $FILE echo " " } >> $FILE -echo }, >> $FILE # # Now, the compute element is added # # Previously, you must execute the build-client.rb script, so VM image is ready. # -echo { >> $FILE -echo " " \"compute\": { >> $FILE -echo " " \"name\": \"client\", >> $FILE -echo " " \"description\": \"Virtual Cluster Client\", >> $FILE -echo " " \"instanceType\": \"small\", >> $FILE -echo " " \"locations\": [\"fr-inria\"], >> $FILE -echo " " \"resources\": [ >> $FILE -echo " " { \"storage\": \"${CLI}\"}, >> $FILE -echo " " { \"network\": \"${WAN}\"} >> $FILE -echo " " ], >> $FILE -echo " " \"contexts\": [ >> $FILE -echo " " { >> $FILE -echo " " } >> $FILE -echo " " ] >> $FILE -echo " " } >> $FILE -echo } >> $FILE +i=0 +while [ $i -lt $N ] +do + echo }, >> $FILE # ENDS previous element + echo { >> $FILE + echo " " \"compute\": { >> $FILE + echo " " \"name\": \"client-$i\", >> $FILE + echo " " \"description\": \"Virtual Cluster Client\", >> $FILE + echo " " \"instanceType\": \"small\", >> $FILE + echo " " \"locations\": [\"fr-inria\"], >> $FILE + echo " " \"resources\": [ >> $FILE + echo " " { \"storage\": \"${CLI}\"}, >> $FILE + echo " " { \"network\": \"${WAN}\"} >> $FILE + echo " " ], >> $FILE + echo " " \"contexts\": [ >> $FILE + echo " " { >> $FILE + echo " " } >> $FILE + echo " " ] >> $FILE + echo " " } >> $FILE + i=`expr $i + 1` +done + echo } >> $FILE echo ] >> $FILE echo } >> $FILE echo >> $FILE