diff --git a/Dockerfile b/Dockerfile index 4704086..b7c83e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,12 +15,12 @@ ## -## Base image. Rocky Linux 9 with updates, JRE 11 headless, and updated CA certs. +## Base image. Rocky Linux 9 with updates, JRE 17 headless, and updated CA certs. ## FROM rockylinux:9 as base RUN set -eux; \ - yum install -y ca-certificates java-11-openjdk-headless && \ + yum install -y ca-certificates java-17-openjdk-headless && \ update-ca-trust extract && \ yum clean all && \ rm -rf /var/cache/yum @@ -31,7 +31,7 @@ RUN set -eux; \ FROM base as buildbase RUN set -eux; \ - yum install -y java-11-openjdk-devel make gcc-c++ wget && \ + yum install -y java-17-openjdk-devel make gcc-c++ wget && \ update-ca-trust extract COPY download.sh /usr/local/bin/ @@ -41,7 +41,7 @@ COPY download.sh /usr/local/bin/ ## FROM buildbase as hadoop -ARG HADOOP_VERSION=3.3.6 \ +ARG HADOOP_VERSION=3.5.0 \ HADOOP_FILE=_NOT_SET # Copy a known file along with the optional files (that might not exist). @@ -62,7 +62,7 @@ RUN set -eux; \ ## FROM buildbase as zookeeper -ARG ZOOKEEPER_VERSION=3.8.2 \ +ARG ZOOKEEPER_VERSION=3.9.5 \ ZOOKEEPER_FILE=_NOT_SET # Copy a known file along with the optional files (that might not exist). # The known file, along with '*' for the optional file allows the command @@ -81,9 +81,9 @@ RUN set -eux; \ ## FROM buildbase as accumulo -ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk -ARG ACCUMULO_VERSION=2.1.2 \ +ARG ACCUMULO_VERSION=4.0.0-SNAPSHOT \ ACCUMULO_FILE=_NOT_SET # Copy a known file along with the optional files (that might not exist). # The known file, along with '*' for the optional file allows the command @@ -107,7 +107,7 @@ ADD properties/ /opt/accumulo/conf/ FROM base ARG HADOOP_USER_NAME=accumulo -ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk \ +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk \ HADOOP_HOME=/opt/hadoop \ HADOOP_USER_NAME=$HADOOP_USER_NAME \ ZOOKEEPER_HOME=/opt/zookeeper \ diff --git a/README.md b/README.md index 228a675..1dba048 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ This is the first release of this project. Eventually, this project will create an `apache/accumulo` image at DockerHub. Until then, you will need to build your own image. The main branch of this repo creates a Docker image for -Accumulo 2.0+. If you want to create a Docker image for Accumulo 1.9, there is a -[1.9 branch](https://github.com/apache/accumulo-docker/tree/1.9) for that. +Accumulo 4.0+. If you want to create a Docker image for Accumulo 1.9, there is a +[1.9 branch](https://github.com/apache/accumulo-docker/tree/1.9) for that. Likewise, there is a 2.1 branch for +building a 2.1 Docker image. ## Obtain the Docker image @@ -14,15 +15,15 @@ To obtain the docker image created by this project, you can either pull it from While it is easier to pull from DockerHub, the image will default to the software versions below: -| Software | Version | -|-------------|---------------| -| [Accumulo] | 2.1.2 | -| [Hadoop] | 3.3.6 | -| [ZooKeeper] | 3.8.2 | +| Software | Version | +|-------------|-----------------| +| [Accumulo] | 4.0.0-SNAPSHOT | +| [Hadoop] | 3.5.0 | +| [ZooKeeper] | 3.9.5 | If these versions do not match what is running on your cluster, you should consider building -your own image with matching versions. However, Accumulo must be 2.0.0+. Below are instructions for -building an image: +your own image with matching versions. However, Accumulo must be 4.0.0+ and Hadoop must be 3.5.0+. +Below are instructions for building an image: 1. Clone the Accumulo docker repo @@ -35,7 +36,7 @@ building an image: Or build the Accumulo docker image with specific released versions of Hadoop, Zookeeper, etc that will downloaded from Apache using the command below: - docker build --build-arg ZOOKEEPER_VERSION=3.4.8 --build-arg HADOOP_VERSION=2.7.0 -t accumulo . + docker build --build-arg ZOOKEEPER_VERSION=3.9.0 --build-arg HADOOP_VERSION=3.5.0 -t accumulo . Or build with an Accumulo tarball (located in same directory as DockerFile) using the command below: diff --git a/properties/accumulo.properties b/properties/accumulo.properties index 2ba912a..c7431f9 100644 --- a/properties/accumulo.properties +++ b/properties/accumulo.properties @@ -1,21 +1,24 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. # This is the main configuration file for Apache Accumulo. Available configuration properties can be -# found in the Accumulo documentation on the Accumulo project website (https://accumulo.apache.org/) -# Link for Accumulo 2.0: https://accumulo.apache.org/docs/2.0/administration/properties +# found at https://accumulo.apache.org/docs/4.x/configuration/server-properties ## Sets location in HDFS where Accumulo will store data instance.volumes=hdfs://localhost:8020/accumulo @@ -29,11 +32,7 @@ instance.secret=DEFAULT ## Set to false if 'accumulo-util build-native' fails tserver.memory.maps.native.enabled=true -## Trace user -trace.user=root - -## Trace password -trace.password=secret - -## Search for available port if default is unavailable -tserver.port.search=true +## (optional) include additional property files for a resource group +## based on the ACCUMULO_RESOURCE_GROUP env var set in accumulo-service +#include=group-${env:ACCUMULO_RESOURCE_GROUP}.properties +#includeOptional=group-${env:ACCUMULO_RESOURCE_GROUP}.properties diff --git a/properties/log4j-monitor.properties b/properties/log4j-monitor.properties deleted file mode 100644 index 2057ede..0000000 --- a/properties/log4j-monitor.properties +++ /dev/null @@ -1,34 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -## Log4j 1.2 file that configures logging for Accumulo Monitor -## The system properties referenced below are configured by accumulo-env.sh - -## Define a console appender -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Target=System.out -log4j.appender.console.Threshold=ALL -log4j.appender.console.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n -log4j.appender.console.layout=org.apache.log4j.PatternLayout - -## Define an appender for the Accumulo Monitor to log to its own web GUI -log4j.appender.gui=org.apache.accumulo.server.monitor.LogService -log4j.appender.gui.Threshold=WARN - -## Append monitor logs to its own web GUI -log4j.logger.org.apache.accumulo=INHERITED, gui - -## Append most logs to file -log4j.rootLogger=INFO, console diff --git a/properties/log4j-service.properties b/properties/log4j-service.properties deleted file mode 100644 index 4588041..0000000 --- a/properties/log4j-service.properties +++ /dev/null @@ -1,49 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -## Log4j 1.2 file that configures logging for all Accumulo services (Master, TabletServer, GC, and Tracer) except Monitor -## The system properties referenced below are configured by accumulo-env.sh - -## Define a console appender -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Target=System.out -log4j.appender.console.Threshold=ALL -log4j.appender.console.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n -log4j.appender.console.layout=org.apache.log4j.PatternLayout - -## Define an appender to send important logs to the the primary Accumulo Monitor -## The primary monitor is the one currently holding a shared lock in ZooKeeper, -## and is typically the one that started first. -log4j.appender.monitor=org.apache.accumulo.monitor.util.AccumuloMonitorAppender -log4j.appender.monitor.Threshold=WARN - -## Change this log level from OFF to one of the following to enable audit logging: -## INFO -## enables audit logging (inherit appenders from root logger) -## INFO, audit -## enables audit logging using the audit log appender -## (requires audit log file appender above to be uncommented) -log4j.logger.org.apache.accumulo.audit=OFF - -## Append logs to the primary Accumulo Monitor -log4j.logger.org.apache.accumulo=INHERITED, monitor - -## Constrain some particularly spammy loggers -log4j.logger.org.apache.accumulo.core.file.rfile.bcfile=INFO -log4j.logger.org.mortbay.log=WARN -log4j.logger.org.apache.zookeeper=ERROR - -## Append most logs to console -log4j.rootLogger=INFO, console diff --git a/properties/log4j2-service.properties b/properties/log4j2-service.properties new file mode 100644 index 0000000..a080a7d --- /dev/null +++ b/properties/log4j2-service.properties @@ -0,0 +1,84 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +## Log4j2 file that configures logging for all Accumulo services +## The system properties referenced below are configured by accumulo-env.sh + +dest = err +name = AccumuloServiceLoggingProperties +monitorInterval = 30 + +packages = org.apache.accumulo.monitor.util.logging + +property.filename = ${sys:accumulo.log.dir}/${sys:accumulo.application} + +appender.console.type = Console +appender.console.name = STDERR +appender.console.target = SYSTEM_ERR +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{ISO8601} Thread[%T] [%-8c{2}] %-5p: %m%n +appender.console.filter.threshold.type = ThresholdFilter +appender.console.filter.threshold.level = error + +appender.rolling.type = RollingFile +appender.rolling.name = LogFiles +appender.rolling.fileName = ${filename}.log +appender.rolling.filePattern = ${filename}-%d{yyyy-MM-dd}-%i.log.gz +appender.rolling.layout.type = PatternLayout +appender.rolling.layout.pattern = %d{ISO8601} Thread[%T] [%-8c{2}] %-5p: %m%n +appender.rolling.policies.type = Policies +appender.rolling.policies.time.type = TimeBasedTriggeringPolicy +appender.rolling.policies.time.interval = 1 +appender.rolling.policies.time.modulate = true +appender.rolling.policies.size.type = SizeBasedTriggeringPolicy +appender.rolling.policies.size.size=512MB +appender.rolling.strategy.type = DefaultRolloverStrategy +appender.rolling.strategy.max = 10 + +# uncomment for separate audit logs +#appender.audit.type = RollingFile +#appender.audit.name = AuditLogFiles +#appender.audit.fileName = ${filename}.audit +#appender.audit.filePattern = ${filename}-%d{yyyy-MM-dd}-%i.audit.gz +#appender.audit.layout.type = PatternLayout +#appender.audit.layout.pattern = %d{ISO8601} Thread[%T] [%-8c{2}] %-5p: %m%n +#appender.audit.policies.type = Policies +#appender.audit.policies.time.type = TimeBasedTriggeringPolicy +#appender.audit.policies.time.interval = 1 +#appender.audit.policies.time.modulate = true +#appender.audit.policies.size.type = SizeBasedTriggeringPolicy +#appender.audit.policies.size.size=512MB +#appender.audit.strategy.type = DefaultRolloverStrategy +#appender.audit.strategy.max = 10 + +logger.zookeeper.name = org.apache.zookeeper +logger.zookeeper.level = error + +logger.accumulo.name = org.apache.accumulo +logger.accumulo.level = debug + +# uncomment for separate audit logs +#logger.audit.name = org.apache.accumulo.audit +#logger.audit.level = info +#logger.audit.additivity = false +#logger.audit.appenderRef.audit.ref = AuditLogFiles + +rootLogger.level = info +rootLogger.appenderRef.console.ref = STDERR +rootLogger.appenderRef.rolling.ref = LogFiles