11.5.0-centos-7-r26 release
This commit is contained in:
parent
8ce4808ffa
commit
a10bc749a3
|
|
@ -1,4 +1,4 @@
|
|||
FROM bitnami/centos-extras-base:7-r189
|
||||
FROM bitnami/centos-extras-base:7-r194
|
||||
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="11.5.0-centos-7-r25" \
|
||||
BITNAMI_IMAGE_VERSION="11.5.0-centos-7-r26" \
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -139,6 +139,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+")"
|
||||
|
|
@ -630,8 +642,8 @@ postgresql_custom_init_scripts() {
|
|||
postgresql_debug "Sourcing $f"; . "$f"
|
||||
fi
|
||||
;;
|
||||
*.sql) postgresql_debug "Executing $f"; postgresql_execute "$POSTGRESQL_DATABASE" "$POSTGRESQL_USERNAME" "$POSTGRESQL_PASSWORD" < "$f";;
|
||||
*.sql.gz) postgresql_debug "Executing $f"; gunzip -c "$f" | postgresql_execute "$POSTGRESQL_DATABASE" "$POSTGRESQL_USERNAME" "$POSTGRESQL_PASSWORD";;
|
||||
*.sql) postgresql_debug "Executing $f"; postgresql_execute "$POSTGRESQL_DATABASE" "$POSTGRESQL_INITSCRIPTS_USERNAME" "$POSTGRESQL_INITSCRIPTS_PASSWORD" < "$f";;
|
||||
*.sql.gz) postgresql_debug "Executing $f"; gunzip -c "$f" | postgresql_execute "$POSTGRESQL_DATABASE" "$POSTGRESQL_INITSCRIPTS_USERNAME" "$POSTGRESQL_INITSCRIPTS_PASSWORD";;
|
||||
*) postgresql_debug "Ignoring $f" ;;
|
||||
esac
|
||||
done
|
||||
|
|
|
|||
|
|
@ -436,24 +436,24 @@ repmgr_generate_repmgr_config() {
|
|||
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
|
||||
pg_bindir=$POSTGRESQL_BIN_DIR
|
||||
ssh_options='-o "StrictHostKeyChecking no" -v'
|
||||
use_replication_slots='${REPMGR_USE_REPLICATION_SLOTS}'
|
||||
pg_bindir='${POSTGRESQL_BIN_DIR}'
|
||||
|
||||
# FIXME: these 2 parameter should work
|
||||
node_id=$(repmgr_get_node_id)
|
||||
node_name=$REPMGR_NODE_NAME
|
||||
conninfo='user=$REPMGR_USERNAME password=$REPMGR_PASSWORD host=$REPMGR_NODE_NETWORK_NAME dbname=$REPMGR_DATABASE port=$REPMGR_PRIMARY_PORT connect_timeout=$REPMGR_CONNECT_TIMEOUT'
|
||||
failover=automatic
|
||||
promote_command='PGPASSWORD=$REPMGR_PASSWORD repmgr standby promote -f "$REPMGR_CONF_FILE" --log-level DEBUG --verbose'
|
||||
follow_command='PGPASSWORD=$REPMGR_PASSWORD repmgr standby follow -f "$REPMGR_CONF_FILE" -W --log-level DEBUG --verbose'
|
||||
reconnect_attempts=$REPMGR_RECONNECT_ATTEMPTS
|
||||
reconnect_interval=$REPMGR_RECONNECT_INTERVAL
|
||||
log_level=$REPMGR_LOG_LEVEL
|
||||
priority=$REPMGR_NODE_PRIORITY
|
||||
degraded_monitoring_timeout=$REPMGR_DEGRADED_MONITORING_TIMEOUT
|
||||
data_directory=$POSTGRESQL_DATA_DIR
|
||||
async_query_timeout=$REPMGR_MASTER_RESPONSE_TIMEOUT
|
||||
node_name='${REPMGR_NODE_NAME}'
|
||||
conninfo='user=${REPMGR_USERNAME} password=${REPMGR_PASSWORD} host=${REPMGR_NODE_NETWORK_NAME} dbname=${REPMGR_DATABASE} port=${REPMGR_PRIMARY_PORT} connect_timeout=${REPMGR_CONNECT_TIMEOUT}'
|
||||
failover='automatic'
|
||||
promote_command='PGPASSWORD=${REPMGR_PASSWORD} repmgr standby promote -f "${REPMGR_CONF_FILE}" --log-level DEBUG --verbose'
|
||||
follow_command='PGPASSWORD=${REPMGR_PASSWORD} repmgr standby follow -f "${REPMGR_CONF_FILE}" -W --log-level DEBUG --verbose'
|
||||
reconnect_attempts='${REPMGR_RECONNECT_ATTEMPTS}'
|
||||
reconnect_interval='${REPMGR_RECONNECT_INTERVAL}'
|
||||
log_level='${REPMGR_LOG_LEVEL}'
|
||||
priority='${REPMGR_NODE_PRIORITY}'
|
||||
degraded_monitoring_timeout='${REPMGR_DEGRADED_MONITORING_TIMEOUT}'
|
||||
data_directory='${POSTGRESQL_DATA_DIR}'
|
||||
async_query_timeout='${REPMGR_MASTER_RESPONSE_TIMEOUT}'
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
|
@ -504,7 +504,7 @@ repmgr_wait_primary_node() {
|
|||
#########################
|
||||
repmgr_clone_primary() {
|
||||
repmgr_info "Cloning data from primary node..."
|
||||
local -r flags=("-h" "$REPMGR_CURRENT_PRIMARY_HOST" "-p" "$REPMGR_PRIMARY_PORT" "-U" "$REPMGR_USERNAME" "-d" "$REPMGR_DATABASE" "-D" "$POSTGRESQL_DATA_DIR" "standby" "clone" "--fast-checkpoint" "--force")
|
||||
local -r flags=("-f" "$REPMGR_CONF_FILE" "-h" "$REPMGR_CURRENT_PRIMARY_HOST" "-p" "$REPMGR_PRIMARY_PORT" "-U" "$REPMGR_USERNAME" "-d" "$REPMGR_DATABASE" "-D" "$POSTGRESQL_DATA_DIR" "standby" "clone" "--fast-checkpoint" "--force")
|
||||
|
||||
PGPASSWORD="$REPMGR_PASSWORD" debug_execute "${REPMGR_BIN_DIR}/repmgr" "${flags[@]}"
|
||||
}
|
||||
|
|
@ -545,7 +545,7 @@ repmgr_register_primary() {
|
|||
}
|
||||
|
||||
########################
|
||||
# Unregister secondary node
|
||||
# Unregister standby node
|
||||
# Globals:
|
||||
# REPMGR_*
|
||||
# Arguments:
|
||||
|
|
@ -554,13 +554,16 @@ repmgr_register_primary() {
|
|||
# None
|
||||
#########################
|
||||
repmgr_unregister_standby() {
|
||||
repmgr_info "Unregistering secondary node..."
|
||||
repmgr_info "Unregistering standby node..."
|
||||
|
||||
echo "DELETE FROM repmgr.nodes WHERE conninfo LIKE '%host=$REPMGR_NODE_NETWORK_NAME%'" | postgresql_execute "$REPMGR_DATABASE" "$REPMGR_USERNAME" "$REPMGR_PASSWORD" "$REPMGR_CURRENT_PRIMARY_HOST" "$REPMGR_PRIMARY_PORT"
|
||||
local -r flags=("standby" "unregister" "-f" "$REPMGR_CONF_FILE" "--node-id=$(repmgr_get_node_id)")
|
||||
|
||||
# The command below can fail when the node doesn't exist yet
|
||||
debug_execute "${REPMGR_BIN_DIR}/repmgr" "${flags[@]}" || true
|
||||
}
|
||||
|
||||
########################
|
||||
# Resgister a node as secondary
|
||||
# Resgister a node as standby
|
||||
# Globals:
|
||||
# REPMGR_*
|
||||
# Arguments:
|
||||
|
|
@ -570,7 +573,7 @@ repmgr_unregister_standby() {
|
|||
#########################
|
||||
repmgr_register_standby() {
|
||||
repmgr_info "Registering Standby node..."
|
||||
local -r flags=("-f" "$REPMGR_CONF_FILE" "standby" "register" "--force")
|
||||
local -r flags=("standby" "register" "-f" "$REPMGR_CONF_FILE" "--force" "--verbose")
|
||||
|
||||
debug_execute "${REPMGR_BIN_DIR}/repmgr" "${flags[@]}"
|
||||
}
|
||||
|
|
@ -603,8 +606,8 @@ repmgr_initialize() {
|
|||
# Configure port and restrict access to PostgreSQL (MD5)
|
||||
postgresql_set_property "port" "$POSTGRESQL_PORT_NUMBER"
|
||||
is_boolean_yes "$REPMGR_PGHBA_TRUST_ALL" || postgresql_restrict_pghba
|
||||
postgresql_start_bg
|
||||
if [[ "$REPMGR_ROLE" = "primary" ]]; then
|
||||
postgresql_start_bg
|
||||
repmgr_create_repmgr_user
|
||||
repmgr_create_repmgr_db
|
||||
# Restart PostgreSQL
|
||||
|
|
@ -614,6 +617,8 @@ repmgr_initialize() {
|
|||
# Allow running custom initialization scripts
|
||||
postgresql_custom_init_scripts
|
||||
else
|
||||
(( POSTGRESQL_MAJOR_VERSION >= 12 )) && postgresql_configure_recovery
|
||||
postgresql_start_bg
|
||||
repmgr_unregister_standby
|
||||
repmgr_register_standby
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -43,9 +43,10 @@ Bitnami containers can be used with [Kubeapps](https://kubeapps.com/) for deploy
|
|||
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/).
|
||||
|
||||
|
||||
* [`12-debian-9`, `12.0.0-debian-9-r0`, `12`, `12.0.0`, `12.0.0-r0` (12/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.0.0-debian-9-r0/12/debian-9/Dockerfile)
|
||||
* [`11-ol-7`, `11.5.0-ol-7-r25` (11/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-ol-7-r25/11/ol-7/Dockerfile)
|
||||
* [`11-debian-9`, `11.5.0-debian-9-r21`, `11`, `11.5.0`, `11.5.0-r21`, `latest` (11/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-debian-9-r21/11/debian-9/Dockerfile)
|
||||
* [`11-centos-7`, `11.5.0-centos-7-r25` (11/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-centos-7-r25/11/centos-7/Dockerfile)
|
||||
* [`11-centos-7`, `11.5.0-centos-7-r26` (11/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.5.0-centos-7-r26/11/centos-7/Dockerfile)
|
||||
* [`10-ol-7`, `10.10.0-ol-7-r25` (10/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.10.0-ol-7-r25/10/ol-7/Dockerfile)
|
||||
* [`10-debian-9`, `10.10.0-debian-9-r20`, `10`, `10.10.0`, `10.10.0-r20` (10/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.10.0-debian-9-r20/10/debian-9/Dockerfile)
|
||||
* [`10-centos-7`, `10.10.0-centos-7-r26` (10/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.10.0-centos-7-r26/10/centos-7/Dockerfile)
|
||||
|
|
@ -53,7 +54,6 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
* [`9.6-debian-9`, `9.6.15-debian-9-r20`, `9.6`, `9.6.15`, `9.6.15-r20` (9.6/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/9.6.15-debian-9-r20/9.6/debian-9/Dockerfile)
|
||||
* [`9.6-centos-7`, `9.6.15-centos-7-r25` (9.6/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/9.6.15-centos-7-r25/9.6/centos-7/Dockerfile)
|
||||
* [`12-ol-7`, `0.0.0-ol-7-r0` (12/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/0.0.0-ol-7-r0/12/ol-7/Dockerfile)
|
||||
* [`12-debian-9`, `0.0.0-debian-9-r0`, `12`, `0.0.0`, `0.0.0-r0` (12/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/0.0.0-debian-9-r0/12/debian-9/Dockerfile)
|
||||
* [`12-centos-7`, `0.0.0-centos-7-r0` (12/centos-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/0.0.0-centos-7-r0/12/centos-7/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/postgresql-repmgr GitHub repo](https://github.com/bitnami/bitnami-docker-postgresql-repmgr).
|
||||
|
|
|
|||
Loading…
Reference in New Issue