Skip to content

Commit

Permalink
Merge pull request #32 from CrunchyData/master
Browse files Browse the repository at this point in the history
Sync down to fork.
  • Loading branch information
steve-hetzel committed Feb 9, 2018
2 parents 2d284fe + 80420f6 commit 23f7825
Show file tree
Hide file tree
Showing 236 changed files with 785 additions and 547 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ gendeps:
godep save \
github.com/crunchydata/crunchy-containers/dba \
github.com/crunchydata/crunchy-containers/collectapi \
github.com/crunchydata/crunchy-containers/badger \
github.com/crunchydata/crunchy-containers/cct
github.com/crunchydata/crunchy-containers/badger

docbuild:
cd docs && ./build-docs.sh
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
== Crunchy PostgreSQL Containers
v1.7.1, {docdate}
v1.8.0, {docdate}

image::images/crunchy_logo.png?raw=true[]

Expand Down
7 changes: 4 additions & 3 deletions bin/common/common_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

export LD_PRELOAD=/usr/lib64/libnss_wrapper.so
export NSS_WRAPPER_PASSWD=/tmp/passwd
export NSS_WRAPPER_GROUP=/tmp/group

function enable_debugging() {
if [[ ${DEBUG:-false} == "true" ]]
Expand All @@ -27,7 +31,4 @@ function ose_hack() {
export GROUP_ID=$(id -g)
envsubst < /opt/cpm/conf/passwd.template > /tmp/passwd
envsubst < /opt/cpm/conf/group.template > /tmp/group
export LD_PRELOAD=/usr/lib64/libnss_wrapper.so
export NSS_WRAPPER_PASSWD=/tmp/passwd
export NSS_WRAPPER_GROUP=/tmp/group
}
12 changes: 0 additions & 12 deletions bin/postgres/sshd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

source /opt/cpm/bin/common_lib.sh
enable_debugging

function start_sshd() {
ose_hack

echo "Creating ${HOME?}/.ssh directory..."
mkdir -p ${HOME?}/.ssh
chmod 755 ${HOME?}/.ssh

echo 'Checking for SSH Host Keys in /sshd...'

if [[ ! -f /sshd/ssh_host_rsa_key ]]; then
Expand All @@ -43,9 +34,6 @@ function start_sshd() {
exit 1
fi

cp /pgconf/authorized_keys ${HOME?}/.ssh/authorized_keys
chmod 644 ${HOME?}/.ssh/authorized_keys

echo 'Checking for sshd_config in /pgconf...'

if [[ ! -f /pgconf/sshd_config ]]; then
Expand Down
1 change: 1 addition & 0 deletions bin/postgres/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

source /opt/cpm/bin/common_lib.sh
enable_debugging
ose_hack

function trap_sigterm() {
echo "Doing trap logic..." >> $PGDATA/trap.output
Expand Down
2 changes: 1 addition & 1 deletion bin/remove-all-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

for i in \
postgres-gis prometheus promgateway grafana collect pgbadger pgpool \
restore dump postgres-gis prometheus promgateway grafana collect pgbadger pgpool \
watch backup postgres pgbouncer pgadmin4 vacuum dba upgrade backrest-restore
do
docker rmi -f crunchydata/crunchy-$i:$CCP_IMAGE_TAG
Expand Down
2 changes: 1 addition & 1 deletion bin/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

CCP_VERSION=1.7.1
CCP_VERSION=1.8.0
REGISTRY=52.2.93.43:5000
containers="crunchydata/crunchy-vacuum crunchydata/crunchy-prometheus crunchydata/crunchy-promgateway crunchydata/crunchy-grafana crunchydata/crunchy-collect crunchydata/crunchy-pgbadger crunchydata/crunchy-pgpool crunchydata/crunchy-watch crunchydata/crunchy-backup crunchydata/crunchy-postgres"
for i in $containers;
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.backrest-restore.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Executes the pgbackrest utility, allowing FULL & DELTA restore capability." \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.backup.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/backup" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Performs a pg_basebackup full database backup on a database container" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.collect.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/collect" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Provides metrics for crunchy-postgres" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.pgadmin4.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgadmin4" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.2" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Crunchy Data pgAdmin4 GUI utility" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.pgbadger.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgbadger" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="HTTP wrapper around the PGBadger PostgreSQL utility" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.pgbouncer.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgbouncer" \
version="7.3" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Lightweight connection pooler for crunchy-postgres" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.pgdump.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/dump" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Performs a pg_dump on a database container" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.pgpool.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgpool" \
version="7.3" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Contains the pgpool utility as a PostgreSQL-aware load balancer" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.pgrestore.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/restore" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-31" \
url="https://crunchydata.com" \
summary="Performs a pg_restore on a database container" \
Expand Down
7 changes: 6 additions & 1 deletion centos7/10/Dockerfile.postgres-gis.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres-gis" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Includes PostGIS extensions on top of crunchy-postgres" \
Expand Down Expand Up @@ -38,7 +38,12 @@ RUN yum -y update && yum -y install epel-release \
ENV PGROOT="/usr/pgsql-${PGVERSION}"

# add path settings for postgres user
# bash_profile is loaded in login, but not with exec
# bashrc to set permissions in OCP when using exec
# HOME is / in OCP
ADD conf/.bash_profile /var/lib/pgsql/
ADD conf/.bash_profile /
ADD conf/.bashrc /

RUN mkdir -p /opt/cpm/bin /opt/cpm/conf /pgdata /pgwal /pgconf /backup /recover /backrestrepo /sshd

Expand Down
7 changes: 6 additions & 1 deletion centos7/10/Dockerfile.postgres.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="PostgreSQL 10.1 (PGDG) on a Centos7 base image" \
Expand Down Expand Up @@ -37,7 +37,12 @@ RUN yum -y update && yum -y install epel-release \
ENV PGROOT="/usr/pgsql-${PGVERSION}"

# add path settings for postgres user
# bash_profile is loaded in login, but not with exec
# bashrc to set permissions in OCP when using exec
# HOME is / in OCP
ADD conf/.bash_profile /var/lib/pgsql/
ADD conf/.bash_profile /
ADD conf/.bashrc /

RUN mkdir -p /opt/cpm/bin /opt/cpm/conf /pgdata /pgwal /pgconf /backup /recover /backrestrepo /sshd

Expand Down
2 changes: 1 addition & 1 deletion centos7/10/Dockerfile.upgrade.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/upgrade" \
PostgresVersion="10" \
PostgresFullVersion="10.1" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Provides a pg_upgrade capability that performs a major PostgreSQL upgrade." \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.backrest-restore.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres" \
PostgresVersion="9.5" \
PostgresFullVersion="9.5.10" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Executes the pgbackrest utility, allowing FULL & DELTA restore capability." \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.backup.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/backup" \
PostgresRelease="9.5" \
PostgresFullRelease="9.5.10" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Performs a pg_basebackup full database backup on a database container" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.collect.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/collect" \
PostgresFullVersion="9.5.10" \
vendor="crunchy data" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Provides metrics for crunchy-postgres" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.pgadmin4.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgadmin4" \
PostgresVersion="9.5" \
PostgresFullVersion="9.5.10" \
version="7.3" \
release="1.7.2" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Crunchy Data pgAdmin4 GUI utility" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.pgbadger.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgbadger" \
PostgresFullVersion="9.5.10" \
vendor="crunchy data" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="HTTP wrapper around the PGBadger PostgreSQL utilityr" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.pgbouncer.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgbouncer" \
PostgresFullVersion="9.5.10" \
vendor="crunchy data" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Lightweight connection pooler for crunchy-postgres" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.pgdump.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/dump" \
PostgresRelease="9.5" \
PostgresFullRelease="9.5.10" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Performs a pg_dump on a database container" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.pgpool.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgpool" \
PostgresFullVersion="9.5.10" \
vendor="crunchy data" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Contains the pgpool utility as a PostgreSQL-aware load balancer" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.5/Dockerfile.pgrestore.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/restore" \
PostgresRelease="9.5" \
PostgresFullRelease="9.5.10" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-31" \
url="https://crunchydata.com" \
summary="Performs a pg_restore on a database container" \
Expand Down
7 changes: 6 additions & 1 deletion centos7/9.5/Dockerfile.postgres-gis.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres-gis" \
PostgresVersion="9.5" \
PostgresFullVersion="9.5.10" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Includes PostGIS extensions on top of crunchy-postgres" \
Expand Down Expand Up @@ -38,7 +38,12 @@ RUN yum -y update && yum -y install epel-release \
ENV PGROOT="/usr/pgsql-${PGVERSION}"

# add path settings for postgres user
# bash_profile is loaded in login, but not with exec
# bashrc to set permissions in OCP when using exec
# HOME is / in OCP
ADD conf/.bash_profile /var/lib/pgsql/
ADD conf/.bash_profile /
ADD conf/.bashrc /

# set up cpm directory
RUN mkdir -p /opt/cpm/bin /opt/cpm/conf /pgdata /pgwal /pgconf /backup /recover /backrestrepo /sshd
Expand Down
7 changes: 6 additions & 1 deletion centos7/9.5/Dockerfile.postgres.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres" \
PostgresVersion="9.5" \
PostgresFullVersion="9.5.10" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="PostgreSQL 9.5/9.6 (PGDG) on a Centos7 base image" \
Expand Down Expand Up @@ -37,7 +37,12 @@ RUN yum -y update && yum -y install epel-release \
ENV PGROOT="/usr/pgsql-${PGVERSION}"

# add path settings for postgres user
# bash_profile is loaded in login, but not with exec
# bashrc to set permissions in OCP when using exec
# HOME is / in OCP
ADD conf/.bash_profile /var/lib/pgsql/
ADD conf/.bash_profile /
ADD conf/.bashrc /

# set up cpm directory
RUN mkdir -p /opt/cpm/bin /opt/cpm/conf /pgdata /pgwal /pgconf /backup /recover /backrestrepo /sshd
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.6/Dockerfile.backrest-restore.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/postgres" \
PostgresVersion="9.6" \
PostgresFullVersion="9.6.6" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Executes the pgbackrest utility, allowing FULL & DELTA restore capability." \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.6/Dockerfile.backup.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/backup" \
PostgresVersion="9.6" \
PostgresFullVersion="9.6.6" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Performs a pg_basebackup full database backup on a database container" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.6/Dockerfile.collect.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/collect" \
PostgresVersion="9.6" \
PostgresFullVersion="9.6.6" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Provides metrics for crunchy-postgres" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.6/Dockerfile.pgadmin4.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgadmin4" \
PostgresVersion="9.5" \
PostgresFullVersion="9.5.10" \
version="7.3" \
release="1.7.2" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="Crunchy Data pgAdmin4 GUI utility" \
Expand Down
2 changes: 1 addition & 1 deletion centos7/9.6/Dockerfile.pgbadger.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL name="crunchydata/pgbadger" \
PostgresVersion="9.6" \
PostgresFullVersion="9.6.6" \
version="7.3" \
release="1.7.1" \
release="1.8.0" \
build-date="2018-01-30" \
url="https://crunchydata.com" \
summary="HTTP wrapper around the PGBadger PostgreSQL utility" \
Expand Down
Loading

0 comments on commit 23f7825

Please sign in to comment.