12.0.0-centos-7-r2 release
This commit is contained in:
parent
e970fee490
commit
aaa2619f9f
|
|
@ -1,4 +1,4 @@
|
|||
FROM bitnami/centos-extras-base:7-r195
|
||||
FROM bitnami/centos-extras-base:7-r196
|
||||
LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
|
||||
|
|
@ -15,7 +15,7 @@ COPY rootfs /
|
|||
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="12.0.0-centos-7-r1" \
|
||||
BITNAMI_IMAGE_VERSION="12.0.0-centos-7-r2" \
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -122,6 +122,10 @@ export PATH="$POSTGRESQL_BIN_DIR:$PATH"
|
|||
export POSTGRESQL_DAEMON_USER="postgresql"
|
||||
export POSTGRESQL_DAEMON_GROUP="postgresql"
|
||||
|
||||
# Version
|
||||
export POSTGRESQL_VERSION="$(echo "$BITNAMI_IMAGE_VERSION" | grep -oP "^\d+\.\d+\.\d+")"
|
||||
export POSTGRESQL_MAJOR_VERSION="$(echo "$BITNAMI_IMAGE_VERSION" | grep -oP "^\d+")"
|
||||
|
||||
# Settings
|
||||
export POSTGRESQL_INIT_MAX_TIMEOUT=${POSTGRESQL_INIT_MAX_TIMEOUT:-60}
|
||||
export POSTGRESQL_CLUSTER_APP_NAME=${POSTGRESQL_CLUSTER_APP_NAME:-walreceiver}
|
||||
|
|
@ -139,23 +143,18 @@ export POSTGRESQL_SYNCHRONOUS_COMMIT_MODE="${POSTGRESQL_SYNCHRONOUS_COMMIT_MODE:
|
|||
export POSTGRESQL_FSYNC="${POSTGRESQL_FSYNC:-on}"
|
||||
export POSTGRESQL_USERNAME="${POSTGRESQL_USERNAME:-postgres}"
|
||||
|
||||
if [[ -z "${POSTGRESQL_INITSCRIPTS_USERNAME:-}" ]]; then
|
||||
export POSTGRESQL_INITSCRIPTS_USERNAME=$POSTGRESQL_USERNAME
|
||||
else
|
||||
export POSTGRESQL_INITSCRIPTS_USERNAME=$POSTGRESQL_INITSCRIPTS_USERNAME
|
||||
fi
|
||||
|
||||
if [[ -z "${POSTGRESQL_INITSCRIPTS_PASSWORD:-}" ]]; then
|
||||
export POSTGRESQL_INITSCRIPTS_PASSWORD=$POSTGRESQL_PASSWORD
|
||||
else
|
||||
export POSTGRESQL_INITSCRIPTS_PASSWORD=$POSTGRESQL_INITSCRIPTS_PASSWORD
|
||||
fi
|
||||
|
||||
# Version
|
||||
export POSTGRESQL_VERSION="$(echo "$BITNAMI_IMAGE_VERSION" | grep -oP "^\d+\.\d+\.\d+")"
|
||||
export POSTGRESQL_MAJOR_VERSION="$(echo "$BITNAMI_IMAGE_VERSION" | grep -oP "^\d+")"
|
||||
|
||||
# Internal
|
||||
export POSTGRESQL_FIRST_BOOT="yes"
|
||||
EOF
|
||||
if [[ -z "${POSTGRESQL_INITSCRIPTS_USERNAME:-}" ]]; then
|
||||
cat <<"EOF"
|
||||
export POSTGRESQL_INITSCRIPTS_USERNAME="${POSTGRESQL_USERNAME}"
|
||||
EOF
|
||||
else
|
||||
cat <<"EOF"
|
||||
export POSTGRESQL_INITSCRIPTS_USERNAME="${POSTGRESQL_INITSCRIPTS_USERNAME}"
|
||||
EOF
|
||||
fi
|
||||
if [[ -f "${POSTGRESQL_PASSWORD_FILE:-}" ]]; then
|
||||
cat <<"EOF"
|
||||
export POSTGRESQL_PASSWORD="$(< "${POSTGRESQL_PASSWORD_FILE}")"
|
||||
|
|
@ -181,6 +180,15 @@ EOF
|
|||
else
|
||||
cat <<"EOF"
|
||||
export POSTGRESQL_POSTGRES_PASSWORD="${POSTGRESQL_POSTGRES_PASSWORD:-}"
|
||||
EOF
|
||||
fi
|
||||
if [[ -z "${POSTGRESQL_INITSCRIPTS_PASSWORD:-}" ]]; then
|
||||
cat <<"EOF"
|
||||
export POSTGRESQL_INITSCRIPTS_PASSWORD="${POSTGRESQL_PASSWORD:-}"
|
||||
EOF
|
||||
else
|
||||
cat <<"EOF"
|
||||
export POSTGRESQL_INITSCRIPTS_PASSWORD="${POSTGRESQL_INITSCRIPTS_PASSWORD:-}"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
|
@ -559,6 +567,7 @@ postgresql_initialize() {
|
|||
|
||||
if ! is_dir_empty "$POSTGRESQL_DATA_DIR"; then
|
||||
postgresql_info "Deploying PostgreSQL with persisted data..."
|
||||
export POSTGRESQL_FIRST_BOOT="no"
|
||||
is_boolean_yes "$create_pghba_file" && postgresql_restrict_pghba
|
||||
is_boolean_yes "$create_conf_file" && postgresql_configure_replication_parameters
|
||||
is_boolean_yes "$create_conf_file" && postgresql_configure_fsync
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ export REPMGR_STANDBY_ROLE_LOCK_FILE_NAME="${REPMGR_TMP_DIR}/standby.lock"
|
|||
export REPMGR_MASTER_RESPONSE_TIMEOUT="${REPMGR_MASTER_RESPONSE_TIMEOUT:-20}"
|
||||
export REPMGR_DEGRADED_MONITORING_TIMEOUT="${REPMGR_DEGRADED_MONITORING_TIMEOUT:-5}"
|
||||
|
||||
export REPMGR_UPGRADE_EXTENSION="${REPMGR_UPGRADE_EXTENSION:-no}"
|
||||
|
||||
# These are internal
|
||||
export REPMGR_SWITCH_ROLE="${REPMGR_SWITCH_ROLE:-no}"
|
||||
export REPMGR_CURRENT_PRIMARY_HOST=""
|
||||
|
|
@ -163,6 +165,9 @@ repmgr_validate() {
|
|||
if ! is_yes_no_value "$REPMGR_PGHBA_TRUST_ALL"; then
|
||||
print_validation_error "The allowed values for REPMGR_PGHBA_TRUST_ALL are: yes or no."
|
||||
fi
|
||||
if ! is_yes_no_value "$REPMGR_UPGRADE_EXTENSION"; then
|
||||
print_validation_error "The allowed values for REPMGR_UPGRADE_EXTENSION are: yes or no."
|
||||
fi
|
||||
|
||||
[[ "$error_code" -eq 0 ]] || exit "$error_code"
|
||||
}
|
||||
|
|
@ -578,6 +583,21 @@ repmgr_register_standby() {
|
|||
debug_execute "${REPMGR_BIN_DIR}/repmgr" "${flags[@]}"
|
||||
}
|
||||
|
||||
########################
|
||||
# Upgrade repmgr extension
|
||||
# Globals:
|
||||
# REPMGR_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
repmgr_upgrade_extension() {
|
||||
repmgr_info "Upgrading repmgr extension..."
|
||||
|
||||
echo "ALTER EXTENSION repmgr UPDATE" | postgresql_execute "$REPMGR_DATABASE" "$REPMGR_USERNAME" "$REPMGR_PASSWORD"
|
||||
}
|
||||
|
||||
########################
|
||||
# Initialize repmgr service
|
||||
# Globals:
|
||||
|
|
@ -607,15 +627,23 @@ repmgr_initialize() {
|
|||
postgresql_set_property "port" "$POSTGRESQL_PORT_NUMBER"
|
||||
is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba
|
||||
if [[ "$REPMGR_ROLE" = "primary" ]]; then
|
||||
postgresql_start_bg
|
||||
repmgr_create_repmgr_user
|
||||
repmgr_create_repmgr_db
|
||||
# Restart PostgreSQL
|
||||
postgresql_stop
|
||||
postgresql_start_bg
|
||||
repmgr_register_primary
|
||||
# Allow running custom initialization scripts
|
||||
postgresql_custom_init_scripts
|
||||
if is_boolean_yes "$POSTGRESQL_FIRST_BOOT"; then
|
||||
postgresql_start_bg
|
||||
repmgr_create_repmgr_user
|
||||
repmgr_create_repmgr_db
|
||||
# Restart PostgreSQL
|
||||
postgresql_stop
|
||||
postgresql_start_bg
|
||||
repmgr_register_primary
|
||||
# Allow running custom initialization scripts
|
||||
postgresql_custom_init_scripts
|
||||
elif is_boolean_yes "$REPMGR_UPGRADE_EXTENSION"; then
|
||||
# Upgrade repmgr extension
|
||||
postgresql_start_bg
|
||||
repmgr_upgrade_extension
|
||||
else
|
||||
repmgr_debug "Skipping repmgr configuration..."
|
||||
fi
|
||||
else
|
||||
(( POSTGRESQL_MAJOR_VERSION >= 12 )) && postgresql_configure_recovery
|
||||
postgresql_start_bg
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
|
||||
* [`12-ol-7`, `12.0.0-ol-7-r1` (12/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-ol-7-r1/12/ol-7/Dockerfile)
|
||||
* [`12-debian-9`, `12.0.0-debian-9-r2`, `12`, `12.0.0`, `12.0.0-r2` (12/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-debian-9-r2/12/debian-9/Dockerfile)
|
||||
* [`12-centos-7`, `12.0.0-centos-7-r1` (12/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-centos-7-r1/12/centos-7/Dockerfile)
|
||||
* [`12-centos-7`, `12.0.0-centos-7-r2` (12/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-centos-7-r2/12/centos-7/Dockerfile)
|
||||
* [`11-ol-7`, `11.5.0-ol-7-r28` (11/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-ol-7-r28/11/ol-7/Dockerfile)
|
||||
* [`11-debian-9`, `11.5.0-debian-9-r23`, `11`, `11.5.0`, `11.5.0-r23`, `latest` (11/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-debian-9-r23/11/debian-9/Dockerfile)
|
||||
* [`11-centos-7`, `11.5.0-centos-7-r28` (11/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-centos-7-r28/11/centos-7/Dockerfile)
|
||||
|
|
|
|||
Loading…
Reference in New Issue