From ca5ee0b32b616fb8fa5e7e44c74acecefab719c3 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Mon, 25 Mar 2019 07:02:41 -0500 Subject: added pgadmin --- postgres/.pgadmin3 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ postgres/.pgpass | 1 + postgres/bootstrap.sh | 6 ++++- postgres/pgadmin.sh | 2 ++ 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 postgres/.pgadmin3 create mode 100644 postgres/.pgpass create mode 100755 postgres/pgadmin.sh (limited to 'postgres') diff --git a/postgres/.pgadmin3 b/postgres/.pgadmin3 new file mode 100644 index 0000000..4fe5228 --- /dev/null +++ b/postgres/.pgadmin3 @@ -0,0 +1,71 @@ +PostgreSQLPath=/usr/bin +EnterpriseDBPath= +GreenplumDBPath= +PostgreSQLHelpPath=http://www.postgresql.org/docs/current/static/ +EnterpriseDBHelpPath=http://www.enterprisedb.com/docs/en/current/server/ +GreenplumDBHelpPath=http://gpdb.docs.pivotal.io/ +SlonyHelpPath=http://www.slony.info/documentation/ +LastDatabase=postgres +LastPort=5432 +LastSSL=-1 +LastUsername=space +[Servers] +Count=1 +[Servers/1] +Server=localhost +HostAddr= +Description=space +Service= +ServiceID= +DiscoveryID= +Port=5432 +StorePwd=true +Rolename= +Restore=true +Database=postgres +Username=space +LastDatabase=space_db +LastSchema= +DbRestriction= +Colour=#FFFFFF +SSL=-1 +Group=Servers +SSLCert= +SSLKey= +SSLRootCert= +SSLCrl= +SSLCompression=true +SSHTunnel=false +TunnelHost= +TunnelUserName= +TunnelModePwd=true +PublicKeyFile= +IdentityFile= +TunnelPort=22 +[Servers/1/Databases] +[Servers/1/Databases/postgres] +SchemaRestriction= +[Servers/1/Databases/space_db] +SchemaRestriction= +[frmMain] +Perspective-8418=layout2|name=objectBrowser;caption=Object browser;state=16795644;dir=4;layer=1;row=0;pos=0;prop=100000;bestw=200;besth=450;minw=100;minh=200;maxw=-1;maxh=-1;floatx=236;floaty=222;floatw=-1;floath=-1|name=listViews;caption=Info pane;state=1020;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=400;besth=200;minw=200;minh=100;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=sqlPane;caption=SQL pane;state=16779260;dir=3;layer=0;row=0;pos=0;prop=100000;bestw=400;besth=200;minw=200;minh=100;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=toolBar;caption=Tool bar;state=16788208;dir=1;layer=10;row=0;pos=0;prop=100000;bestw=586;besth=44;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|dock_size(5,0,0)=202|dock_size(3,0,0)=228|dock_size(1,10,0)=46|dock_size(4,1,0)=310| +Left=24 +Top=597 +Width=1134 +Height=674 +Maximized=false +LastFile= +[frmHint] +Left=286 +Top=844 +Width=610 +Height=456 +[Updates] +pgsql-Versions=9.6 +UseSSL=true +[Properties] +[Properties/Server] +Left=291 +Top=816 +Width=600 +Height=512 diff --git a/postgres/.pgpass b/postgres/.pgpass new file mode 100644 index 0000000..64413d2 --- /dev/null +++ b/postgres/.pgpass @@ -0,0 +1 @@ +localhost:5432:*:space:space diff --git a/postgres/bootstrap.sh b/postgres/bootstrap.sh index 03f7eef..391aeab 100644 --- a/postgres/bootstrap.sh +++ b/postgres/bootstrap.sh @@ -7,7 +7,7 @@ apt-get upgrade -y apt-get install -y xauth # deps -apt-get install -y postgresql postgresql-client +apt-get install -y postgresql postgresql-client pgadmin3 # set up db sudo -u postgres psql -c "CREATE USER space WITH PASSWORD 'space';" @@ -15,6 +15,10 @@ sudo -u postgres psql -c "CREATE DATABASE space_db WITH OWNER space;" # copy configs cp /vagrant/postgres/*conf /etc/postgresql/9.6/main/ +cp /vagrant/postgres/.pg* /home/vagrant/ + +# give ownership +chown -R vagrant:vagrant /home/vagrant # systemd systemctl restart postgresql diff --git a/postgres/pgadmin.sh b/postgres/pgadmin.sh new file mode 100755 index 0000000..048643f --- /dev/null +++ b/postgres/pgadmin.sh @@ -0,0 +1,2 @@ +#!/bin/bash +vagrant ssh -c 'pgadmin3' -- cgit v1.2.3