Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lessons Learned Setting Up the OSM Stack Workshop SotM US 2013

1,354 views

Published on

  • Be the first to comment

  • Be the first to like this

Lessons Learned Setting Up the OSM Stack Workshop SotM US 2013

  1. 1. OSM  Megalomaniacs’  Cookbook:    Lessons  Learned  in  Se7ng  Up  Your  Own  Planet  Jeff Meyer, jeff@gwhat.org | Open Historical Map, GWHAT.org  
  2. 2. Sources of Lessons Learned•  From installing OpenHistoricalMap–  www.openhistoricalmap.org–  Which is still very hacky–  Locally running everything except Nominatim•  From updating the OSM wiki Rails Port docs–  http://wiki.openstreetmap.org/wiki/Rails_port•  From piecing together:–  OSM tile server docs–  OSM production information
  3. 3. Lesson 1: Know the Stack!
  4. 4. Tile ServerLesson 1: Know the Stack!“Rails Port”NominatimKnow it as it lives on the site.
  5. 5. RemoteLesson 1: Know the Stack!LocalRemoteKnow it as it lives in your install…… and don’t forget the db(s) behind it all.
  6. 6. Lesson 2: Know What You Want to Do!That’ll drive what you want to install locally.Skipping things might make your life easier!RequirementsGoal Rails local? APIdb master Nominatimlocal?Tiles local?ContributeCode to coresiteYes Remote /localreplicationMaybe MaybeRun your owntile serverbased on OSMNo Remote /localreplicationNo YesMake cool tilestyles (TileMill)No n/a No NoMaintain aseparate planetYes Local Master Maybe Yes
  7. 7. Plan for your task….•  Think about how far you want to go before you start–  Postgres only vs. PostGIS–  Capacity planning–  Disks matter! (there is indeed a need for speed)–  Budget time for setting up your planet import•  Tricky connections:–  Osmosis is your friend – for generating local minutely diffs–  Tile db updater – osm2pgsql updates–  Pay attention to openstreetmap-tiles-update-expire–  Shoreline updater–  www-data (Apache user) runs lots of stuff (not you : ) )•  Skills help – brush up! Knowledge is good!–  SQL, Rails, Apache, git, general Linux-fu
  8. 8. Rails Server BasicsNo big whoop : )1.  Prep – install your db, Rails, etc.2.  Clone – git clone https://github.com/openstreetmap/openstreetmap-website.git!3.  Config4.  Rake5.  Startthen… add stuff like cgimap – test it for sure•  Docs wfm <ducks>h@p://wiki.openstreetmap.org/wiki/Rails_port  
  9. 9. Tile Server Basics•  Ain’t no such thing– i.e. there is no apt-get install osm-tile-server– Stylesheets– Mapnik / Renderd – rendering tiles– Apache / Modtile – serving tiles– Plumbing – dirty, shoreline, diffs•  Docs? Widely scattered•  Remember who owns it: www-data
  10. 10. Task at Hand….•  Set up: Entire Planet?•  Step 1: Set up Rails Port•  Step 2: Set up Tile Server•  Step 3: Set up Minutely Updates•  Step 4: Beer
  11. 11. Great references….•  Rails Wiki:–  http://wiki.openstreetmap.org/wiki/Ubuntu_tile_server•  Tiles Install docs:–  http://wiki.openstreetmap.org/wiki/Category:Tiles_and_tiling–  www.switch2osm.org–  http://wiki.openstreetmap.org/wiki/Ubuntu_tile_server (ignore the warnings)•  Production install docs:–  Apidb -> create minutely diffs from your local master:http://wiki.openstreetmap.org/wiki/Osmosis/Replication#Server-side_Replication–  Tile rendering:•  http://wiki.openstreetmap.org/wiki/Ubuntu_tile_server#Updating•  https://github.com/openstreetmap/mod_tile/blob/master/openstreetmap-tiles-update-expire

×