4.0.3-centos-7-r3 release

This commit is contained in:
Bitnami Bot 2019-09-05 06:39:58 +00:00
parent 337446c61c
commit ca9b35206c
3 changed files with 32 additions and 16 deletions

View File

@ -1,4 +1,4 @@
FROM bitnami/centos-extras-base:7-r125
FROM bitnami/centos-extras-base:7-r126
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
@ -12,10 +12,10 @@ RUN install_packages glibc keyutils-libs krb5-libs libcom_err libedit libgcc lib
RUN . ./libcomponent.sh && component_unpack "postgresql-repmgr" "4.0.3-0" --checksum ca0106030d42be0ca0c9429915c54502c08704d83f311b340e4de94d084b547a
COPY rootfs /
RUN yum -y install epel-release && yum -y update && yum -y install nss_wrapper
RUN yum --enablerepo base,updates,extras -y install epel-release && yum --enablerepo base,updates,extras -y update && yum --enablerepo base,updates -y install nss_wrapper
RUN /postunpack.sh
ENV BITNAMI_APP_NAME="postgresql-repmgr" \
BITNAMI_IMAGE_VERSION="4.0.3-centos-7-r2" \
BITNAMI_IMAGE_VERSION="4.0.3-centos-7-r3" \
NAMI_PREFIX="/.nami" \
NSS_WRAPPER_LIB="/usr/lib64/libnss_wrapper.so" \
PATH="/opt/bitnami/postgresql-repmgr/bin:/opt/bitnami/repmgr/bin:/opt/bitnami/postgresql/bin:$PATH"

View File

@ -41,6 +41,7 @@ repmgr_env() {
# Paths
export REPMGR_BASE_DIR="/opt/bitnami/repmgr"
export REPMGR_CONF_DIR="${REPMGR_BASE_DIR}/conf"
export REPMGR_MOUNTED_CONF_DIR="${REPMGR_MOUNTED_CONF_DIR:-/bitnami/repmgr/conf}"
export REPMGR_TMP_DIR="${REPMGR_BASE_DIR}/tmp"
export REPMGR_EVENTS_DIR="${REPMGR_BASE_DIR}/events"
export REPMGR_PRIMARY_ROLE_LOCK_FILE_NAME="${REPMGR_TMP_DIR}/master.lock"
@ -353,14 +354,14 @@ repmgr_inject_postgresql_configuration() {
postgresql_set_property "logging_collector" "on"
postgresql_set_property "log_directory" "$POSTGRESQL_LOG_DIR"
postgresql_set_property "log_filename" "postgresql.log"
cp "$POSTGRESQL_CONF_FILE" "$POSTGRESQL_MOUNTED_CONF_DIR/postgresql.conf"
cp "$POSTGRESQL_CONF_FILE" "${POSTGRESQL_MOUNTED_CONF_DIR}/postgresql.conf"
}
########################
# Use a different pg_hba.conf file by pretending it's an injected custom configuration\
# Globals:
# POSTGRESQL_MOUNTED_CONF_DIR
# REPMGR_*
# POSTGRESQL_*
# Arguments:
# None
# Returns:
@ -382,21 +383,29 @@ EOF
# Prepare PostgreSQL default configuration
# Globals:
# POSTGRESQL_MOUNTED_CONF_DIR
# REPMGR_MOUNTED_CONF_DIR
# Arguments:
# None
# Returns:
# None
#########################
repmgr_postgresql_configuration() {
repmgr_info "Preparing PostgreSQL configuration..."
# User injected custom configuration
if [[ -d "$POSTGRESQL_MOUNTED_CONF_DIR" ]] && compgen -G "$POSTGRESQL_MOUNTED_CONF_DIR"/* > /dev/null; then
repmgr_debug "User injected custom configuration detected!"
else
ensure_dir_exists "$POSTGRESQL_MOUNTED_CONF_DIR"
repmgr_inject_postgresql_configuration
repmgr_inject_pghba_configuration
fi
repmgr_info "Preparing PostgreSQL configuration..."
# User injected custom configuration
if [[ -d "$REPMGR_MOUNTED_CONF_DIR" ]] && compgen -G "$REPMGR_MOUNTED_CONF_DIR"/* > /dev/null; then
repmgr_debug "User injected custom configuration detected!"
fi
ensure_dir_exists "$POSTGRESQL_MOUNTED_CONF_DIR"
if [[ -f "${REPMGR_MOUNTED_CONF_DIR}/postgresql.conf" ]]; then
cp "${REPMGR_MOUNTED_CONF_DIR}/postgresql.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/postgresql.conf"
else
repmgr_inject_postgresql_configuration
fi
if [[ -f "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" ]]; then
cp "${REPMGR_MOUNTED_CONF_DIR}/pg_hba.conf" "${POSTGRESQL_MOUNTED_CONF_DIR}/pg_hba.conf"
else
repmgr_inject_pghba_configuration
fi
}
########################
@ -412,7 +421,11 @@ repmgr_postgresql_configuration() {
repmgr_generate_repmgr_config() {
repmgr_info "Preparing repmgr configuration..."
cat << EOF >> "$REPMGR_CONF_FILE"
if [[ -f "${REPMGR_MOUNTED_CONF_DIR}/repmgr.conf" ]]; then
repmgr_info "Custom repmgr.conf file detected"
cp "${REPMGR_MOUNTED_CONF_DIR}/repmgr.conf" "$REPMGR_CONF_FILE"
else
cat << EOF >> "$REPMGR_CONF_FILE"
event_notification_command='${REPMGR_EVENTS_DIR}/router.sh %n %e %s "%t" "%d"'
ssh_options=-o \"StrictHostKeyChecking no\" -v
use_replication_slots=$REPMGR_USE_REPLICATION_SLOTS
@ -433,6 +446,7 @@ degraded_monitoring_timeout=$REPMGR_DEGRADED_MONITORING_TIMEOUT
data_directory=$POSTGRESQL_DATA_DIR
async_query_timeout=$REPMGR_MASTER_RESPONSE_TIMEOUT
EOF
fi
}
########################
@ -587,6 +601,8 @@ repmgr_initialize() {
postgresql_stop
postgresql_start_bg
repmgr_register_primary
# Allow running custom initialization scripts
postgresql_custom_init_scripts
else
postgresql_start_bg
repmgr_unregister_standby

View File

@ -45,7 +45,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
* [`4-ol-7`, `4.0.3-ol-7-r3` (4/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/4.0.3-ol-7-r3/4/ol-7/Dockerfile)
* [`4-debian-9`, `4.0.3-debian-9-r6`, `4`, `4.0.3`, `4.0.3-r6`, `latest` (4/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/4.0.3-debian-9-r6/4/debian-9/Dockerfile)
* [`4-centos-7`, `4.0.3-centos-7-r2` (4/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/4.0.3-centos-7-r2/4/centos-7/Dockerfile)
* [`4-centos-7`, `4.0.3-centos-7-r3` (4/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/4.0.3-centos-7-r3/4/centos-7/Dockerfile)
Subscribe to project updates by watching the [bitnami/postgresql-repmgr GitHub repo](https://github.com/bitnami/bitnami-docker-postgresql-repmgr).