stevage/saltymill — pull request #16 by mattcen (2014-08-03 22:41:04+00:00)
Title: Fixes to install process

Having applied the fixes in this pull request, I managed to get down to just 2 Salt errors:

----------
ID: get_mapstarter
Function: cmd.run
Name: dest=mapstarter
wget -nv http://gis.researchmaps.net/sample/map-starter.zip -O $dest.zip
mkdir $dest
unzip -o $dest.zip -d $dest
# If the unzipped archive contains exactly one directory, move it up a layer:
if [ `ls $dest | wc -l` == 1 ]; then
subdir=`ls $dest`
mv $dest/$subdir/* $dest/
rmdir $dest/$subdir
fi

Result: False
Comment: Desired working directory "/usr/share/mapbox/project" is not available
Changes:

And:

----------
ID: osrm_reindex_bicycle
Function: cmd.wait
Name: ./osrm-extract extract.osm.pbf # creates .names, ., .restrictions
./osrm-prepare extract.osrm # creates .fileIndex, .hsgr, .nodes, .ramIndex, .edges
sleep 2
test -f extract.osrm.hsgr || ( echo "OSRM extract failed somehow." && exit 1 )
pkill -f 'osrm-routed.*-p 5010' # Make sure we kill the right instance.
# nohup ./osrm-routed -p 5010 -t 8 extract.osrm > /dev/null 2>&1 &
/mnt/saltymill/log.sh "OSRM index for profile 'Bike' rebuilt."

Result: False
Comment: Command "./osrm-extract extract.osm.pbf # creates .names, ., .restrictions
./osrm-prepare extract.osrm # creates .fileIndex, .hsgr, .nodes, .ramIndex, .edges
sleep 2
test -f extract.osrm.hsgr || ( echo "OSRM extract failed somehow." && exit 1 )
pkill -f 'osrm-routed.*-p 5010' # Make sure we kill the right instance.
# nohup ./osrm-routed -p 5010 -t 8 extract.osrm > /dev/null 2>&1 &
/mnt/saltymill/log.sh "OSRM index for profile 'Bike' rebuilt."
" run
Changes:
----------
[there's more]

I suspect the former is bogus; possibly that terribly nasty 'ls' test you're doing. Will investigate later. The latter I suspect is what you mentioned about OSRM failures on Trusty.

I'm still kind of cargo-culting this install, so not sure exactly how everything fits together yet, but I'm working my way through the Salt doco so I can understand how it all works, and hopefully make some of the code cleaner and more robust.