Archive

Archive for December, 2010

Speeding up cakephp with nginx and no mod_rewrite issues

December 13th, 2010 alex No comments

I am trying to speedup rather crappy php, website build on top of cakephp and decided to follow this tutorial, I was seriously annoyed that I can’t get rig of /app/webroot prefix in css/js links. I didn’t want to hack them directly because I am using automatic css/js compression.

It wasn’t until I found this solution from the ticket closed in January I managed to fix it. Quite surprised that in order to dispatch cakephp app I need to patch the core and there are hundred of unanswered questions/issues about deployment of cakephp without mod_rewrite. PS. Good start – this is my first day of holiday gone.

Tags: , , ,
Categories: blog, web Tags: , , ,

Chef cookbook for xtreemfs deployment

December 10th, 2010 alex No comments

I just pushed xtreemfs cookbook to my git repo This cookbook automates xtreemfs quick start for ubuntu 10.04. I am using it with vagrant:

  1.    config.vm.define : xtreemfs do |xtreemfs_config|
  2.     xtreemfs_config.vm.box="base"
  3.     xtreemfs_config.vm.provisioner=:chef_solo
  4.     xtreemfs_config.vm.forward_port("ssh", 22, 2227,:auto => true)  
  5.     xtreemfs_config.vm.forward_port("web", 30638, 8080)
  6.     xtreemfs_config.vm.network("192.168.100.16")
  7.     xtreemfs_config.chef.node_name="xtreemfs"
  8.     xtreemfs_config.chef.log_level = :debug
  9.     xtreemfs_config.chef.cookbooks_path = ["cookbooks","other_cookbooks"]
  10.     xtreemfs_config.chef.run_list.clear
  11.     xtreemfs_config.chef.add_recipe("apt")
  12.     # xtreemfs_config.chef.add_recipe("tomcat")
  13.     xtreemfs_config.chef.add_recipe("xtreemfs::server")
  14.     xtreemfs_config.chef.add_recipe("xtreemfs::client")
  15.  end
Tags: , , ,
Categories: cloud Tags: , , ,

Good way to ad apt repository using chef – from hadoop cookbook

December 9th, 2010 alex 2 comments

I found an interesting way of adding apt repository in hadoop cookbook:

  1. execute "apt-get update" do
  2.   action :nothing
  3. end
  4.  
  5. template "/etc/apt/sources.list.d/cloudera.list" do
  6.   owner "root"
  7.   mode "0644"
  8.   source "cloudera.list.erb"
  9.   notifies :run, resources("execute[apt-get update]"), :immediately
  10. end
  11.  
  12. execute "curl -s http://archive.cloudera.com/debian/archive.key | apt-key add -" do
  13.   not_if "apt-key export 'Cloudera Apt Repository'"
  14. end
Tags: , ,
Categories: cloud Tags: , ,