Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
Fix attribute namespaces in rubyges-database to make things work
Browse files Browse the repository at this point in the history
Sam Kottler committed Jun 20, 2014
1 parent 2b51608 commit 1764a1b
Showing 3 changed files with 6 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -188,7 +188,7 @@ GRAPH
rubygems (>= 0.0.0)
rubygems-chef (0.0.6)
chef-client (>= 0.0.0)
rubygems-database (0.0.20)
rubygems-database (0.0.21)
database (>= 0.0.0)
postgresql (>= 0.0.0)
rubygems (>= 0.0.0)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-database/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name 'rubygems-database'
maintainer 'RubyGems.org ops team'

version '0.0.20'
version '0.0.21'

depends 'database'
depends 'postgresql'
37 changes: 4 additions & 33 deletions cookbooks/rubygems-database/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -5,18 +5,10 @@

include_recipe 'rubygems'

node.default['postgresql']['data_directory'] = '/var/lib/pg_data'
node.default['postgresql']['listen_addresses'] = '0.0.0.0'
node.default['postgresql']['ssl'] = false
node.default['postgresql']['work_mem'] = '100MB'
node.default['postgresql']['shared_buffers'] = '24MB'
node.default['postgresql']['users'] = [{
'username' => 'postgres',
'password' => 'postgres',
'superuser' => true,
'createdb' => true,
'login' => true
}]
node.default['postgresql']['config']['listen_addresses'] = '0.0.0.0'
node.default['postgresql']['config']['work_mem'] = '100MB'
node.default['postgresql']['config']['shared_buffers'] = '24MB'

node.default['postgresql']['pg_hba'] = [
{
'type' => 'host',
@@ -36,24 +28,3 @@

include_recipe 'postgresql::server'
include_recipe 'postgresql::ruby'

stage = node.chef_environment

connection_info = {
host: '127.0.0.1',
port: 5432,
username: 'postgres'
}

postgresql_database_user "rubygems_#{stage}" do
connection(connection_info)
password ''
action :create
end

connection_info['username'] = "rubygems_#{stage}"

postgresql_database "rubygems_#{stage}" do
connection(connection_info)
action :create
end

0 comments on commit 1764a1b

Please sign in to comment.