ms/iz nginx and secret token recipes
This commit is contained in:
parent
fce588a5c7
commit
d48fde1447
3 changed files with 26 additions and 6 deletions
|
|
@ -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
|
|
||||||
|
|
|
||||||
19
chef/cookbooks/common/recipes/nginx.rb
Normal file
19
chef/cookbooks/common/recipes/nginx.rb
Normal 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
|
||||||
5
chef/cookbooks/common/recipes/secret_token.rb
Normal file
5
chef/cookbooks/common/recipes/secret_token.rb
Normal 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
|
||||||
Loading…
Reference in a new issue