GEOSPATIAL DIGITAL ASSETS GALLERY

a collection of advanced IOT tools and libraries, which covers but not limit to geospatial topics.

Dockerized GeoServer with GDAL plugin and Geomesa datastore

Dockerfile of GeoServer with GDAL and other extensions + GeoMesa Accumulo full backend in a single container


Dependencies

PostgresSQL 9.6, Hadoop 2.8.4, Accumulo 1.9.2, GeoMesa 1.3.5, GDAL 2.2.4, Tomcat 8.5.38 and GeoServer 2.11.3

Requirements

*Note: before you start, please make sure you have 16GB memory and set your Docker preferences like below:

Docker needs to be installed on your machine. So download docker from here:

https://www.docker.com/community-edition

and here is its documentation:

https://docs.docker.com/learn/

Pull image

$ docker pull yzhou16/geomesa-gdal-geoserver:latest

Usage

*Note: do not use localhost as for --hostname, otherwise Accumulo won’t connect remotely!

To run it with a console interaction (if port 50070, 50075, 8042, 8088, 2181, 9995, 9997, 42424, 6080 is available and opening on your host):

$ docker run --hostname centos.cluster0.container --name geomesa-gdal-geoserver -it -p 50070:50070 -p 50075:50075 -p 8042:8042 -p 8088:8088 -p 2181:2181 -p 9995:9995 -p 9997:9997 -p 42424:42424 -p 6080:8080 yfzhou/geomesa-gdal-geoserver bash
$ /opt/run.sh

*Note: use above command to do 1st time run, don’t forget to do

$ docker cp geomesa-gdal-geoserver:/hdfs ${HOME}/Public/EFS/Docker/geomesa-gdal-geoserver
$ docker cp geomesa-gdal-geoserver:/zookeeper ${HOME}/Public/EFS/Docker/geomesa-gdal-geoserver
$ docker cp geomesa-gdal-geoserver:/opt/data_dir ${HOME}/Public/EFS/Docker/geomesa-gdal-geoserver

Then do not commit back to the image, just exit the container, or if you want to connect to other host and have shared folders between docker and your host

$ docker run --hostname centos.cluster0.container --name geomesa-gdal-geoserver -it -p 50070:50070 -p 50075:50075 -p 8042:8042 -p 8088:8088 -p 2181:2181 -p 9995:9995 -p 9997:9997 -p 42424:42424 -p 6080:8080 -v <geoserver shared folder path>:/opt/data_dir -v <hadoop shared folder path>:/hdfs -v <zookeeper shared folder path>:/zookeeper yfzhou/geomesa-gdal-geoserver bash
$ /opt/run.sh

or to assign random ports that maps to all the exposed ports on the container:

$ docker run --hostname centos.cluster0.container --name geomesa-gdal-geoserver -it -p 50070 -p 50075 -p 8042 -p 8088 -p 2181 -p 9995 -p 9997:9997 -p 42424 -p 6080:8080 yfzhou/geomesa-gdal-geoserver bash
$ /opt/run.sh

*Note: the wps builder requires a fixed GeoServer port at 6080, other ports could be random.

or to RUN it without a console interaction

$ docker run --hostname centos.cluster0.container --name geomesa-gdal-geoserver -d -p 50070:50070 -p 50075:50075 -p 8042:8042 -p 8088:8088 -p 2181:2181 -p 9995:9995 -p 9997:9997 -p 42424:42424 -p 6080:8080 -v <geoserver shared folder path>:/opt/data_dir -v <hadoop shared folder path>:/hdfs -v <zookeeper shared folder path>:/zookeeper yfzhou/geomesa-gdal-geoserver

To check the port that the container is listening on:

$ docker ps -a

Authentication

*Note: you should change the password after first login.

Test

Hadoop Master: http://localhost:50070

Hadoop Cluster: http://localhost:8088

Accumulo: http://localhost:9995

GeoServer: http://localhost:6080/dashboard

Publish a geomesa layer

Publish the layer, create a workspace named as geomesa.
Data Source Name: geomesa_quick_start
Description: GeoMesa quick start
instanceId: instance
zookeepers: docker.for.mac.localhost:2181
user: root
Password: secret
tableName: geomesa.gdelt