<commit_before>include_recipe "env"
include_recipe "nginx"
include_recipe "ruby"
include_recipe "rubygems"
include_recipe "runit"

runit_service "blobstore" do
  run_restart false
end

package "git-core"

directory "#{node[:blobstore][:path]}/shared" do
  owner node[:blobstore][:runner]
  group node[:blobstore][:runner]
  mode "0755"
  recursive true
  action :create
end

directory node[:blobstore][:tmp] do
  mode "1777"
  recursive true
  action :create
end

%w{config gems logs}.each do |dir|
  directory "#{node[:blobstore][:path]}/shared/#{dir}" do
    owner node[:blobstore][:runner]
    group node[:blobstore][:runner]
    mode "0755"
    action :create
  end
end

template "#{node[:blobstore][:path]}/shared/config/simple_blobstore_server.yml" do
  source "simple_blobstore_server.yml.erb"
end

deploy_revision node[:blobstore][:path] do
  repo "#{node[:blobstore][:repos_path]}/bosh"<commit_msg>fix blobstore config permissions restart blobstore service when config file changes<commit_after>include_recipe "env"
include_recipe "nginx"
include_recipe "ruby"
include_recipe "rubygems"
include_recipe "runit"

runit_service "blobstore" do
  run_restart false
end

package "git-core"

directory "#{node[:blobstore][:path]}/shared" do
  owner node[:blobstore][:runner]
  group node[:blobstore][:runner]
  mode "0755"
  recursive true
  action :create
end

directory node[:blobstore][:tmp] do
  mode "1777"
  recursive true
  action :create
end

%w{config gems logs}.each do |dir|
  directory "#{node[:blobstore][:path]}/shared/#{dir}" do
    owner node[:blobstore][:runner]
    group node[:blobstore][:runner]
    mode "0755"
    action :create
  end
end

template "#{node[:blobstore][:path]}/shared/config/simple_blobstore_server.yml" do
  source "simple_blobstore_server.yml.erb"
  owner node[:blobstore][:runner]
  group node[:blobstore][:runner]
  notifies :restart, "service[blobstore]"
end

deploy_revision node[:blobstore][:path] do
  repo "#{node[:blobstore][:repos_path]}/bosh"
{'fraction_non_alphanumeric': 0.1374122367101304, 'fraction_numerical': 0.012036108324974924, 'mean_word_length': 5.975524475524476, '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': '7312286', 'n_tokens_mistral': 716, 'n_tokens_neox': 690, 'n_words': 158}