Installing Cassandra (GeoMesa) store in Geoserver

49 views Asked by At

I want to make it possible to create a Cassandra (GeoMesa) store in GeoServer. This is what I have done:

Step 1: I successfully pull and start docker pull oscarfonts/geoserver:2.22.2 in Docker Desktop. I can access Geoserver web interface on the exposed port http://localhost:32781/geoserver/index.html. Geoserver v2.22.2 is used because GeoMesa docs mentions it's the supported version: https://www.geomesa.org/documentation/stable/user/geoserver.html. Cassandra (GeoMesa) Vector Data Source is not available, since we did not install the plugin yet.

enter image description here

Step 2: I download the GeoMesa Cassandra plugin v4.0.4 and extract it within the Docker container. I continue to follow the official Installing GeoMesa Cassandra in GeoServer guide by executing the following command line:

# find / -wholename *geoserver/WEB-INF/lib
/usr/local/geoserver/WEB-INF/lib

# find / -name install-dependencies.sh
/home/geomesa-cassandra_2.12-4.0.4/bin/install-dependencies.sh

# /home/geomesa-cassandra_2.12-4.0.4/bin/install-dependencies.sh /usr/local/geoserver/WEB-INF/lib
Reading dependencies from /home/geomesa-cassandra_2.12-4.0.4/conf/dependencies.sh
All required dependencies already exist in /usr/local/geoserver/WEB-INF/lib 
// I get this because I already installed it before

Step 3: I also used the manage-geoserver-plugins.sh script. However, no jars show up in the list even though the gs-plugins folder are full of them

# ./manage-geoserver-plugins.sh /usr/local/geoserver/WEB-INF/lib /home/geomesa-cassandra_2.12-4.0.4/dist/gs-plugins --install
Collecting Installed Jars
Collecting geomesa-gs-plugin Jars
Please choose which modules to install
Multiple may be specified, eg: 1 2 5
Type 'a' to specify all
--------------------------------------

Module(s) to install: a
Done

Step 4: I executed the geomesa-cassandra configure script

# ./geomesa-cassandra configure
Current configuration:
  GEOMESA_CASSANDRA_HOME=/home/geomesa-cassandra_2.12-4.0.4
  GEOMESA_LIB=/home/geomesa-cassandra_2.12-4.0.4/lib
  GEOMESA_LOG_DIR=/home/geomesa-cassandra_2.12-4.0.4/logs
 
Is this correct (y/n)? y
To put geomesa-cassandra on the executable path, add the following line to your environment:
export GEOMESA_CASSANDRA_HOME="/home/geomesa-cassandra_2.12-4.0.4"
export GEOMESA_LIB="/home/geomesa-cassandra_2.12-4.0.4/lib"
export GEOMESA_LOG_DIR="/home/geomesa-cassandra_2.12-4.0.4/logs"
export PATH=${GEOMESA_CASSANDRA_HOME}/bin:$PATH
Register auto-complete for GeoMesa CLI commands (y/n)? y
Enter path to .bash_completion (deault ~/.bash_completion): 
#

Step 5: Restart the container and I still can't see Cassandra (GeoMesa) as a possible Vector Data Source in Geoserver.

Where do I go wrong? Thanks!

1

There are 1 answers

0
Austin Heyne On

Docker uses a virtual file system and any changes made to it are lost when the container is restarted. Since the GeoServer process is likely tied to the container root process it's not going to be possible to restart the GeoServer without loosing your changes. You would likely have to extend that docker image with new layers that add in the GeoMesa Cassandra jars.

GeoServer is actually very easy to run outside of docker. You can get it at the GeoServer Archive. All you need to do is download the platform independent binary, extract the zip, add in the GeoMesa Cassandra jars to webapps/geoserver/WEB-INF/lib/ and start the GeoServer with bin/startup.sh.