diff options
Diffstat (limited to 'postgres')
-rw-r--r-- | postgres/.pgadmin3 | 71 | ||||
-rw-r--r-- | postgres/.pgpass | 1 | ||||
-rw-r--r-- | postgres/bootstrap.sh | 6 | ||||
-rwxr-xr-x | postgres/pgadmin.sh | 2 |
4 files changed, 79 insertions, 1 deletions
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' |