Skip to content

Commit

Permalink
Update accumulo to 3.0.0
Browse files Browse the repository at this point in the history
Switch to centos7-oj11 image as accumulo requires JDK 11.
  • Loading branch information
wendigo committed Feb 15, 2024
1 parent 3178680 commit 365d031
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 55 deletions.
58 changes: 22 additions & 36 deletions testing/accumulo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
# limitations under the License.

ARG ARCH
FROM testing/centos7-oj17:unlabelled$ARCH
FROM testing/centos7-oj11:unlabelled$ARCH

ARG ACCUMULO_VERSION=1.7.4
ARG HADOOP_VERSION=2.6.5
ARG ZOOKEEPER_VERSION=3.4.14
ARG JAVA8_ZULU_VERSION=8.56.0.21-ca-jdk8.0.302
ARG ACCUMULO_VERSION=3.0.0
ARG HADOOP_VERSION=3.3.5
ARG ZOOKEEPER_VERSION=3.8.2
ARG IMAGE_ROOT_INSTALL=/usr/local/lib

ENV HADOOP_HOME=$IMAGE_ROOT_INSTALL/hadoop
Expand All @@ -26,27 +25,15 @@ ENV ZOOKEEPER_HOME=$IMAGE_ROOT_INSTALL/zookeeper
ARG HADOOP_CONF=$HADOOP_HOME/conf
ENV HADOOP_PREFIX=$HADOOP_HOME

# TODO Apache Archive is rate limited -- these should probably go in S3
ARG BASE_URL=https://archive.apache.org/dist
ARG ACCUMULO_BINARY_PATH=$BASE_URL/accumulo/$ACCUMULO_VERSION/accumulo-$ACCUMULO_VERSION-bin.tar.gz
ARG HADOOP_BINARY_PATH=$BASE_URL/hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz
ARG ZOOKEEPER_BINARY_PATH=$BASE_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/zookeeper-$ZOOKEEPER_VERSION.tar.gz
ARG ZOOKEEPER_BINARY_PATH=$BASE_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/apache-zookeeper-$ZOOKEEPER_VERSION-bin.tar.gz

RUN yum update -y && \
yum install -y gettext && \
# Install Zulu JDK
echo "Downloading zulu${JAVA8_ZULU_VERSION}-linux.x86_64.rpm..." && \
curl -o /tmp/jdk8.rpm --url https://cdn.azul.com/zulu/bin/zulu${JAVA8_ZULU_VERSION}-linux.x86_64.rpm && \
yum -y localinstall /tmp/jdk8.rpm && \
rm /tmp/jdk8.rpm && \
# Set JDK 8 as a default one
alternatives --set java /usr/lib/jvm/zulu-8/jre/bin/java && \
alternatives --set javac /usr/lib/jvm/zulu-8/bin/javac && \
yum install -y make gcc-c++ && \
yum clean all -y

# Override JAVA_HOME inherited from testing/centos7-oj17
ENV JAVA_HOME=/usr/lib/jvm/zulu-8

RUN mkdir -p $IMAGE_ROOT_INSTALL

# Download Hadoop
Expand All @@ -61,39 +48,38 @@ RUN wget --quiet $ACCUMULO_BINARY_PATH && \
rm accumulo-$ACCUMULO_VERSION-bin.tar.gz && \
ln -s $IMAGE_ROOT_INSTALL/accumulo-$ACCUMULO_VERSION $ACCUMULO_HOME

# Copy sample Accumulo configuration files and update the instance.volumes property
ENV CONF_SAMPLE_DIR=$ACCUMULO_HOME/conf/examples/3GB/standalone
RUN cp \
$CONF_SAMPLE_DIR/accumulo-env.sh \
$CONF_SAMPLE_DIR/accumulo-site.xml \
$CONF_SAMPLE_DIR/auditLog.xml \
$CONF_SAMPLE_DIR/generic_logger.properties \
$CONF_SAMPLE_DIR/generic_logger.xml \
$CONF_SAMPLE_DIR/log4j.properties \
$CONF_SAMPLE_DIR/monitor_logger.properties \
$CONF_SAMPLE_DIR/monitor_logger.xml \
$ACCUMULO_HOME/conf && \
sed -i s/"<value><\/value>"/"<value>file:\/\/\/tmp\/accumulo<\/value>"/ $ACCUMULO_HOME/conf/accumulo-site.xml
# Compile Accumulo native
RUN cd $ACCUMULO_HOME/lib/ && \
tar -zxvf $ACCUMULO_HOME/lib/accumulo-native-$ACCUMULO_VERSION.tar.gz && \
cd $ACCUMULO_HOME/lib/accumulo-native-$ACCUMULO_VERSION && \
make && \
mv libaccumulo.so ../native && \
cd .. && \
rm -Rf accumulo-native-$ACCUMULO_VERSION*

