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: cf9e2f682316
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: d90e55e3d31d
Choose a head ref
  • 3 commits
  • 8 files changed
  • 1 contributor

Commits on Oct 23, 2015

  1. Copy the full SHA
    371ddbf View commit details
  2. Copy the full SHA
    1ddad2c View commit details
  3. cleanup redis config

    dwradcliffe committed Oct 23, 2015
    Copy the full SHA
    d90e55e View commit details
4 changes: 2 additions & 2 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ GRAPH
rubygems-sensu (>= 0.0.0)
rubygems-ssh (>= 0.0.0)
rubygems-utility (>= 0.0.0)
rubygems-app (0.0.59)
rubygems-app (0.0.61)
apt (>= 0.0.0)
chef-vault (>= 0.0.0)
datadog (>= 0.0.0)
@@ -244,7 +244,7 @@ GRAPH
rubygems-backups (0.0.24)
chef-vault (>= 0.0.0)
rubygems-ruby (>= 0.0.0)
rubygems-balancer (0.0.69)
rubygems-balancer (0.0.70)
chef-vault (>= 0.0.0)
datadog (>= 0.0.0)
logrotate (>= 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.59'
version '0.0.61'

depends 'apt'
depends 'chef-vault'
5 changes: 5 additions & 0 deletions cookbooks/rubygems-app/recipes/config.rb
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@
secrets = chef_vault_item('rubygems', node.chef_environment)
db_host = search(:node, "name:#{dbhost}.#{node.chef_environment}.rubygems.org")[0]

redis_host = data_bag_item('hosts', 'redis')['environments'][node.chef_environment]
redis_ip = search('node', "name:#{redis_host}.#{node.chef_environment}.rubygems.org")[0]['ipaddress']

template '/applications/rubygems/shared/config/database.yml' do
source 'database.yml.erb'
owner 'deploy'
@@ -44,6 +47,8 @@
fastly_api_key: secrets['fastly_api_key'],
fastly_service_id: secrets['fastly_service_id'],
fastly_domain: "#{fastly_domain}.global.ssl.fastly.net",
elasticsearch_url: secrets['elasticsearch_url'],
redis_url: "redis://#{redis_ip}:6379/0",
honeybadger_api_key: secrets['honeybadger_api_key']
)
end
6 changes: 1 addition & 5 deletions cookbooks/rubygems-app/recipes/delayed_job.rb
Original file line number Diff line number Diff line change
@@ -3,16 +3,12 @@
# Recipe:: delayed_job
#

redis_host = data_bag_item('hosts', 'redis')['environments'][node.chef_environment]
redis_ip = search('node', "name:#{redis_host}.#{node.chef_environment}.rubygems.org")[0]['ipaddress']

runit_service 'delayed_job' do
owner 'deploy'
group 'deploy'
default_logger true
env(
'RAILS_ENV' => node.chef_environment,
'REDISTOGO_URL' => "redis://#{redis_ip}:6379/0"
'RAILS_ENV' => node.chef_environment
)
options(
owner: 'deploy',
4 changes: 0 additions & 4 deletions cookbooks/rubygems-app/recipes/unicorn.rb
Original file line number Diff line number Diff line change
@@ -10,9 +10,6 @@
before_fork 'sleep 1'
end

redis_host = data_bag_item('hosts', 'redis')['environments'][node.chef_environment]
redis_ip = search('node', "name:#{redis_host}.#{node.chef_environment}.rubygems.org")[0]['ipaddress']

include_recipe 'chef-vault'

runit_service 'unicorn' do
@@ -21,7 +18,6 @@
default_logger true
env(
'RAILS_ENV' => node.chef_environment,
'REDISTOGO_URL' => "redis://#{redis_ip}:6379/0",
'STATSD_IMPLEMENTATION' => 'datadog'
)
options(
3 changes: 3 additions & 0 deletions cookbooks/rubygems-app/templates/default/secret.rb.erb
Original file line number Diff line number Diff line change
@@ -9,3 +9,6 @@ ENV['HONEYBADGER_API_KEY'] = "<%= @honeybadger_api_key %>"
ENV['FASTLY_API_KEY'] = "<%= @fastly_api_key %>"
ENV['FASTLY_SERVICE_ID'] = "<%= @fastly_service_id %>"
ENV['FASTLY_DOMAIN'] = "<%= @fastly_domain %>"
ENV['ELASTICSEARCH_URL'] = '<%= @elasticsearch_url %>'
ENV['REDISTOGO_URL'] = '<%= @redis_url %>'
ENV['REDIS_URL'] = '<%= @redis_url %>'
2 changes: 1 addition & 1 deletion cookbooks/rubygems-balancer/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name 'rubygems-balancer'

version '0.0.69'
version '0.0.70'

depends 'chef-vault'
depends 'datadog'
Original file line number Diff line number Diff line change
@@ -172,7 +172,7 @@ server {
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
ssl_prefer_server_ciphers on;
# ssl_dhparam <%= node['nginx']['dir'] %>/certs/dhparam.pem;
ssl_dhparam <%= node['nginx']['dir'] %>/certs/dhparam.pem;

# There are bugs in Net::HTTP::Persisent + OpenSSL in 1.8 are uncovered by
# trying to use a session cache. If we switch it off, they go away.