GeoMesa Kafka artifacts are available for download or can be built from source.
The easiest way to get started is to download the most recent binary version
($VERSION = 1.3.4) matching the version of Kafka you are using:

GeoMesa Kafka may also be built from source. For more information refer to Building from Source
in the developer manual, or to the README.md file in the the source distribution.
The remainder of the instructions in this chapter assume the use of the binary GeoMesa distribution.

If you have built from source, the Kafka distributions are created in the
respective target directory of each module below:

Kafka 0.8.x: geomesa-kafka/geomesa-kafka-dist/geomesa-kafka-08-dist

Kafka 0.9.x: geomesa-kafka/geomesa-kafka-dist/geomesa-kafka-09-dist

Kafka 0.10.x: geomesa-kafka/geomesa-kafka-dist/geomesa-kafka-10-dist

More information about developing with GeoMesa may be found in the Developer Manual.

GeoMesa comes with a set of command line tools for managing Kafka features. In each Kafka distribution the
tools are located in geomesa-kafka-$KAFKAVERSION-dist_2.11-$VERSION-bin.tar.gz/bin/.

Note

You can configure environment variables and classpath settings in
geomesa-kafka-$KAFKAVERSION_2.11-$VERSION/bin/geomesa-env.sh

In the geomesa-kafka-$KAFKAVERSION_2.11-$VERSION directory, run bin/geomesa-kafkaconfigure
to set up the tools.

### in geomesa-kafka-$KAFKAVERSION_2.11-$VERSION:
$ bin/geomesa-kafka configure
Using GEOMESA_KAFKA_HOME as set: /path/to/geomesa-kafka-$KAFKAVERSION_2.11-$VERSION
Is this intentional? Y\n y
Warning: GEOMESA_LIB already set, probably by a prior configuration.
Current value is /path/to/geomesa-kafka-$KAFKAVERSION_2.11-$VERSION/lib.
Is this intentional? Y\n y
To persist the configuration please update your bashrc file to include:
exportGEOMESA_KAFKA_HOME=/path/to/geomesa-kafka-$KAFKAVERSION_2.11-$VERSIONexportPATH=${GEOMESA_KAFKA_HOME}/bin:$PATH

Update and re-source your ~/.bashrc file to include the $GEOMESA_KAFKA_HOME and $PATH updates.

Warning

Please note that the $GEOMESA_KAFKA_HOME variable points to the location of the geomesa-kafka-$KAFKAVERSION_2.11-$VERSION
directory, not the main geomesa binary distribution directory.

Note

geomesa-kafka will read the $GEOMESA_EXTRA_CLASSPATHS environment variable to include any
additional jars or directories in the classpath. Use the geomesa-kafkaclasspath command in order to see what
JARs are being used.

Test the command that invokes the GeoMesa Tools:

$ geomesa-kafka
Using GEOMESA_KAFKA_HOME = /path/to/geomesa-kafka-$KAFKAVERSION_2.11-$VERSION
Usage: geomesa-kafka [command] [command options]
Commands:
convert Convert files using GeoMesa's internal SFT converter framework
create-schema Create a feature definition in GeoMesa
get-schema Describe the attributes of a given feature in GeoMesa
get-names List GeoMesa features for a given zkPath
help Show help
listen Listen to a GeoMesa Kafka topic
remove-schema Remove a schema and associated features from GeoMesa
version GeoMesa Version

After GeoServer is running, you will also need to install the WPS plugin to
your GeoServer instance. The GeoServer WPS Plugin must match the version of
GeoServer instance. The GeoServer website includes instructions for downloading
and installing the WPS plugin.

Note

If using Tomcat as a web server, it will most likely be necessary to
pass some custom options:

The value of -Xmx should be as large as your system will permit; this
is especially important for the Kafka plugin. You
should also consider passing -DGEOWEBCACHE_CACHE_DIR=/tmp/$USER-gwc
and -DEPSG-HSQL.directory=/tmp/$USER-hsql
as well. Be sure to restart Tomcat for changes to take place.

To install GeoMesa’s GeoServer plugin we can use the script manage-geoserver-plugins.sh in bin directory
of the appropriate GeoMesa Kafka binary distribution (see Versions and Downloads).

Note

If $GEOSERVER_HOME is set, then the --lib-dir parameter is not needed.

This will install the JARs for the Kafka GeoServer plugin and most of its dependencies.
However, you will also need additional JARs for Kafka and Zookeeper that will
be specific to your installation that you will also need to copy to GeoServer’s
WEB-INF/lib directory. For example,you should use the JARs that match the version of
Kafka you are running.

Warning

GeoMesa 1.3.4 depends on Scala 2.11, so you should make sure you use the
Kafka version built with Scala 2.11 as well (kafka_2.11_*) to avoid
compatibility issues.

There is a script in the geomesa-kafka-$KAFKAVERSION_2.11-$VERSION/bin directory
($GEOMESA_KAFKA_HOME/bin/install-kafka.sh) which will install these
dependencies to a target directory using wget (requires an internet
connection).