diff --git a/README.md b/README.md new file mode 100644 index 0000000..b7752b7 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# building the current images + +**step 0: clone the repos** + +`git clone https://github.com/geoHeil/geodocker-geomesa.git` + +**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) + ``` + +**step 2: build the image for the tutorial** +``` +git clone https://github.com/geoHeil/geomesa-tutorials.git +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 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 +``` +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 +``` \ No newline at end of file diff --git a/build.sh b/build.sh index 164f09e..7e03794 100755 --- a/build.sh +++ b/build.sh @@ -2,8 +2,8 @@ usage() { echo "Usage: $0 [-t ] [-g ] [-a ]" 1>&2; exit 1; } -ACCUMULO_VERSION=1.7.2 -GEOMESA_VERSION=1.3.0-m3-SNAPSHOT +ACCUMULO_VERSION=1.8.0 +GEOMESA_VERSION=1.3.0 while getopts ":t:g:a:" o; do case "${o}" in diff --git a/geodocker-accumulo-geomesa/Dockerfile.template b/geodocker-accumulo-geomesa/Dockerfile.template index f40bcfa..4f4caee 100644 --- a/geodocker-accumulo-geomesa/Dockerfile.template +++ b/geodocker-accumulo-geomesa/Dockerfile.template @@ -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" ] diff --git a/geodocker-accumulo-geomesa/docker-compose.yml b/geodocker-accumulo-geomesa/docker-compose.yml index bd69961..c6b6881 100644 --- a/geodocker-accumulo-geomesa/docker-compose.yml +++ b/geodocker-accumulo-geomesa/docker-compose.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/geodocker-accumulo-geomesa/fs/sbin/register.sh b/geodocker-accumulo-geomesa/fs/sbin/register.sh index 29ab496..9920b09 100755 --- a/geodocker-accumulo-geomesa/fs/sbin/register.sh +++ b/geodocker-accumulo-geomesa/fs/sbin/register.sh @@ -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" \ No newline at end of file