<commit_before>include_recipe "apache2::mod_python"

basedir = node['graphite']['base_dir']
version = node['graphite']['version']
pyver = node['graphite']['python_version']

if Chef::Config[:solo]
  Chef::Log.warn "This recipe uses encrypted data bags. Chef Solo does not support this."
else
  if data_bag_name = node['graphite']['encrypted_data_bag']['name']
    password = Chef::EncryptedDataBagItem.load(data_bag_name, "password")
  else
    password = node['graphite']['password']
  end
end

package "python-cairo-dev"
package "python-django"
package "python-django-tagging"
package "python-memcache"
package "python-rrdtool"

remote_file "/usr/src/graphite-web-#{version}.tar.gz" do
  source node['graphite']['graphite_web']['uri']
  checksum node['graphite']['graphite_web']['checksum']
end

execute "untar graphite-web" do
  command "tar xzf graphite-web-#{version}.tar.gz"
  creates "/usr/src/graphite-web-#{version}"
  cwd "/usr/src"
end

execute "install graphite-web" do<commit_msg>Changed enc data bag item name<commit_after>include_recipe "apache2::mod_python"

basedir = node['graphite']['base_dir']
version = node['graphite']['version']
pyver = node['graphite']['python_version']

if Chef::Config[:solo]
  Chef::Log.warn "This recipe uses encrypted data bags. Chef Solo does not support this."
else
  if data_bag_name = node['graphite']['encrypted_data_bag']['name']
    password = Chef::EncryptedDataBagItem.load(data_bag_name, "graphite")
  else
    password = node['graphite']['password']
  end
end

package "python-cairo-dev"
package "python-django"
package "python-django-tagging"
package "python-memcache"
package "python-rrdtool"

remote_file "/usr/src/graphite-web-#{version}.tar.gz" do
  source node['graphite']['graphite_web']['uri']
  checksum node['graphite']['graphite_web']['checksum']
end

execute "untar graphite-web" do
  command "tar xzf graphite-web-#{version}.tar.gz"
  creates "/usr/src/graphite-web-#{version}"
  cwd "/usr/src"
end

execute "install graphite-web" do
{'fraction_non_alphanumeric': 0.15876185721417874, 'fraction_numerical': 0.000998502246630055, 'mean_word_length': 6.1063829787234045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1723094', 'n_tokens_mistral': 675, 'n_tokens_neox': 666, 'n_words': 144}