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

Commit

Permalink
change remaining db password config
Browse files Browse the repository at this point in the history
dwradcliffe committed Jun 29, 2014
1 parent c577f4b commit 59018c3
Showing 8 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -186,7 +186,7 @@ GRAPH
rubygems-sensu (>= 0.0.0)
rubygems-ssh (>= 0.0.0)
rubygems-utility (>= 0.0.0)
rubygems-app (0.0.20)
rubygems-app (0.0.21)
apt (>= 0.0.0)
chef-vault (>= 0.0.0)
git (>= 0.0.0)
@@ -198,7 +198,7 @@ GRAPH
user (>= 0.0.0)
rubygems-apt (0.0.2)
apt (>= 0.0.0)
rubygems-backups (0.0.5)
rubygems-backups (0.0.6)
chef-vault (>= 0.0.0)
rubygems-balancer (0.0.12)
chef-vault (>= 0.0.0)
@@ -219,7 +219,7 @@ GRAPH
nginx (>= 0.0.0)
rubygems (>= 0.0.0)
rubygems-cloud-init (0.0.1)
rubygems-database (0.0.22)
rubygems-database (0.0.23)
chef-vault (>= 0.0.0)
database (>= 0.0.0)
postgresql (>= 0.0.0)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-app/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name 'rubygems-app'

version '0.0.20'
version '0.0.21'

depends 'apt'
depends 'chef-vault'
6 changes: 3 additions & 3 deletions cookbooks/rubygems-app/recipes/config.rb
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
include_recipe 'chef-vault'

secrets = chef_vault_item('rubygems', node.chef_environment)
db_host = search(:node, "name:db01.#{node.chef_environment}.rubygems.org")
db_host = search(:node, "name:db01.#{node.chef_environment}.rubygems.org")[0]

template '/applications/rubygems/shared/database.yml' do
source 'database.yml.erb'
@@ -18,8 +18,8 @@
adapter: 'postgresql',
database: "rubygems_#{node.chef_environment}",
username: secrets['rails_postgresql_user'],
password: db_host[0]['postgresql']['password']['postgres'],
host: db_host[0]['ipaddress']
password: db_host['postgresql']['password']['postgres'],
host: db_host['ipaddress']
)
end

2 changes: 1 addition & 1 deletion cookbooks/rubygems-backups/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'rubygems-backups'

version '0.0.5'
version '0.0.6'

depends 'chef-vault'
2 changes: 1 addition & 1 deletion cookbooks/rubygems-backups/recipes/postgresql.rb
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
variables(
postgresql_db: "rubygems_#{node.chef_environment}",
postgresql_user: secrets['rails_postgresql_user'],
postgresql_password: secrets['rails_postgresql_password'],
postgresql_password: node['postgresql']['password']['postgres'],
gpg: backup_secrets['gpg_keys'],
aws_access_key: backup_secrets['aws_access_key'],
aws_secret_key: backup_secrets['aws_secret_key'],
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.22'
version '0.0.23'

depends 'chef-vault'
depends 'database'
1 change: 0 additions & 1 deletion cookbooks/rubygems-database/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@
'type' => 'host',
'db' => "rubygems_#{node.chef_environment}",
'user' => secrets['rails_postgresql_user'],
'password' => secrets['rails_postgresql_password'],
'addr' => "#{search(:node, "name:app01.#{node.chef_environment}.rubygems.org")[0]['ipaddress']}/0",
'method' => 'md5'
},
1 change: 0 additions & 1 deletion test/integration/data_bags/secrets/rubygems.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
"id": "rubygems",
"_default": {
"rails_postgresql_user": "rubygems",
"rails_postgresql_password": "totally insecure",
"s3_key": "",
"s3_secret": "",
"secret_token" : "sdjfl;aksdjfal;skdjf;laskdfjal;skdfjl;askdfjadls;kfjasdlk;fj",

0 comments on commit 59018c3

Please sign in to comment.