Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit f1558f7

Browse files
committed
alleged fix for some of the postgresql problems
1 parent 6d19db8 commit f1558f7

File tree

4 files changed

+13
-32
lines changed

4 files changed

+13
-32
lines changed

Diff for: Vagrantfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
Vagrant.configure("2") do |config|
55
config.vm.box = "precise32"
66
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
7-
config.vm.provision :shell, :path => "bootstrap.sh"
87
config.vm.provision :puppet do |puppet|
98
puppet.manifests_path = "puppet/manifests"
109
puppet.module_path = "puppet/modules"
1110
puppet.manifest_file = "development.pp"
1211
end
1312

13+
config.vm.provision :shell, :path => "bootstrap.sh"
14+
1415
# port forward
1516
config.vm.network :forwarded_port, host: 3000, guest: 3000
1617
config.vm.synced_folder ".", "/home/vagrant/hpi-hiwi-portal"

Diff for: bootstrap.sh

+11
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1+
# postgres
2+
export LANGUAGE="en_US.UTF-8"
3+
export LANG="en_US.UTF-8"
4+
export LC_ALL="en_US.UTF-8"
5+
apt-get -y install postgresql
6+
apt-get -y install libpq-dev
7+
8+
# init db
9+
sudo -u postgres createuser --superuser ror_su
10+
sudo -u postgres psql -c "ALTER USER ror_su WITH PASSWORD 'us_ror'"
11+
112
# copy the database.yml file
213
cp /vagrant/config/database.yml.default /vagrant/config/database.yml

Diff for: db/schema.rb

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
ActiveRecord::Schema.define(version: 20130819123905) do
1515

16-
# These are extensions that must be enabled in order to support this database
17-
enable_extension "plpgsql"
18-
1916
create_table "job_offers", force: true do |t|
2017
t.string "description"
2118
t.string "title"

Diff for: puppet/manifests/development.pp

-28
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,9 @@
2727
}
2828
}
2929

30-
class prepare_postgres {
31-
32-
include postgresql::server
33-
34-
postgresql::pg_hba_rule { 'allow postgres user to access any database':
35-
description => 'allow postgres user to access any database',
36-
type => 'local',
37-
database => 'all',
38-
user => 'postgres',
39-
auth_method => 'ident',
40-
order => '000',
41-
}
42-
43-
postgresql::database_user{ 'ror_su':
44-
password_hash => postgresql_password('ror_su', 'us_ror'),
45-
superuser => true,
46-
require => Class['postgresql::server'],
47-
}
48-
49-
exec { 'utf8 postgres':
50-
command => 'pg_dropcluster --stop 9.1 main ; pg_createcluster --start --locale en_US.UTF-8 9.1 main',
51-
unless => 'sudo -u postgres psql -t -c "\l" | grep template1 | grep -q UTF',
52-
require => Class['postgresql::server'],
53-
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
54-
}
55-
}
56-
5730
class doinstall {
5831
include preparation
5932
include installrvm
60-
include prepare_postgres
6133
}
6234

6335
include doinstall

0 commit comments

Comments
 (0)