Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 81bfbd1

Browse files
authored
Merge branch 'master' into dmius-ebs-vol
2 parents 819e086 + 841e5ee commit 81bfbd1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ ADD ./postgresql_${PG_SERVER_VERSION}_tweak.conf /postgresql.tweak.conf
1717
# - pgbadger (modified, not lowercasing DB object names, auto_explain compatibility)
1818
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 \
1919
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"> /etc/apt/sources.list.d/pgdg.list \
20-
&& apt-get update && apt-get install -y sudo postgresql-$PG_SERVER_VERSION postgresql-contrib-$PG_SERVER_VERSION postgresql-plpython-$PG_SERVER_VERSION \
21-
&& apt-get install -y postgresql-$PG_SERVER_VERSION-plsh postgresql-server-dev-$PG_SERVER_VERSION postgresql-$PG_SERVER_VERSION-rum \
20+
&& apt-get update && apt-get install -y sudo postgresql-$PG_SERVER_VERSION \
21+
&& apt-get install -y postgresql-contrib-$PG_SERVER_VERSION postgresql-plpython-$PG_SERVER_VERSION \
22+
&& apt-get install -y postgresql-$PG_SERVER_VERSION-plsh postgresql-server-dev-$PG_SERVER_VERSION \
23+
&& apt-get install -y postgresql-$PG_SERVER_VERSION-rum \
2224
&& apt-get install -y git postgresql-client-10 pspg pgreplay jq etcd libjson-xs-perl \
2325
&& perl -MCPAN -e'install Text::CSV_XS' \
2426
&& git clone https://github.com/NikolayS/postgres_dba.git /root/postgres_dba \
@@ -41,7 +43,7 @@ RUN echo "\\set dba '\\\\\\\\i /root/postgres_dba/start.psql'" >> ~/.psqlrc \
4143
&& /etc/init.d/postgresql start && psql -U postgres -c 'create database test;' && /etc/init.d/postgresql stop \
4244
&& cat /postgresql.tweak.conf >> /etc/postgresql/$PG_SERVER_VERSION/main/postgresql.conf \
4345
&& echo "#!/bin/bash" > /pg_start.sh && chmod a+x /pg_start.sh \
44-
&& printf "sudo -u postgres /usr/lib/postgresql/$PG_SERVER_VERSION/bin/postgres -D /var/lib/postgresql/$PG_SERVER_VERSION/main -c config_file=/etc/ postgresql/$PG_SERVER_VERSION/main/postgresql.conf & \n" >> /pg_start.sh \
46+
&& printf "sudo -u postgres /usr/lib/postgresql/$PG_SERVER_VERSION/bin/postgres -D /var/lib/postgresql/$PG_SERVER_VERSION/main -c config_file=/etc/postgresql/$PG_SERVER_VERSION/main/postgresql.conf & \n" >> /pg_start.sh \
4547
&& echo "etcd" >> /pg_start.sh
4648

4749
EXPOSE 5432
@@ -50,4 +52,3 @@ EXPOSE 5432
5052

5153
# etcd is not being actually used (it's for future needs), but it allows restart Postgres with container interruption
5254
CMD ["/pg_start.sh"]
53-

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ How to build/rebuild:
33
```bash
44
docker build --build-arg PG_SERVER_VERSION=9.6 -t postgresmen/postgres-with-stuff:pg9.6 .
55
docker login # you must be registered, go to hub.docker.com
6-
doker push postgresmen/postgres-with-stuff:pg9.6
6+
docker push postgresmen/postgres-with-stuff:pg9.6
77
```

nancy_run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,14 @@ function destroyDockerMachine() {
564564

565565
function cleanupAndExit {
566566
echo "Remove temp files..." # if exists
567+
docker $dockerConfig exec -i ${containerHash} sh -c "sudo rm -rf $MACHINE_HOME"
567568
rm -f "$TMP_PATH/after_db_init_code_tmp.sql"
568569
rm -f "$TMP_PATH/workload_custom_sql_tmp.sql"
569570
rm -f "$TMP_PATH/target_ddl_do_tmp.sql"
570571
rm -f "$TMP_PATH/target_ddl_undo_tmp.sql"
571572
rm -f "$TMP_PATH/target_config_tmp.conf"
572573
rm -f "$TMP_PATH/pg_config_tmp.conf"
573574
if [ "$RUN_ON" = "localhost" ]; then
574-
rm -rf "$TMP_PATH/nancy_${containerHash}"
575575
echo "Remove docker container"
576576
docker container rm -f $containerHash
577577
elif [ "$RUN_ON" = "aws" ]; then
@@ -830,6 +830,7 @@ docker_exec bash -c "/root/pgbadger/pgbadger \
830830
-j $(cat /proc/cpuinfo | grep processor | wc -l) \
831831
--prefix '%t [%p]: [%l-1] db=%d,user=%u (%a,%h)' /var/log/postgresql/* -f stderr \
832832
-o $MACHINE_HOME/$ARTIFACTS_FILENAME.json"
833+
#2> >(grep -v "install the Text::CSV_XS" >&2)
833834

834835
logpath=$( \
835836
docker_exec bash -c "psql -XtU postgres \

0 commit comments

Comments
 (0)