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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubygems/rubygems-chef
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3744d94b4077
Choose a base ref
...
head repository: rubygems/rubygems-chef
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf9989fe2b27
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Jun 18, 2014

  1. Start working on rubygems-database cookbook

    Sam Kottler committed Jun 18, 2014
    Copy the full SHA
    2034e82 View commit details
  2. Merge branch 'master' of github.com:skottler/rubygems-infrastructure

    * 'master' of github.com:skottler/rubygems-infrastructure:
      actually run the rubygems-app::rubygems recipe
    Sam Kottler committed Jun 18, 2014
    Copy the full SHA
    cf9989f View commit details
Showing with 62 additions and 0 deletions.
  1. +1 −0 Berksfile
  2. +28 −0 Berksfile.lock
  3. +10 −0 cookbooks/rubygems-database/metadata.rb
  4. +23 −0 cookbooks/rubygems-database/recipes/default.rb
1 change: 1 addition & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ cookbook 'rubygems-balancer', path: 'cookbooks/rubygems-balancer'
cookbook 'rubygems-bastion', path: 'cookbooks/rubygems-bastion'
cookbook 'rubygems-cache', path: 'cookbooks/rubygems-cache'
cookbook 'rubygems-chef', path: 'cookbooks/rubygems-chef'
cookbook 'rubygems-database', path: 'cookbooks/rubygems-database'
cookbook 'rubygems-hostname', path: 'cookbooks/rubygems-hostname'
cookbook 'rubygems-hosts', path: 'cookbooks/rubygems-hosts'
cookbook 'rubygems-metrics', path: 'cookbooks/rubygems-metrics'
28 changes: 28 additions & 0 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -28,6 +28,8 @@ DEPENDENCIES
path: cookbooks/rubygems-cache
rubygems-chef
path: cookbooks/rubygems-chef
rubygems-database
path: cookbooks/rubygems-database
rubygems-hostname
path: cookbooks/rubygems-hostname
rubygems-hosts
@@ -66,9 +68,11 @@ GRAPH
apt (2.4.0)
aptly (0.2.1)
apt (>= 0.0.0)
aws (2.2.2)
bluepill (2.3.1)
rsyslog (>= 0.0.0)
build-essential (2.0.2)
chef-sugar (2.0.0)
chef-vault (1.1.2)
chef_handler (1.1.6)
collectd (1.0.5)
@@ -78,6 +82,12 @@ GRAPH
git (>= 0.0.0)
collectd_plugins (1.0.0)
collectd (>= 0.0.0)
database (2.2.0)
aws (>= 0.0.0)
mysql (>= 5.0.0)
mysql-chef_gem (>= 0.0.0)
postgresql (>= 1.0.0)
xfs (>= 0.0.0)
dmg (2.2.0)
duo-security (0.1.1)
build-essential (>= 0.0.0)
@@ -108,6 +118,11 @@ GRAPH
yum-epel (>= 0.0.0)
motd (0.4.1)
chef_handler (>= 0.0.0)
mysql (5.3.4)
yum-mysql-community (>= 0.0.0)
mysql-chef_gem (0.0.2)
build-essential (>= 0.0.0)
mysql (>= 0.0.0)
nginx (2.7.2)
apt (~> 2.2)
bluepill (~> 2.3)
@@ -123,7 +138,13 @@ GRAPH
ohai (2.0.0)
openssh (1.3.4)
iptables (>= 0.0.0)
openssl (2.0.0)
chef-sugar (>= 0.0.0)
pacman (1.1.1)
postgresql (3.4.1)
apt (>= 1.9.0)
build-essential (>= 0.0.0)
openssl (>= 0.0.0)
rabbitmq (3.2.2)
erlang (>= 0.9.0)
redisio (1.7.1)
@@ -163,6 +184,10 @@ GRAPH
rubygems (>= 0.0.0)
rubygems-chef (0.0.2)
line (>= 0.0.0)
rubygems-database (0.0.4)
database (>= 0.0.0)
postgresql (>= 0.0.0)
rubygems (>= 0.0.0)
rubygems-hostname (0.1.4)
chef-vault (>= 0.0.0)
dwradcliffe-dnsimple (>= 0.0.0)
@@ -215,8 +240,11 @@ GRAPH
user (0.3.0)
windows (1.31.0)
chef_handler (>= 0.0.0)
xfs (1.1.0)
yum (3.2.0)
yum-epel (0.3.6)
yum (~> 3.0)
yum-erlang_solutions (0.2.0)
yum (~> 3.0)
yum-mysql-community (0.1.6)
yum (>= 3.0.0)
10 changes: 10 additions & 0 deletions cookbooks/rubygems-database/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name 'rubygems-database'
maintainer 'RubyGems.org ops team'

version '0.0.4'

depends 'database'
depends 'postgresql'
depends 'rubygems'

supports 'ubuntu'
23 changes: 23 additions & 0 deletions cookbooks/rubygems-database/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
include_recipe 'rubygems'

include_recipe "postgresql::server"

stage = node.chef_environment

connection_info = {
:host => search(:node, "name:app01.#{stage}.rubygems.org")[0]['ipaddress'],
:port => 5432,
:username => "rubygems_#{stage}",
:password => ""
}

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

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