PoWA for Postgres

master
Jeff Moe 6 years ago
parent e24f32edf5
commit be6d631cbf

@ -40,3 +40,5 @@ pg_top
# Misc # Misc
# pspg - PostgreSQL pager # pspg - PostgreSQL pager
# pgcli -- command line # pgcli -- command line
##############################################################################

@ -14,6 +14,8 @@ vim /etc/postgresql/10/main/postgresql.conf
# Change: # Change:
# shared_preload_libraries to (keeping citus): # shared_preload_libraries to (keeping citus):
shared_preload_libraries='citus,pg_stat_statements,powa,pg_stat_kcache,pg_qualstats' shared_preload_libraries='citus,pg_stat_statements,powa,pg_stat_kcache,pg_qualstats'
# Enable:
track_io_timing = on
# Create databases, run on each pg1 pg2 pg3 pg4 server: # Create databases, run on each pg1 pg2 pg3 pg4 server:
psql psql
@ -45,18 +47,56 @@ apt install python python-psycopg2 python-sqlalchemy python-tornado
wget -O powa-web-3.1.4.tar.gz https://github.com/powa-team/powa-web/archive/3.1.4.tar.gz wget -O powa-web-3.1.4.tar.gz https://github.com/powa-team/powa-web/archive/3.1.4.tar.gz
tar -zxvf powa-web-3.1.4.tar.gz tar -zxvf powa-web-3.1.4.tar.gz
cd powa-web-3.1.4 cd powa-web-3.1.4
cp ./powa-web.conf-dist ./powa-web.conf # cp ./powa-web.conf-dist ./powa-web.conf
cat > powa-web.conf <<EOF
servers={
'pg1': {
'host': '10.52.1.91',
'port': '5432',
'database': 'powa',
'query': {'client_encoding': 'utf8'}
},
'pg2': {
'host': '10.52.1.92',
'port': '5432',
'database': 'powa',
'query': {'client_encoding': 'utf8'}
},
'pg3': {
'host': '10.52.1.93',
'port': '5432',
'database': 'powa',
'query': {'client_encoding': 'utf8'}
},
'pg4': {
'host': '10.52.1.94',
'port': '5432',
'database': 'powa',
'query': {'client_encoding': 'utf8'}
}
}
cookie_secret="password"
EOF
./powa-web ./powa-web
# XXX setup user, startup scripts, etc. # XXX setup user, startup scripts, etc.
# From git version: XXX fail:
# Unable to connect: powa-archivist version 3.1.X does not match powa-web version 3.2.X
git clone https://github.com/powa-team/powa-web
# Last version from git to work with 3.1.X:
cd powa-web
git checkout a14a85b3b29ae1d68c20e7394e4214d318a948f3
./powa-web
############################################################################## ##############################################################################
# Admin Web Client # Admin Web Client
# On workstation create tunnel: # On workstation create tunnel:
ssh -N -C -L 58888:localhost:8888 powa ssh -N -C -L 58888:localhost:8888 powa
# On workstation, in browser: # On workstation, in browser, login user 'powa' with powa's postgres password.
http://localhost:58888/ http://localhost:58888/
############################################################################## ##############################################################################

Loading…
Cancel
Save