From 65d581770ec63df0d9d83ecf37a092c569788a5d Mon Sep 17 00:00:00 2001 From: denschub Date: Fri, 28 Jan 2011 21:19:57 +0100 Subject: [PATCH 1/4] Added mysql-install --- chef/cookbooks/centos/recipes/bootstrap.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chef/cookbooks/centos/recipes/bootstrap.rb b/chef/cookbooks/centos/recipes/bootstrap.rb index 0458df3fa..3e6c61017 100644 --- a/chef/cookbooks/centos/recipes/bootstrap.rb +++ b/chef/cookbooks/centos/recipes/bootstrap.rb @@ -19,6 +19,9 @@ end execute "rvm deps" do command "yum install -y bzip2" end +execute "install mysql" do + command "yum install -y mysql mysql-server mysql-devel" +end def harden_ruby(ruby_string) Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file| From 9001728772a5d531ad29b09f4ef5a9c933c4008f Mon Sep 17 00:00:00 2001 From: denschub Date: Fri, 28 Jan 2011 21:20:17 +0100 Subject: [PATCH 2/4] Fixed bugs in nginx.conf-template --- chef/cookbooks/common/templates/default/nginx.conf.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb index e5dee7afa..cc34eba51 100644 --- a/chef/cookbooks/common/templates/default/nginx.conf.erb +++ b/chef/cookbooks/common/templates/default/nginx.conf.erb @@ -90,7 +90,7 @@ http { location /assets { expires 1d; - add_header Cache-Control public + add_header Cache-Control public; } location / { @@ -114,7 +114,7 @@ http { } <% unless @s3_bucket.blank? || @s3_path.blank? %> - <%= "rewrite ^/uploads/images/(.*)$ #{@s3_bucket}#{@s3_path}$1 permanent; %> + <%= "rewrite ^/uploads/images/(.*)$ #{@s3_bucket}#{@s3_path}$1 permanent;" %> <% end %> } From 9040d609774639894a0811b851096636ac7ca26f Mon Sep 17 00:00:00 2001 From: denschub Date: Fri, 28 Jan 2011 21:21:05 +0100 Subject: [PATCH 3/4] Added mysql to deamontools-recipe --- chef/cookbooks/common/recipes/daemontools.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/chef/cookbooks/common/recipes/daemontools.rb b/chef/cookbooks/common/recipes/daemontools.rb index f5254a4bc..4f1509b65 100644 --- a/chef/cookbooks/common/recipes/daemontools.rb +++ b/chef/cookbooks/common/recipes/daemontools.rb @@ -6,11 +6,18 @@ execute "compile daemontools" do command "cd /package/admin/daemontools-0.76 && ./package/install" end -execute "mongo run" do - command "mkdir -p /service/mongo && echo '#!/bin/sh' > /service/mongo/run && echo 'exec /usr/bin/mongod' >> /service/mongo/run" +#execute "mongo run" do +# command "mkdir -p /service/mongo && echo '#!/bin/sh' > /service/mongo/run && echo 'exec /usr/bin/mongod' >> /service/mongo/run" +#end +#execute "executable" do +# command "chmod -R 755 /service/mongo" +#end + +execute "mysql run" do + command "mkdir -p /service/mysql && echo '#!/bin/sh' > /service/mysql/run && echo 'exec /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user=mysql' >> /service/mysql/run" end execute "executable" do - command "chmod -R 755 /service/mongo" + command "chmod -R 755 /service/mysql" end config = YAML.load_file("/usr/local/app/diaspora/chef/cookbooks/common/files/default/thins.yml") From ba532536e328957103865d6e0eea35a517ed4d23 Mon Sep 17 00:00:00 2001 From: denschub Date: Fri, 28 Jan 2011 21:22:36 +0100 Subject: [PATCH 4/4] Fixed bug in sod-thin.yml --- chef/cookbooks/common/files/default/thins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/cookbooks/common/files/default/thins.yml b/chef/cookbooks/common/files/default/thins.yml index 37ec634b3..f0b18cdd6 100644 --- a/chef/cookbooks/common/files/default/thins.yml +++ b/chef/cookbooks/common/files/default/thins.yml @@ -6,4 +6,4 @@ url: 'joindiaspora.com' cert_location: '/usr/local/nginx/conf/diaspora.crt' key_location: '/usr/local/nginx/conf/diaspora.key' s3_bucket: "https://joindiaspora.s3.amazonaws.com" -s3_path: "/uploads/images/' +s3_path: "/uploads/images/"