diff --git a/quickstart.sh b/quickstart.sh index 0ebe82f..d44b2dd 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -16,7 +16,8 @@ rm -f $log_file exec &> >(tee -a "$log_file") echo " " -echo "====> : OpenMapTiles quickstart! [ https://github.com/openmaptiles/openmaptiles ] " +echo "-------------------------------------------------------------------------------------" +echo "====> : OpenMapTiles quickstart! [ https://github.com/openmaptiles/openmaptiles ] " echo " : This will be logged to the $log_file file ( for debugging ) and to the screen" echo " : Git version: $githash / Started: $STARTDATE " echo " : Your bash version: $BASH_VERSION" @@ -24,10 +25,13 @@ echo " : Your system is:" lsb_release -a echo " " +echo "-------------------------------------------------------------------------------------" echo " : This is working on x86_64 ; Your kernel is:" -uname -a +uname -r +uname -m echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Please check the docker and docker-compose version!" echo " : We are using docker-compose V2 file format ! see more: https://docs.docker.com/" echo " : (theoretically;not tested) minumum Docker version is 1.10.0+." @@ -38,48 +42,60 @@ docker --version docker-compose --version echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Checking OpenMapTiles docker images " docker images | grep openmaptiles echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Stopping running services & removing old containers " docker-compose down docker-compose rm -fv echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : For a clean start, we are removing old postgresql data volume ( if it exists )" docker volume ls -q | grep openmaptiles | xargs -r docker volume rm || true echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Making directories - if they don't exist ( ./build ./data ) " mkdir -p build mkdir -p data echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Removing old MBTILES if exists ( ./data/*.mbtiles ) " rm -f ./data/*.mbtiles testdata=zurich_switzerland.osm.pbf testdataurl=https://s3.amazonaws.com/metro-extracts.mapzen.com/$testdata if [ ! -f ./data/${testdata} ]; then + echo " " + echo "-------------------------------------------------------------------------------------" echo "====> : Downloading testdata $testdata " rm -f ./data/* wget $testdataurl -P ./data else + echo " " + echo "-------------------------------------------------------------------------------------" echo "====> : The testdata ./data/$testdata exists, we don't need to download! " fi echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Remove old generated source files ( ./build/* ) ( if they exist ) " docker run --rm -v $(pwd):/tileset openmaptiles/openmaptiles-tools make clean_build echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Code generating from the layer definitions ( ./build/mapping.yaml; ./build/tileset.sql )" echo " : The tool source code: https://github.com/openmaptiles/openmaptiles-tools " echo " : But we generate the tm2source, Imposm mappings and SQL functions from the layer definitions! " docker run --rm -v $(pwd):/tileset openmaptiles/openmaptiles-tools make echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start PostgreSQL service ; create PostgreSQL data volume " echo " : Source code: https://github.com/openmaptiles/postgis " echo " : Thank you: https://www.postgresql.org ! Thank you http://postgis.org !" @@ -87,6 +103,7 @@ docker-compose up -d postgres sleep 30 echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start importing water data from http://openstreetmapdata.com into PostgreSQL " echo " : Source code: https://github.com/openmaptiles/import-water " echo " : Data license: http://openstreetmapdata.com/info/license " @@ -94,6 +111,7 @@ echo " : Thank you: http://openstreetmapdata.com/info/supporting " docker-compose run --rm import-water echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start importing http://www.naturalearthdata.com into PostgreSQL " echo " : Source code: https://github.com/openmaptiles/import-natural-earth " echo " : Terms-of-use: http://www.naturalearthdata.com/about/terms-of-use " @@ -101,6 +119,7 @@ echo " : Thank you: Natural Earth Contributors! " docker-compose run --rm import-natural-earth echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start importing OpenStreetMap Lakelines data " echo " : Source code: https://github.com/openmaptiles/import-lakelines " echo " : https://github.com/lukasmartinelli/osm-lakelines " @@ -108,6 +127,7 @@ echo " : Data license: .. " docker-compose run --rm import-lakelines echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start importing OpenStreetMap data: ./data/${testdata} -> imposm3[./build/mapping.yaml] -> PostgreSQL" echo " : Imposm3 documentation: https://imposm.org/docs/imposm3/latest/index.html " echo " : Thank you Omniscale! " @@ -117,11 +137,13 @@ echo " : Thank you OpenStreetMap Contributors ! " docker-compose run --rm import-osm echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start SQL postprocessing: ./build/tileset.sql -> PostgreSQL " echo " : Source code: https://github.com/openmaptiles/import-sql " docker-compose run --rm import-sql echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Start generating MBTiles (containing gzipped MVT PBF) from a TM2Source project. " echo " : TM2Source project definitions : ./build/openmaptiles.tm2source/data.yml " echo " : Output MBTiles: ./data/tiles.mbtiles " @@ -132,10 +154,12 @@ echo " : See other MVT tools : https://github.com/mapbox/awesome-vector-til docker-compose -f docker-compose.yml -f docker-compose-test-override.yml run --rm generate-vectortiles echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Stop PostgreSQL service ( but we keep PostgreSQL data volume for debugging )" docker-compose stop postgres echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : Inputs - Outputs md5sum for debugging " rm -f quickstart_checklist.chk md5sum build/mapping.yaml >> quickstart_checklist.chk @@ -151,20 +175,23 @@ MODDATE=$(stat -c %y ./data/${testdata} ) echo " " echo " " -echo "------------------------------------------------------------" -echo "-- Summary --" -echo "------------------------------------------------------------" +echo "-------------------------------------------------------------------------------------" +echo "-- S u m m a r y --" +echo "-------------------------------------------------------------------------------------" echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : (disk space) We have created a lot of docker images: " echo " : Hint: you can remove with: docker rmi IMAGE " docker images | grep openmaptiles echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : (disk space) We have created this new docker volume for PostgreSQL data:" echo " : Hint: you can remove with : docker volume rm openmaptiles_pgdata " docker volume ls -q | grep openmaptiles echo " " +echo "-------------------------------------------------------------------------------------" echo "====> : (disk space) We have created the new vectortiles ( ./data/tiles.mbtiles ) " echo " : The OpenMapTiles MBTILES license: ..... " echo " : We created from $testdata ( file moddate: $MODDATE ) " @@ -172,13 +199,11 @@ echo " : Size: " ls ./data/*.mbtiles -la echo " " -echo "============================================================" +echo "-------------------------------------------------------------------------------------" echo "The quickstart.sh is finished! " echo "It takes $(($ENDTIME - $STARTTIME)) seconds to complete" echo "We saved the log file to $log_file ( for debugging ) You can compare with the travis log !" echo " " echo "Start experimenting -> see the documentation! " -echo "============================================================" - - +echo "-------------------------------------------------------------------------------------"