Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
Updating to new qafoo version, now with env flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Holzhauer committed Oct 23, 2014
1 parent cd357cd commit 110c64f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions qafoo-profiler/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default['qafoo-profiler'] = {}
default['qafoo-profiler']['ppa'] = 'https://packagecloud.io/qafoo/profiler/ubuntu/'
default['qafoo-profiler']['key'] = 'https://packagecloud.io/gpg.key'
default['qafoo-profiler']['ppa'] = 'https://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages/'
default['qafoo-profiler']['key'] = 'https://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages/EEB5E8F4.gpg'
default['qafoo-profiler']['flags'] = ['--debug']
default['qafoo-profiler']['log_file'] = '/var/log/qprofd/qprofd.log'
16 changes: 12 additions & 4 deletions qafoo-profiler/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
codename = 'trusty' # node["lsb"]["codename"]

apt_repository 'qafoo' do
uri node['qafoo-profiler']['ppa']
distribution codename
distribution 'debian'
components ['main']
key node['qafoo-profiler']['key']
end
Expand All @@ -15,7 +13,17 @@

qprofd_flags = []
qprofd_flags << node['qafoo-profiler']['flags']
qprofd_flags << "--hostname='#{get_normalized_cluster_name}.#{node['opsworks']['instance']['hostname']}'"
qprofd_flags << " --hostname='#{node['opsworks']['instance']['hostname']}.#{get_normalized_cluster_name}'"

unless node.fetch('easybib_deploy', {})['envtype'].nil?
map = {
'vagrant' => 'development',
'playground' => 'staging',
'production' => 'production'
}
env = map[node['easybib_deploy']['envtype']]
qprofd_flags << " --env=#{env}"
end

template '/etc/default/qprofd' do
mode 0644
Expand Down

0 comments on commit 110c64f

Please sign in to comment.