# Download ZooKeeper
RUN wget --quiet $ZOOKEEPER_BINARY_PATH && \
tar -xf zookeeper-$ZOOKEEPER_VERSION.tar.gz -C $IMAGE_ROOT_INSTALL && \
rm zookeeper-$ZOOKEEPER_VERSION.tar.gz && \
ln -s $IMAGE_ROOT_INSTALL/zookeeper-$ZOOKEEPER_VERSION $ZOOKEEPER_HOME && \
tar -xf apache-zookeeper-$ZOOKEEPER_VERSION-bin.tar.gz -C $IMAGE_ROOT_INSTALL && \
rm apache-zookeeper-$ZOOKEEPER_VERSION-bin.tar.gz && \
ln -s $IMAGE_ROOT_INSTALL/apache-zookeeper-$ZOOKEEPER_VERSION-bin $ZOOKEEPER_HOME && \
cp $ZOOKEEPER_HOME/conf/zoo_sample.cfg $ZOOKEEPER_HOME/conf/zoo.cfg

RUN mkdir -p /var/log/zookeeper /var/log/accumulo

COPY ./files /

RUN mv /etc/accumulo.properties /usr/local/lib/accumulo/conf/

# Initialize Accumulo which requires ZooKeeper to be started
RUN ${ZOOKEEPER_HOME}/bin/zkServer.sh start && \
RUN ${ZOOKEEPER_HOME}/bin/zkServer-initialize.sh --myid=0 && \
${ZOOKEEPER_HOME}/bin/zkServer.sh start && \
${ACCUMULO_HOME}/bin/accumulo init --user root --password secret --instance-name default

# ZooKeeper
EXPOSE 2181
# Accumulo Monitor
EXPOSE 50095
EXPOSE 9995
# Accumulo Monitor Logs
EXPOSE 4560
# Accumulo TabletServer
Expand Down
4 changes: 4 additions & 0 deletions testing/accumulo/files/etc/accumulo.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
instance.volumes=file:///tmp/accumulo
instance.zookeeper.host=localhost:2181
instance.secret=accumulofortrino
tserver.memory.maps.native.enabled=true
2 changes: 1 addition & 1 deletion testing/accumulo/files/etc/supervisord.d/accumulo-gc.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:accumulo-gc]
command=/usr/local/lib/accumulo/bin/accumulo gc --address %(ENV_ADDRESS)s
command=/usr/local/lib/accumulo/bin/accumulo gc
startsecs=2
stopwaitsecs=10
user=root
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[program:accumulo-master]
command=/usr/local/lib/accumulo/bin/accumulo manager
startsecs=2
stopwaitsecs=10
user=root
redirect_stderr=true
stdout_logfile=/var/log/accumulo/manager.log
autostart=true
8 changes: 0 additions & 8 deletions testing/accumulo/files/etc/supervisord.d/accumulo-master.conf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:accumulo-monitor]
command=/usr/local/lib/accumulo/bin/accumulo monitor --address %(ENV_ADDRESS)s
command=/usr/local/lib/accumulo/bin/accumulo monitor
startsecs=2
stopwaitsecs=10
user=root
Expand Down
8 changes: 0 additions & 8 deletions testing/accumulo/files/etc/supervisord.d/accumulo-tracer.conf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:accumulo-tserver]
command=/usr/local/lib/accumulo/bin/accumulo tserver --address %(ENV_ADDRESS)s
command=/usr/local/lib/accumulo/bin/accumulo tserver
startsecs=2
stopwaitsecs=10
user=root
Expand Down

0 comments on commit 365d031

Please sign in to comment.