Your geospatial platform on a PaaS

Presented by:

Steven Citron-Pousty

PaaS Dust Spreader - Red Hat's OpenShift

@TheSteve0 on Twitter, IRC, and Github


  1. Learn a bit about PaaS
  2. A little about OpenShift
  3. Watch it in action


  1. You like writing code rather than managing servers
  2. Or you like servers management and hate annoying developers

But I know EC2...

One Source to Bind Them All




But wait - there's more

  1. Free! No time limit
  2. 3 gears (like servers) - each 512 Mb RAM, 1 Gb disk
  3. Auto-scaling
  4. Simple pricing
  5. We are coming out of developer preview this summer


What stack am I going to show

  • Linux
  • Postgresql + PostGIS
  • (No time but could also be MongoDB)
  • GeoServer

What else I could have show

  • proj4
  • org GDAL
  • lucene spatial
  • MapServer
  • MapBox/Tilemill



But you get this for Free - just part of the package

We make it easy to ssh into your gear - rhc ssh

What do you need to know

  • ls (-l t a) - shows files on the system
  • top (ctrl q to quit) - shows you the top running processes
  • less [filename] - lets you scroll through the contents of the file
  • grep (insert regex here) [filename] - helps you search for text anywhere in a file
  • nano [filename] - very simple editor for text files

Postgresql + PostGIS

  • We give you this out of the box as well
  • Just install the Postgresql cartridge and then run the Postgis scripts
  • And then you are good to go with all the functionality you are used to
  • You can use SSH port-forward to connect your PGAdmin
  • rhc port-forward (on mac it is a little trickier given BSD roots)


  • Run in Java and we give you that/li>
  • Two ways to install
  • As a WAR (but you need to do somme configuration)
  • As a DIY but also needs some configuration
  • I prefer the WAR because then you can choose any Java container you want

Installing the WAR

Assuming Tomcat

  1. Download the war file
  2. Export the CATALINA_OPS in an action_hook to point to ~/app-root/data (also known as $OPENSHIFT_DATA_DIR)
  3. Place the WAR file in the webapps folder
  4. Extract the data dir from the WAR file to a temp location
  5. SFTP or SCP it up to ~/app-root/data
  6. Git add .; git commit -am "commit local"; git push


  • You want it to write the cache to data directory from before
  • Be careful about using up all your disk space

Final hints

  • You want to make a scalable app - each piece on it's own gear
  • You want scalable - easier to make applications talk to each other
  • You are probably going to want access to medium gears
  • Don't forget to backup your DB and your Apps - rhc snapshot

Let's look at some code

Let's wrap it up

  1. Openshift makes life great for you
  2. You can run all your favorite spatial pieces
  3. Free!

Come hang out with us:
#openshift on freenode irc