Commit a83efa18 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] postgres 9.5 in parallel to pg10 for core v8

parent 2046926a
......@@ -5,9 +5,12 @@ set -x
apt-get update
## ondrej with php 7.0
# ondrej with php 7.0
echo deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main > /etc/apt/sources.list.d/php.list
# postgres with 9.5 next to 10
echo deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main > /etc/apt/sources.list.d/postgres.list
minimal_apt_get_install \
dirmngr \
gpg-agent \
......@@ -18,6 +21,8 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
E5267A6C \
#
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# mssql and tools
# curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
# curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
......
......@@ -3,10 +3,12 @@ set -e
source /pd_build/buildconfig
set -x
## Install MariaDB
# Install postgres 9.5 and 10
minimal_apt_get_install \
postgresql \
postgresql-10 \
postgresql-9.5 \
#
## Enable postgres
# Enable postgres
cp -a /pd_build/runit/postgres /etc/service/postgres
cp -a /pd_build/runit/postgres95 /etc/service/postgres95
#!/bin/sh
rm -rf /var/lib/postgresql/*
chmod 700 /var/lib/postgresql/
chown postgres:postgres /var/lib/postgresql/
su postgres -c "/usr/lib/postgresql/10/bin/initdb --pgdata=/var/lib/postgresql --encoding=UTF8 --no-locale"
rm -rf /var/lib/postgresql/10/*
chmod 700 /var/lib/postgresql/10/
chown postgres:postgres /var/lib/postgresql/10/
su postgres -c "/usr/lib/postgresql/10/bin/initdb --pgdata=/var/lib/postgresql/10 --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init.sql
echo "CREATE USER root;" >> ./init.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init.sql
echo "ALTER USER root SUPERUSER;" >> ./init.sql
su postgres -c '/usr/lib/postgresql/10/bin/postgres --single -D /var/lib/postgresql < ./init.sql'
su postgres -c '/usr/lib/postgresql/10/bin/postgres --single -D /var/lib/postgresql/10 < ./init.sql'
rm ./init.sql
# more opts to check
......@@ -16,4 +16,4 @@ rm ./init.sql
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql
exec chpst -u postgres /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10
#!/bin/sh
mkdir -p /var/log/postgresql95
exec svlogd -tt /var/log/postgresql95
#!/bin/sh
rm -rf /var/lib/postgresql/9.5/*
chmod 700 /var/lib/postgresql/9.5/
chown postgres:postgres /var/lib/postgresql/9.5/
su postgres -c "/usr/lib/postgresql/9.5/bin/initdb --pgdata=/var/lib/postgresql/9.5 --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init95.sql
echo "CREATE USER root;" >> ./init95.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init95.sql
echo "ALTER USER root SUPERUSER;" >> ./init95.sql
su postgres -c '/usr/lib/postgresql/9.5/bin/postgres --single -D /var/lib/postgresql/9.5 < ./init95.sql'
rm ./init95.sql
# more opts to check
#--fsync=off --shared-buffers=2MB --temp-buffers=800kB --work-mem=64kB --maintenance-work-mem=1024kB
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5 -p 5433
......@@ -8,6 +8,9 @@ apt-get update
# ondrej with php 7.1
echo deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main > /etc/apt/sources.list.d/php.list
# postgres with 9.5 next to 10
echo deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main > /etc/apt/sources.list.d/postgres.list
minimal_apt_get_install \
dirmngr \
gpg-agent \
......@@ -18,6 +21,8 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
E5267A6C \
#
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# mssql and tools
# curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
# curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
......
......@@ -3,10 +3,12 @@ set -e
source /pd_build/buildconfig
set -x
## Install MariaDB
# Install postgres 9.5 and 10
minimal_apt_get_install \
postgresql \
postgresql-10 \
postgresql-9.5 \
#
## Enable postgres
# Enable postgres
cp -a /pd_build/runit/postgres /etc/service/postgres
cp -a /pd_build/runit/postgres95 /etc/service/postgres95
#!/bin/sh
rm -rf /var/lib/postgresql/*
chmod 700 /var/lib/postgresql/
chown postgres:postgres /var/lib/postgresql/
su postgres -c "/usr/lib/postgresql/10/bin/initdb --pgdata=/var/lib/postgresql --encoding=UTF8 --no-locale"
rm -rf /var/lib/postgresql/10/*
chmod 700 /var/lib/postgresql/10/
chown postgres:postgres /var/lib/postgresql/10/
su postgres -c "/usr/lib/postgresql/10/bin/initdb --pgdata=/var/lib/postgresql/10 --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init.sql
echo "CREATE USER root;" >> ./init.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init.sql
echo "ALTER USER root SUPERUSER;" >> ./init.sql
su postgres -c '/usr/lib/postgresql/10/bin/postgres --single -D /var/lib/postgresql < ./init.sql'
su postgres -c '/usr/lib/postgresql/10/bin/postgres --single -D /var/lib/postgresql/10 < ./init.sql'
rm ./init.sql
# more opts to check
......@@ -16,4 +16,4 @@ rm ./init.sql
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql
exec chpst -u postgres /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10
#!/bin/sh
mkdir -p /var/log/postgresql95
exec svlogd -tt /var/log/postgresql95
#!/bin/sh
rm -rf /var/lib/postgresql/9.5/*
chmod 700 /var/lib/postgresql/9.5/
chown postgres:postgres /var/lib/postgresql/9.5/
su postgres -c "/usr/lib/postgresql/9.5/bin/initdb --pgdata=/var/lib/postgresql/9.5 --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init95.sql
echo "CREATE USER root;" >> ./init95.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init95.sql
echo "ALTER USER root SUPERUSER;" >> ./init95.sql
su postgres -c '/usr/lib/postgresql/9.5/bin/postgres --single -D /var/lib/postgresql/9.5 < ./init95.sql'
rm ./init95.sql
# more opts to check
#--fsync=off --shared-buffers=2MB --temp-buffers=800kB --work-mem=64kB --maintenance-work-mem=1024kB
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5 -p 5433
......@@ -5,11 +5,16 @@ set -x
apt-get update
# postgres with 9.5 next to 10
echo deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main > /etc/apt/sources.list.d/postgres.list
minimal_apt_get_install \
dirmngr \
gpg-agent \
#
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# mssql and tools
# curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
# curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
......
......@@ -3,10 +3,12 @@ set -e
source /pd_build/buildconfig
set -x
## Install MariaDB
# Install postgres 9.5 and 10
minimal_apt_get_install \
postgresql \
postgresql-10 \
postgresql-9.5 \
#
## Enable postgres
# Enable postgres
cp -a /pd_build/runit/postgres /etc/service/postgres
cp -a /pd_build/runit/postgres95 /etc/service/postgres95
#!/bin/sh
rm -rf /var/lib/postgresql/*
chmod 700 /var/lib/postgresql/
chown postgres:postgres /var/lib/postgresql/
su postgres -c "/usr/lib/postgresql/10/bin/initdb --pgdata=/var/lib/postgresql --encoding=UTF8 --no-locale"
rm -rf /var/lib/postgresql/10/*
chmod 700 /var/lib/postgresql/10/
chown postgres:postgres /var/lib/postgresql/10/
su postgres -c "/usr/lib/postgresql/10/bin/initdb --pgdata=/var/lib/postgresql/10 --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init.sql
echo "CREATE USER root;" >> ./init.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init.sql
echo "ALTER USER root SUPERUSER;" >> ./init.sql
su postgres -c '/usr/lib/postgresql/10/bin/postgres --single -D /var/lib/postgresql < ./init.sql'
su postgres -c '/usr/lib/postgresql/10/bin/postgres --single -D /var/lib/postgresql/10 < ./init.sql'
rm ./init.sql
# more opts to check
......@@ -16,4 +16,4 @@ rm ./init.sql
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql
exec chpst -u postgres /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10
#!/bin/sh
mkdir -p /var/log/postgresql95
exec svlogd -tt /var/log/postgresql95
#!/bin/sh
rm -rf /var/lib/postgresql/9.5/*
chmod 700 /var/lib/postgresql/9.5/
chown postgres:postgres /var/lib/postgresql/9.5/
su postgres -c "/usr/lib/postgresql/9.5/bin/initdb --pgdata=/var/lib/postgresql/9.5 --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init95.sql
echo "CREATE USER root;" >> ./init95.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init95.sql
echo "ALTER USER root SUPERUSER;" >> ./init95.sql
su postgres -c '/usr/lib/postgresql/9.5/bin/postgres --single -D /var/lib/postgresql/9.5 < ./init95.sql'
rm ./init95.sql
# more opts to check
#--fsync=off --shared-buffers=2MB --temp-buffers=800kB --work-mem=64kB --maintenance-work-mem=1024kB
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5 -p 5433
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment