mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
Currently, Impala supports building and testing Docker images on Ubuntu. This extends that same support to Redhat-based distributions: 1. This splits out the Docker build's OS package installation into a separate install_os_packages.sh script. This script detects the OS and calls apt or yum as appropriate. The script takes the argument --install-debug-tools, which installs extra tools like iproute2 and ping. This defaults to true for debug images and false for release images. 2. This modifies daemon_entrypoint.sh to detect the OS and set LD_LIBRARY_PATH appropriate to account for different locations of Java. 3. This modifies docker/setup_build_context.py to handle different locations of libkudu_client.so and add extra sanity checks on various libraries found via globs. 4. This modifies bin/jenkins/dockerized-*.sh test infrastructure to be able to install docker on either Ubuntu or Redhat. It also changes the exit logic to collect the container logs. Developers can override the base image for Redhat 7 and Redhat 8 builds via the IMPALA_REDHAT7_DOCKER_BASE and IMPALA_REDHAT8_DOCKER_BASE environment variables. These default to open source Redhat equivalents (Centos 7.9 and Rocky 8.5 respectively), but they are also known to work with Redhat UBI images. Testing: - Ran dockerised testing on Rocky 8.5 via the rocky-8.5-dockerised-tests job. - Ran GVO - Ran a Docker build on Centos7 with UBI7 as the base image Change-Id: Ibaff2560ef971ac2c2231a8e43921164ea1d2f4d Reviewed-on: http://gerrit.cloudera.org:8080/19006 Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com> Tested-by: Joe McDonnell <joemcdonnell@cloudera.com>
48 lines
1.7 KiB
Docker
48 lines
1.7 KiB
Docker
# 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.
|
|
|
|
ARG BASE_IMAGE=impala_base
|
|
FROM ${BASE_IMAGE}
|
|
|
|
COPY --chown=impala lib /opt/impala/lib
|
|
|
|
# Run the daemon_entrypoint.sh script as a sanity check. This verifies that
|
|
# daemon_entrypoint.sh is detecting Java appropriately and constructing a
|
|
# LD_LIBRARY_PATH that allows impalad to start. The --version flag exits
|
|
# before starting the JVM, so that is the limit of this check.
|
|
RUN /opt/impala/bin/daemon_entrypoint.sh /opt/impala/bin/impalad --version
|
|
|
|
# Externally-facing ports
|
|
# Beeswax
|
|
EXPOSE 21000
|
|
# HS2
|
|
EXPOSE 21050
|
|
# HS2 over HTTP
|
|
EXPOSE 28000
|
|
# Debug webserver
|
|
EXPOSE 25000
|
|
# External Frontend
|
|
EXPOSE 21150
|
|
|
|
ENTRYPOINT ["/opt/impala/bin/daemon_entrypoint.sh", "/opt/impala/bin/impalad",\
|
|
"-log_dir=/opt/impala/logs",\
|
|
"-abort_on_config_error=false", "-state_store_host=statestored",\
|
|
"-catalog_service_host=catalogd", "-is_executor=false", \
|
|
"-mem_limit_includes_jvm=true", "-use_local_catalog=true", \
|
|
"--rpc_use_loopback=true",\
|
|
"-use_resolved_hostname=true"]
|