2.4.5-debian-10-r33 release
This commit is contained in:
parent
8fa3140ac1
commit
4e1cea9b0b
|
|
@ -20,11 +20,11 @@ RUN useradd -r -u 1001 -g root spark
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
RUN /postunpack.sh
|
RUN /postunpack.sh
|
||||||
ENV BITNAMI_APP_NAME="spark" \
|
ENV BITNAMI_APP_NAME="spark" \
|
||||||
BITNAMI_IMAGE_VERSION="2.4.5-debian-10-r32" \
|
BITNAMI_IMAGE_VERSION="2.4.5-debian-10-r33" \
|
||||||
JAVA_HOME="/opt/bitnami/java" \
|
JAVA_HOME="/opt/bitnami/java" \
|
||||||
NSS_WRAPPER_GROUP="/opt/bitnami/spark/tmp/nss_group" \
|
NSS_WRAPPER_GROUP="/opt/bitnami/spark/tmp/nss_group" \
|
||||||
NSS_WRAPPER_PASSWD="/opt/bitnami/spark/tmp/nss_passwd" \
|
NSS_WRAPPER_PASSWD="/opt/bitnami/spark/tmp/nss_passwd" \
|
||||||
PATH="/opt/bitnami/python/bin:/opt/bitnami/java/bin:/opt/bitnami/spark/bin:/opt/bitnami/spark/sbin:/opt/bitnami/gosu/bin:$PATH" \
|
PATH="/opt/bitnami/python/bin:/opt/bitnami/java/bin:/opt/bitnami/spark/bin:/opt/bitnami/spark/sbin:/opt/bitnami/common/bin:$PATH" \
|
||||||
SPARK_HOME="/opt/bitnami/spark"
|
SPARK_HOME="/opt/bitnami/spark"
|
||||||
|
|
||||||
WORKDIR /opt/bitnami/spark
|
WORKDIR /opt/bitnami/spark
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1090
|
||||||
#
|
#
|
||||||
# Bitnami custom library
|
# Bitnami custom library
|
||||||
|
|
||||||
# Load Generic Libraries
|
# Load Generic Libraries
|
||||||
. /liblog.sh
|
. "${BITNAMI_SCRIPTS_DIR:-}"/liblog.sh
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
BOLD='\033[1m'
|
BOLD='\033[1m'
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1090
|
||||||
#
|
#
|
||||||
# Library for file system actions
|
# Library for file system actions
|
||||||
|
|
||||||
# Load Generic Libraries
|
# Load Generic Libraries
|
||||||
. /liblog.sh
|
. "${BITNAMI_SCRIPTS_DIR:-}"/liblog.sh
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,13 @@ CYAN='\033[38;5;6m'
|
||||||
# None
|
# None
|
||||||
#########################
|
#########################
|
||||||
stderr_print() {
|
stderr_print() {
|
||||||
printf "%b\\n" "${*}" >&2
|
# 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it
|
||||||
|
local -r bool="${BITNAMI_QUIET:-false}"
|
||||||
|
# comparison is performed without regard to the case of alphabetic characters
|
||||||
|
shopt -s nocasematch
|
||||||
|
if ! [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then
|
||||||
|
printf "%b\\n" "${*}" >&2
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1090
|
||||||
#
|
#
|
||||||
# Library for operating system actions
|
# Library for operating system actions
|
||||||
|
|
||||||
|
# Load Generic Libraries
|
||||||
|
. "${BITNAMI_SCRIPTS_DIR:-}"/liblog.sh
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|
@ -56,11 +60,12 @@ ensure_user_exists() {
|
||||||
local group="${2:-}"
|
local group="${2:-}"
|
||||||
|
|
||||||
if ! user_exists "$user"; then
|
if ! user_exists "$user"; then
|
||||||
useradd "$user" >/dev/null 2>&1
|
useradd "$user" >/dev/null 2>&1
|
||||||
if [[ -n "$group" ]]; then
|
fi
|
||||||
ensure_group_exists "$group"
|
|
||||||
usermod -a -G "$group" "$user" >/dev/null 2>&1
|
if [[ -n "$group" ]]; then
|
||||||
fi
|
ensure_group_exists "$group"
|
||||||
|
usermod -a -G "$group" "$user" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,6 +96,74 @@ get_total_memory() {
|
||||||
echo $(($(grep MemTotal /proc/meminfo | awk '{print $2}') / 1024))
|
echo $(($(grep MemTotal /proc/meminfo | awk '{print $2}') / 1024))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Get machine size depending on specified memory
|
||||||
|
# Globals:
|
||||||
|
# None
|
||||||
|
# Arguments:
|
||||||
|
# $1 - memory size (optional)
|
||||||
|
# Returns:
|
||||||
|
# Detected instance size
|
||||||
|
#########################
|
||||||
|
get_machine_size() {
|
||||||
|
local memory="${1:-}"
|
||||||
|
if [[ -z "$memory" ]]; then
|
||||||
|
debug "Memory was not specified, detecting available memory automatically"
|
||||||
|
memory="$(get_total_memory)"
|
||||||
|
fi
|
||||||
|
sanitized_memory=$(convert_to_mb "$memory")
|
||||||
|
if [[ "$sanitized_memory" -gt 26000 ]]; then
|
||||||
|
echo 2xlarge
|
||||||
|
elif [[ "$sanitized_memory" -gt 13000 ]]; then
|
||||||
|
echo xlarge
|
||||||
|
elif [[ "$sanitized_memory" -gt 6000 ]]; then
|
||||||
|
echo large
|
||||||
|
elif [[ "$sanitized_memory" -gt 3000 ]]; then
|
||||||
|
echo medium
|
||||||
|
elif [[ "$sanitized_memory" -gt 1500 ]]; then
|
||||||
|
echo small
|
||||||
|
else
|
||||||
|
echo micro
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Get machine size depending on specified memory
|
||||||
|
# Globals:
|
||||||
|
# None
|
||||||
|
# Arguments:
|
||||||
|
# $1 - memory size (optional)
|
||||||
|
# Returns:
|
||||||
|
# Detected instance size
|
||||||
|
#########################
|
||||||
|
get_supported_machine_sizes() {
|
||||||
|
echo micro small medium large xlarge 2xlarge
|
||||||
|
}
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Convert memory size from string to amount of megabytes (i.e. 2G -> 2048)
|
||||||
|
# Globals:
|
||||||
|
# None
|
||||||
|
# Arguments:
|
||||||
|
# $1 - memory size
|
||||||
|
# Returns:
|
||||||
|
# Result of the conversion
|
||||||
|
#########################
|
||||||
|
convert_to_mb() {
|
||||||
|
local amount="${1:-}"
|
||||||
|
if [[ $amount =~ ^([0-9]+)(M|G) ]]; then
|
||||||
|
size="${BASH_REMATCH[1]}"
|
||||||
|
unit="${BASH_REMATCH[2]}"
|
||||||
|
if [[ "$unit" = "G" ]]; then
|
||||||
|
amount="$((size * 1024))"
|
||||||
|
else
|
||||||
|
amount="$size"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$amount"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# Redirects output to /dev/null if debug mode is disabled
|
# Redirects output to /dev/null if debug mode is disabled
|
||||||
# Globals:
|
# Globals:
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ get_pid_from_file() {
|
||||||
if [[ -f "$pid_file" ]]; then
|
if [[ -f "$pid_file" ]]; then
|
||||||
if [[ -n "$(< "$pid_file")" ]] && [[ "$(< "$pid_file")" -gt 0 ]]; then
|
if [[ -n "$(< "$pid_file")" ]] && [[ "$(< "$pid_file")" -gt 0 ]]; then
|
||||||
echo "$(< "$pid_file")"
|
echo "$(< "$pid_file")"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,3 +55,61 @@ stop_service_using_pid() {
|
||||||
counter=$((counter - 1))
|
counter=$((counter - 1))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Generate a monit configuration file for a given service
|
||||||
|
# Arguments:
|
||||||
|
# $1 - Service name
|
||||||
|
# $2 - Pid file
|
||||||
|
# $3 - Start command
|
||||||
|
# $4 - Stop command
|
||||||
|
# Returns:
|
||||||
|
# None
|
||||||
|
#########################
|
||||||
|
generate_monit_conf() {
|
||||||
|
local -r service_name="${1:?service name is missing}"
|
||||||
|
local -r pid_file="${2:?pid file is missing}"
|
||||||
|
local -r start_command="${3:?start command is missing}"
|
||||||
|
local -r stop_command="${4:?stop command is missing}"
|
||||||
|
local -r monit_conf_dir="/etc/monit/conf.d"
|
||||||
|
|
||||||
|
mkdir -p "$monit_conf_dir"
|
||||||
|
cat >"${monit_conf_dir}/${service_name}.conf" <<EOF
|
||||||
|
check process ${service_name}
|
||||||
|
with pidfile "${pid_file}"
|
||||||
|
start program = "${start_command}" with timeout 90 seconds
|
||||||
|
stop program = "${stop_command}" with timeout 90 seconds
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Generate a logrotate configuration file
|
||||||
|
# Arguments:
|
||||||
|
# $1 - Log path
|
||||||
|
# $2 - Period
|
||||||
|
# $3 - Number of rotations to store
|
||||||
|
# $4 - Extra options (Optional)
|
||||||
|
# Returns:
|
||||||
|
# None
|
||||||
|
#########################
|
||||||
|
generate_logrotate_conf() {
|
||||||
|
local -r service_name="${1:?service name is missing}"
|
||||||
|
local -r log_path="${2:?log path is missing}"
|
||||||
|
local -r period="${3:-weekly}"
|
||||||
|
local -r rotations="${4:-150}"
|
||||||
|
local -r extra_options="${5:-}"
|
||||||
|
local -r logrotate_conf_dir="/etc/logrotate.d"
|
||||||
|
|
||||||
|
mkdir -p "$logrotate_conf_dir"
|
||||||
|
cat >"${logrotate_conf_dir}/${service_name}" <<EOF
|
||||||
|
${log_path} {
|
||||||
|
${period}
|
||||||
|
rotate ${rotations}
|
||||||
|
dateext
|
||||||
|
compress
|
||||||
|
copytruncate
|
||||||
|
missingok
|
||||||
|
${extra_options}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1090
|
||||||
#
|
#
|
||||||
# Validation functions library
|
# Validation functions library
|
||||||
|
|
||||||
# Load Generic Libraries
|
# Load Generic Libraries
|
||||||
. /liblog.sh
|
. "${BITNAMI_SCRIPTS_DIR:-}"/liblog.sh
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC1090
|
||||||
#
|
#
|
||||||
# Library for managing versions strings
|
# Library for managing versions strings
|
||||||
|
|
||||||
# Load Generic Libraries
|
# Load Generic Libraries
|
||||||
. ./liblog.sh
|
. "${BITNAMI_SCRIPTS_DIR:-}"/liblog.sh
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
########################
|
########################
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ Non-root container images add an extra layer of security and are generally recom
|
||||||
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/).
|
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/).
|
||||||
|
|
||||||
|
|
||||||
* [`2-debian-10`, `2.4.5-debian-10-r32`, `2`, `2.4.5`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-spark/blob/2.4.5-debian-10-r32/2/debian-10/Dockerfile)
|
* [`2-debian-10`, `2.4.5-debian-10-r33`, `2`, `2.4.5`, `latest` (2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-spark/blob/2.4.5-debian-10-r33/2/debian-10/Dockerfile)
|
||||||
|
|
||||||
Subscribe to project updates by watching the [bitnami/spark GitHub repo](https://github.com/bitnami/bitnami-docker-spark).
|
Subscribe to project updates by watching the [bitnami/spark GitHub repo](https://github.com/bitnami/bitnami-docker-spark).
|
||||||
|
|
||||||
|
|
@ -300,7 +300,7 @@ We'd love for you to contribute to this container. You can request new features
|
||||||
|
|
||||||
# Issues
|
# Issues
|
||||||
|
|
||||||
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-spark/issues). For us to provide better support, be sure to include the following information in your issue:
|
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-spark/issues/new). For us to provide better support, be sure to include the following information in your issue:
|
||||||
|
|
||||||
- Host OS and version
|
- Host OS and version
|
||||||
- Docker version (`docker version`)
|
- Docker version (`docker version`)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue