From b62554ceffc2f69ac023b95d9cf4f9973cb314e9 Mon Sep 17 00:00:00 2001 From: Dave Conroy Date: Wed, 22 Dec 2021 14:29:24 -0800 Subject: [PATCH] Release 2.10.0 - See CHANGELOG.md --- CHANGELOG.md | 7 + Dockerfile | 102 +--- .../etc/services.available/10-db-backup/run | 2 +- zabbix_templates/zabbix_agent_container.xml | 515 ------------------ 4 files changed, 11 insertions(+), 615 deletions(-) delete mode 100644 zabbix_templates/zabbix_agent_container.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 33eb339..d250349 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2.10.0 2021-12-22 + + ### Changed + - Revert back to Postgresql 14 from packages as its now in the repositories + - Fix for Zabbix Monitoring + + ## 2.9.7 2021-12-15 ### Changed diff --git a/Dockerfile b/Dockerfile index aa3ba3e..e190a17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,104 +5,8 @@ ENV MSSQL_VERSION=17.8.1.1-1 \ CONTAINER_ENABLE_MESSAGING=FALSE \ CONTAINER_ENABLE_MONITORING=TRUE -ENV LANG=en_US.utf8 \ - PG_MAJOR=14 \ - PG_VERSION=14.0 \ - PGDATA=/var/lib/postgresql/data - -### Create User Accounts -RUN set -ex && \ - addgroup -g 70 postgres && \ - adduser -S -D -H -h /var/lib/postgresql -s /bin/sh -G postgres -u 70 postgres && \ - mkdir -p /var/lib/postgresql && \ - chown -R postgres:postgres /var/lib/postgresql && \ - \ -### Install Dependencies - apk update && \ - apk upgrade && \ - apk add \ - openssl \ - && \ - \ - apk add --no-cache --virtual .postgres-build-deps \ - bison \ - build-base \ - coreutils \ - dpkg-dev \ - dpkg \ - flex \ - gcc \ - icu-dev \ - libc-dev \ - libedit-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - openssl-dev \ - perl-utils \ - perl-ipc-run \ - util-linux-dev \ - zlib-dev \ - && \ - \ -### Build Postgresql - mkdir -p /usr/src/postgresql && \ - curl -sSL "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2" | tar xvfj - --strip 1 -C /usr/src/postgresql && \ - cd /usr/src/postgresql && \ -# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian) -# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f - awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new && \ - grep '/var/run/postgresql' src/include/pg_config_manual.h.new && \ - mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h && \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && \ -# explicitly update autoconf config.guess and config.sub so they support more arches/libcs - wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb' && \ - wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb' && \ - ./configure \ - --build="$gnuArch" \ - --enable-integer-datetimes \ - --enable-thread-safety \ - --enable-tap-tests \ - --disable-rpath \ - --with-uuid=e2fs \ - --with-gnu-ld \ - --with-pgport=5432 \ - --with-system-tzdata=/usr/share/zoneinfo \ - --prefix=/usr/local \ - --with-includes=/usr/local/include \ - --with-libraries=/usr/local/lib \ - --with-openssl \ - --with-libxml \ - --with-libxslt \ - --with-icu \ - && \ - \ - make -j "$(nproc)" world && \ - make install-world && \ - make -C contrib install && \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )" && \ - apk add -t .postgres-additional-deps \ - $runDeps \ - && \ - \ -### Cleanup - apk del .postgres-build-deps && \ - cd / && \ - rm -rf \ - /usr/src/postgresql \ - /usr/local/share/doc \ - /usr/local/share/man && \ - find /usr/local -name '*.a' -delete && \ - rm -rf /var/cache/apk/* && \ - \ ### Dependencies - set -ex && \ +RUN set -ex && \ apk update && \ apk upgrade && \ apk add -t .db-backup-build-deps \ @@ -123,8 +27,8 @@ RUN set -ex && \ mongodb-tools \ libressl \ pigz \ - #postgresql \ # To reactivate when it appears in official repos with Alpine 3.15 - #postgresql-client \ # To reactivate when it appears in official repos with Alpine 3.15 + postgresql \ + postgresql-client \ redis \ sqlite \ xz \ diff --git a/install/etc/services.available/10-db-backup/run b/install/etc/services.available/10-db-backup/run index 19ef2bf..b56a1f7 100755 --- a/install/etc/services.available/10-db-backup/run +++ b/install/etc/services.available/10-db-backup/run @@ -504,7 +504,7 @@ print_debug "Backup routines Initialized on $(date)" esac ### Zabbix - if var_true "$CONTAINER_ENABLE_MONITORING}" ; then + if var_true "${CONTAINER_ENABLE_MONITORING}" ; then print_notice "Sending Backup Statistics to Zabbix" silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.size -o "$(stat -c%s "${DB_DUMP_TARGET}"/"${target}")" silent zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.datetime -o "$(date -r "${DB_DUMP_TARGET}"/"${target}" +'%s')" diff --git a/zabbix_templates/zabbix_agent_container.xml b/zabbix_templates/zabbix_agent_container.xml deleted file mode 100644 index 9532a0e..0000000 --- a/zabbix_templates/zabbix_agent_container.xml +++ /dev/null @@ -1,515 +0,0 @@ - - - 3.4 - 2018-02-02T19:04:27Z - - - Discovered Containers - - - Templates - - - - - - - - - {Service - ICMP:icmpping.max(3m)}=3 - 0 - - Cannot be pinged - 0 - - - 0 - 5 - - 0 - 0 - - - - - {Service - ICMP:icmppingloss.min(10m)}>50 - 0 - - Ping loss is too high - 0 - - - 0 - 4 - - 0 - 0 - - - Cannot be pinged - {Service - ICMP:icmpping.max(3m)}=3 - - - - - - - {Service - ICMP:icmppingsec.avg(2m)}>100 - 0 - - Ping Response time is too high - 0 - - - 0 - 4 - - 1 - 0 - - - Cannot be pinged - {Service - ICMP:icmpping.max(3m)}=3 - - - - - - - {Zabbix - Container Agent:packages.upgradable.last()}>0 - 0 - - Upgraded Packages in Container Available - 0 - - - 0 - 1 - - 0 - 0 - - - - - {Zabbix - Container Agent:agent.ping.nodata(3m)}=1 - 0 - - Zabbix agent is unreachable - 0 - - - 0 - 5 - - 0 - 0 - - - - - - - Service state - - - 0 - Down - - - 1 - Up - - - - - Zabbix agent ping status - - - 1 - Up - - - - -