• 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
        do
            (
        	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)
        	do
        	    (
        		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
        	done
    
            )
        done
    
        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)
    82cff7cc
Name
Last commit
Last update
data/grid5000 Loading commit data...
examples Loading commit data...
extras Loading commit data...
generators Loading commit data...
.gitignore Loading commit data...
Gemfile Loading commit data...
Gemfile.lock Loading commit data...
README.wiki Loading commit data...
Rakefile Loading commit data...