1. 06 Jan, 2016 1 commit
  2. 14 Oct, 2015 1 commit
    • Jérémie Gaidamour's avatar
      Split the yaml files generated by g5k-checks per nodes · 82cff7cc
      Jérémie Gaidamour authored
          - Split <cluster_name>_generated.yaml files to cluster/<cluster_name>/nodes/<cluster-name>-[uid].yaml
          - Moved <cluster_name>.rb and <cluster_name>_manual.yaml to cluster/<cluster_name>/
          - Created empty <cluster_name>_manual.yaml for Lyon (otherwise, rake script does not work with SITE=lyon as those input files do not exist)
          For the record:
          From generators/input/sites/:
          cluster_list=$(ls ./*/clusters/*generated.yaml)
          for cluster_file in $cluster_list
          	cd $(dirname $cluster_file)
          	cluster_name=$(echo $(basename $cluster_file) | cut -d '_' -f1)
          	echo $cluster_name
          	last_node_number=$(egrep $cluster_name- *_generated.yaml | cut -d "-" -f2 | cut -d ":" -f1 | sort -n | tail -n1)
          	#echo $last_node_number
          	mkdir -p $cluster_name/nodes/ 2> /dev/null
          	for i in $(seq 1 $last_node_number)
          		echo "---"
          		echo "$cluster_name-$i:"
          		sed -n "/^$cluster_name-$i:$/,/^$cluster_name-.*:$/p" $cluster_name"_generated.yaml" | sed "/^$cluster_name-.*:$/d"
          	    ) > $cluster_name/nodes/$cluster_name-$i.yaml
          find . -iname "*_generated.yaml" -exec git rm -f {} \;
          git add */clusters/*
          for i in $(ls -d */clusters/*.rb); do (cd $(dirname $i); git mv $(basename $i) $(basename $i .rb)_*yaml $(basename $i .rb)); done
          (+ manually fixed lyon)