|
|
|
@ -14,6 +14,8 @@ vim /etc/postgresql/10/main/postgresql.conf
|
|
|
|
|
# Change:
|
|
|
|
|
# shared_preload_libraries to (keeping citus):
|
|
|
|
|
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:
|
|
|
|
|
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
|
|
|
|
|
tar -zxvf powa-web-3.1.4.tar.gz
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# On workstation create tunnel:
|
|
|
|
|
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/
|
|
|
|
|
##############################################################################
|
|
|
|
|