PROD |
---|
Description: see README.
The S3 bucket is managed via CFN Template in the .aws folder
aws cloudformation <create|update>-stack \
--profile movelab \
--stack-name lab-graphhopper-graphdata-prod \
--template-body file://./.aws/graphdata.s3.yaml \
--parameters ParameterKey=ServiceName,ParameterValue=lab-graphhopper-graphdata-prod
docker build . -t docker.intapps.it/graphhopper:$(git rev-parse HEAD)
docker run -p 8989:8989 docker.intapps.it/graphhopper:$(git rev-parse HEAD)
osmosis \
--read-pbf file=hamburg-latest.osm.pbf \
--read-pbf file=berlin-latest.osm.pbf \
--merge \
--write-pbf \
omitmetadata=true \
file=b_hh_lndn_merged.pbf
NOTE: the -i
expects the path from within the docker container context
docker run -p 8999:8989 -v </path/to/pbf/file/>:/data docker.intapps.it/graphhopper:$(git rev-parse HEAD) -i <path/to/pbf/file>.pbf
e.g.:
docker run -p 8999:8989 -v /Users/macuser/Desktop/pbf:/data docker.intapps.it/graphhopper:$(git rev-parse HEAD) -i /data/b_hh_lndn_dnmrk_merged.pbf
tar -zcvf <filename>.gz <path/to/build/graphdata>
aws s3 cp /path/to/file.name s3://lab-graphhopper-graphdata-prod --profile movelab --region eu-west-1 --recursive
NOTE: If you want to use the compiled graph files use the following commands:
e.g.
docker run <...> -pg /data/graphdata/graphdata_b_hh_lndn.osm-gh -dp s3://lab-graphhopper-graphdata-prod/graphdata_b_hh_lndn.gz
The script will download the data from s3://lab-graphhopper-graphdata-prod/graphdata_b_hh_lndn.gz
.
Then graphdata_b_hh_lndn.gz
will be extracted into a folder called graphdata_b_hh_lndn.osm-gh
(In this case).
During the startup, graphhopper will look in /data/graphdata/graphdata_b_hh_lndn.osm-gh/
where the built graph is then located.