diff --git a/chef/cookbooks/common/recipes/main.rb b/chef/cookbooks/common/recipes/main.rb index ec5654333..6ba5a9172 100644 --- a/chef/cookbooks/common/recipes/main.rb +++ b/chef/cookbooks/common/recipes/main.rb @@ -1,8 +1,4 @@ include_recipe "common::iptables" include_recipe "common::daemontools" - -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 +include_recipe "common::secret_token" +include_recipe "common::nginx" diff --git a/chef/cookbooks/common/recipes/nginx.rb b/chef/cookbooks/common/recipes/nginx.rb new file mode 100644 index 000000000..ade59003d --- /dev/null +++ b/chef/cookbooks/common/recipes/nginx.rb @@ -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 diff --git a/chef/cookbooks/common/recipes/secret_token.rb b/chef/cookbooks/common/recipes/secret_token.rb new file mode 100644 index 000000000..948f59f07 --- /dev/null +++ b/chef/cookbooks/common/recipes/secret_token.rb @@ -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