Skip to content

Fix entry point and other things #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# building the current images

**step 0: clone the repos**

`git clone https://github.com/geoHeil/geodocker-geomesa.git`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are merging this, it'd be good for the docs to point to the GeoDocker repo.


**step 1: choose correct settings**

- choose settings for accumulo / geomesa / ... version which fits your environment
- if there are major changes you might need to recompile geomsa as well
```
git clone https://github.com/locationtech/geomesa.git
cd geomesa
git checkout geomesa_2.11-1.3.0
update ./build.sh to desired version numbers then
build/mvn clean install -DskipTests=true #test failures otherwise (timeouts on macbook)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GeoMesa releases are available on LocationTech's Nexus repo. Would it be possible to skip this step?

```

**step 2: build the image for the tutorial**
```
git clone https://github.com/geoHeil/geomesa-tutorials.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, we should point to the 'official' GeoMesa-Tutorials repo.

cd geomesa-tutorials/docker-tutorial/
docker build -t geomesa-tutorial:1.3.0 .
```

**step 3: start all the images**

```
docker-compose up
```

**step 4: run the quickstart**

- connect into the java container which is already running
```
docker ps # shows all the containers
e5b2bb33c0b0 geomesa-tutorial:1.3.0 # I see this one
docker exec -ti <id> bash # id is here e5b2bb33c0b0
```

Now run the quickstart. This requires connection credentials as defined in the `docker-compose.yml` file:

```
java -cp geomesa-quickstart-accumulo/target/geomesa-quickstart-accumulo-1.3.0.jar \
com.example.geomesa.accumulo.AccumuloQuickStart \
-instanceId accumulo \
-zookeepers zookeeper \
-user root \
-password GisPwd \
-tableName quickstart
```
- you can monitor accumulo here http://localhost:9995/accumulo

# TODO

- currently it is crashing
- checkout geomesas gitter, there are some really interesting notes
- apparently the iterators ore (not yet out of the box) available in the geodocker implementation
- you need to add the jar into `ACCUMULO_HOME/lib` to *globally* install it. Otherwise namespaces are possible as well
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing locally is definitely good. Did you have a chance to figure out some of these options?

```
The version of ZooKeeper being used doesn't support Container nodes. CreateMode.PERSISTENT will be used instead.
Configured server-side iterators do not match client version - client version: 1.3.0, server version: unavailable
Creating new features
Inserting new features
Submitting query
Exception in thread "main" java.lang.RuntimeException: org.apache.accumulo.core.client.impl.AccumuloServerException: Error on server 845c80b29b3a:9997
```
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

usage() { echo "Usage: $0 [-t <tag>] [-g <geomesa.version>] [-a <accumulo.version>]" 1>&2; exit 1; }

ACCUMULO_VERSION=1.7.2
GEOMESA_VERSION=1.3.0-m3-SNAPSHOT
ACCUMULO_VERSION=1.8.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference would be to stick to Accumulo 1.7.2. GeoMesa 1.3.x is built against it. User needing to use Accumulo 1.8.0 need to build GeoMesa with a profile.

GEOMESA_VERSION=1.3.0

while getopts ":t:g:a:" o; do
case "${o}" in
Expand Down
4 changes: 3 additions & 1 deletion geodocker-accumulo-geomesa/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ ENV PATH="${PATH}:${GEOMESA_HOME}/bin"
ADD geomesa-accumulo_2.11-${GEOMESA_VERSION} ${GEOMESA_HOME}
ADD geomesa-accumulo-distributed-runtime_2.11-${GEOMESA_VERSION}.jar ${GEOMESA_RUNTIME}/

ADD geomesa-accumulo-distributed-runtime_2.11-${GEOMESA_VERSION}.jar ${ACCUMULO_HOME}/lib/

RUN set -x \
&& (echo yes | ${GEOMESA_DIST}/bin/install-jai.sh) \
&& (echo yes | ${GEOMESA_DIST}/bin/install-jline.sh)

COPY ./fs /
ENTRYPOINT [ "/sbin/geomesa-entrypoint.sh" ]
ENTRYPOINT [ "/sbin/entrypoint.sh" ]
15 changes: 10 additions & 5 deletions geodocker-accumulo-geomesa/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
version: '2'
services:
tutorial:
image: geomesa-tutorial:1.3.0
links:
- zookeeper:zookeeper
- accumulo-master:accumulo
geoserver:
image: quay.io/geomesa/geoserver:latest
ports:
- 9090:9090
hdfs-name:
image: quay.io/geomesa/hdfs:latest
image: quay.io/geomesa/hdfs:geomesa-1.3.0-accumulo-1.8.0
command: name
environment:
HADOOP_MASTER_ADDRESS: hdfs-name
ports:
- 50070:50070
hdfs-data:
image: quay.io/geomesa/hdfs:latest
image: quay.io/geomesa/hdfs:geomesa-1.3.0-accumulo-1.8.0
command: data
environment:
HADOOP_MASTER_ADDRESS: hdfs-name
Expand All @@ -23,7 +28,7 @@ services:
ports:
- 2181:2181
accumulo-master:
image: quay.io/geomesa/accumulo-geomesa:latest
image: quay.io/geomesa/accumulo-geomesa:geomesa-1.3.0-accumulo-1.8.0
command: master --auto-init
environment:
HADOOP_MASTER_ADDRESS: hdfs-name
Expand All @@ -32,7 +37,7 @@ services:
depends_on:
- zookeeper
accumulo-monitor:
image: quay.io/geomesa/accumulo-geomesa:latest
image: quay.io/geomesa/accumulo-geomesa:geomesa-1.3.0-accumulo-1.8.0
command: monitor
environment:
HADOOP_MASTER_ADDRESS: hdfs-name
Expand All @@ -44,7 +49,7 @@ services:
- zookeeper
- accumulo-master
accumulo-tserver:
image: quay.io/geomesa/accumulo-geomesa:latest
image: quay.io/geomesa/accumulo-geomesa:geomesa-1.3.0-accumulo-1.8.0
command: tserver
environment:
HADOOP_MASTER_ADDRESS: hdfs-name
Expand Down
2 changes: 1 addition & 1 deletion geodocker-accumulo-geomesa/fs/sbin/register.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ accumulo shell -u ${ACCUMULO_USER} -p ${ACCUMULO_PASSWORD} -e \
"config -s general.vfs.context.classpath.geomesa=file:///opt/geomesa/accumulo/[^.].*.jar"
accumulo shell -u ${ACCUMULO_USER} -p ${ACCUMULO_PASSWORD} -e \
"config -ns geomesa -s table.classpath.context=geomesa"
echo "Accumulo namespace configured: geomesa"
echo "Accumulo namespace configured: geomesa"