ms/iz nginx and secret token recipes

This commit is contained in:
zhitomirskiyi 2010-11-09 19:28:42 -08:00
parent fce588a5c7
commit d48fde1447
3 changed files with 26 additions and 6 deletions

View file

@ -1,8 +1,4 @@
include_recipe "common::iptables" include_recipe "common::iptables"
include_recipe "common::daemontools" include_recipe "common::daemontools"
include_recipe "common::secret_token"
require 'active_support' include_recipe "common::nginx"
template "/usr/local/app/diaspora/config/initializers/secret_token.rb" do
source "secret_token.rb.erb"
variables :secret_token => ActiveSupport::SecureRandom.hex(40)
end

View file

@ -0,0 +1,19 @@
execute "Get nginx from nginx web site" do
command "mkdir -p /tmp/install && curl http://sysoev.ru/nginx/nginx-0.8.53.tar.gz > /tmp/install/"
end
execute "unzip nginx" do
command "cd /tmp/install && tar -xvf nginx-0.8.53.tar.gz"
end
execute "configure nginx" do
command "cd /tmp/install/nginx-0.8.53 && ./configure --with-http_ssl_module"
end
execute "compile nginx" do
command "cd /tmp/install/nginx-0.8.53 && make"
end
execute "install nginx" do
command "cd /tmp/install/nginx-0.8.53 && make install"
end

View file

@ -0,0 +1,5 @@
require 'active_support'
template "/usr/local/app/diaspora/config/initializers/secret_token.rb" do
source "secret_token.rb.erb"
variables :secret_token => ActiveSupport::SecureRandom.hex(40)
end