http://2016.foss4g.org/talks.html#146
Docker is a growing open-source platform for building and shipping applications as cloud services in so called containers. But containers can be more than that! Following the idea of DevOps, Dockerfiles are a complete scripted definition of an application with all it's dependencies, which can be build and published as ready to use images. As each container is only running "one thing" (e.g. one application, one database, a worker instance), multiple containers can be configured with the help of docker-compose.
More and more geospatial open source projects or third parties provide Dockerfiles. In this talk, we try to give an overview of the existing Docker images and docker-compose configurations for FOSS4G projects. We report on test runs that we conducted with them, informing about the evaluation results, target purposes, licenses, commonly used base images, and more. We will also give a short introduction into Docker and present the purposes that Docker images can be used for, such as easy evaluation for new users, education, testing, or common development environments.
This talk integrates and summarizes information from previous talks at FOSS4G and FOSSGIS conferences, so I'd like to thank Sophia Parafina, Jonathan Meyer, and Björn Schilberg for their contributions.
1. An overview of Docker
images for geospatial
applications
FOSS4G conference 2016, Bonn, Germany
Daniel Nüst
Institute for Geoinformatics
University of Münster
2. Talk abstract
http://2016.foss4g.org/talks.html#146
Docker is a growing open-source platform for building and shipping applications as cloud services in so
called containers. But containers can be more than that! Following the idea of DevOps, Dockerfiles are a
complete scripted definition of an application with all it's dependencies, which can be build and published
as ready to use images. As each container is only running "one thing" (e.g. one application, one database,
a worker instance), multiple containers can be configured with the help of docker-compose.
More and more geospatial open source projects or third parties provide Dockerfiles. In this talk, we try to
give an overview of the existing Docker images and docker-compose configurations for FOSS4G projects.
We report on test runs that we conducted with them, informing about the evaluation results, target
purposes, licenses, commonly used base images, and more. We will also give a short introduction into
Docker and present the purposes that Docker images can be used for, such as easy evaluation for new
users, education, testing, or common development environments.
This talk integrates and summarizes information from previous talks at FOSS4G and FOSSGIS
conferences, so I'd like to thank Sophia Parafina, Jonathan Meyer, and Björn Schilberg for their
contributions.
3. Agenda
What is Docker? Why?
What can it be used for?
Overview of geo-related containers
Select containers Live Demo
13. Process and evaluation
Google
Search Docker Hub
Search FOSS4G talks
OSGeo project list
Criteria and data points
Goals / target users / applications (e.g. testing, dev
env,
new users, demos, …)
Maintainer (3rd party, original devs?)
License
Base image
16. Degree
tfr42/deegree
tfr42/teamengine
mdillon/postgis
FROM tomcat:8-jre7
MAINTAINER deegree TMC <tmc@deegree.org>
# set deegree version
ENV DEEGREE_VERSION 3.3.18
# download deegree
RUN wget
http://repo.deegree.org/content/repositories/public
/org/deegree/deegree-
webservices/${DEEGREE_VERSION}/deegree-webservices-
${DEEGREE_VERSION}.war -O
/usr/local/tomcat/webapps/deegree-webservices.war
# run tomcat
CMD ["catalina.sh", "run"]
17. gdal - Live Demo
docker run --rm geodata/gdal
Play around with gdal, easily use different versions (of library combinations)
https://github.com/geo-data/gdal-docker
Use it as a “binary executable” in scripts, e.g.
https://gist.github.com/spara/73972116fe751bf374e29618a10d5bed
https://hub.docker.com/r/spara/gdal_ef/
18. QGIS - Live Demo
xhost +
# --rm will remove the container as soon as it ends
docker run --rm --name="qgis-desktop-2.14ltr"
-i -t
-v ${HOME}:/home/${USER}
-v /tmp/.X11-unix:/tmp/.X11-unix
-e DISPLAY=unix$DISPLAY
kartoza/qgis-desktop:2.14
xhost -
docker run --name "qgis-server-webclient" -p 8081:80 -
d -t opengisch/qgis-server-webclient
20. PostGIS - Live Demo
docker run --name some-postgis -e
POSTGRES_PASSWORD=mysecretpassword -d
mdillon/postgis
docker run -it --link some-postgis:postgres -
-rm postgres
sh -c 'exec psql -h
"$POSTGRES_PORT_5432_TCP_ADDR" -p
"$POSTGRES_PORT_5432_TCP_PORT" -U postgres'
# list
# q
21. tileserver-mapnik - Live Demo
wget -c https://osm2vectortiles-
downloads.os.zhdk.cloud.switch.ch/v1.0/extracts/zurich.mbtile
s
git clone https://github.com/mapbox/mapbox-studio-osm-
bright.tm2.git
docker run -v $(pwd):/data -p 8085:80
klokantech/tileserver-mapnik
22. 52°North WPS - Live Demo
docker run -p 80:8080 52n-wps-base
http://localhost/wps
23. pycsw Live Demo
docker run --rm -it -p 8000:8000
geocontainers/pycsw
http://localhost:8000/
24. GeoNode Live Demo
docker run -p 8000:8000 -p 8080:8080
openmarble/arch-geonode
http://localhost:8080/
25. GeoMOOSE Live Demo
docker run -p 80:80 --rm=true --name
geomoose_demo geomoose
http://localhost/geomoose/geomoose_dev.html
Great example: Instructions for demo, testing,
and development usage of the image
27. PDAL
http://www.pdal.io/workshop/docker.html
PDAL stands on the shoulders of giants. It uses
GDAL, GEOS, and many other dependencies.
Because of this, it is very challenging to build
it yourself. We could easily burn an entire
workshop learning the esoteric build miseries of
PDAL and all of its dependencies. Fortunately,
Docker will allow us to use a fully-featured known
configuration to run our examples and
exercises without having to suffer so much.
docker run -t pdal/pdal pdal --help
29. Join on the OSGeo wiki
https://wiki.osgeo.org/wiki/DockerImages
https://wiki.osgeo.org/wiki/DockerImagesMeta
30. Core arguments for FOSS4G community
(all the Docker advantages… write once, biz ops, cloud, etc.)
Lower entrance barrier for users AND devs
(e.g. sandboxed stack per developer, J. Meyer)
Easier transition from testing to production
31. Tasks & Challenges for the community
Put your project on Docker Hub as an automated build and add a license
Use base images, extend them to provide useful variants
Collaborate with existing images!
Make services and apps configurable using ENVironment parameters and files
Projects and their developers must build up knowledge
Communicate intention of Dockerfile because there is not one Dockerfile fitting
all problems
UbuntuGIS easy, but huge images (try alpine!)
Packaging UI / Desktop applications still in flow
35. Thanks for your attention!
What are your questions?
http://o2r.info @o2r_project
daniel.nuest@wwu.de
Thanks to…
Björn Schilberg (Intevation) - https://www.fossgis.de/konferenz/2015/programm/events/847.de.html and
https://www.youtube.com/watch?v=CeI8S_tnCZ0
Jonathan Meyer - https://2016.foss4g-na.org/session/image-mosaics-automation
Sophia Parafina - https://2016.foss4g-na.org/session/spatial-data-processing-docker
DEVELOP
COLLABORATE
SCALE
“Containers are an application delivery technology”
Multiple containers on the same shared infrastructure
Package your application into a standardized unit for software development
Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.
VIRTUAL MACHINES
Virtual machines include the application, the necessary binaries and libraries, and an entire guest operating system -- all of which can amount to tens of GBs.
CONTAINERS
Containers include the application and all of its dependencies --but share the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers are not tied to any specific infrastructure: they run on any computer, on any infrastructure, and in any cloud.
BUILD BETTER SOFTWARE
Skip the setup and maintenance of development environments and language-specific tooling. Focus on creating new features, fixing issues, and shipping software.
SHARE AND COLLABORATE
Docker creates a common framework for developers and sysadmins to work together on distributed applications
DISTRIBUTE & SHARE CONTENT
Store, distribute, and manage Docker images in Docker Hub with your team. Image updates, changes, and history are automatically shared across your organization.
SIMPLY SHARE YOUR APPLICATION WITH OTHERS
Ship containers without worrying about environment dependencies creating issues for your application. Other teams can easily link to or test against your app without having to learn about how it works.
SHIP SOFTWARE FASTER AND AT SCALE
Docker allows you to dynamically change your application -- from adding new capabilities and scaling services, to quickly changing problem areas.
SHIP 7X MORE
On average, Docker users ship 7X more software after deploying Docker in their environment. More frequent software updates provide added value to customers.
QUICKLY SCALE
Docker containers spin up and down in seconds, making it easy to scale application services to satisfy peak customer demand, and then reduce running containers when demand ebbs.
EASILY REMEDIATE ISSUES
Docker makes it easy to identify issues, isolate the problem container, quickly roll back to make the necessary changes, and then push the updated container into production. Isolation between containers makes these changes less disruptive than in traditional software models.