Using Ruby conventions have gotten quite popular to many web developmet environment across many languages . Sun have created a whole language to imitate the programming practices that were being in use for many years in Ruby On Rails they have called it groovy on grails.
One of the unique practices in Ruby on rails is the cool migration scripts and another is the use of capistrano for automated deployment.
Capistrano is though build for the deployment of Ruby on Rails application but it can be used to almost any other web development language and framework.
I have created such a deployment script to automate deployment for a Ecommerce site built in magento.The number of servers currently are two, one is the staging server and another is production.
so begin with install capistrano like this
sudo gem install capistrano
create a small rails application using
rails myapp
cd to get in this directory and now type.
capify
For the new version of capistrano you can define the number of server environment by using line like this in the deploy.rb
require ‘capistrano/ext/multistage’
for this you will need capistrano multistage gem. so install it like this
sudo gem install capistrano-ext
the staging and production server scripts can be defined like this
set :stages, %w(staging production)
set :default_stage, “staging”
create a folder named deploy in config directory.
Now define your staging and production setting by creating files like this
staging.rb and production.rb
The staging.rb from inside will look like this
set :repository, “svn or git repository url”
set :deploy_to, “folder name where to put deployed releases”
role :web, ‘ip name of the server’
role :app, ‘ip name of the server’
now define the task in deploy.rb for before and after deployment and things you want to do at the time of deployment.
I have defined the command to clear the var folders like cache and session, after the main deployment process is finished.Also i kept the var and media folder in a static location and created symlinks just after deployment to point to these folders.
Now in command line go to myapp
cd myapp
cap staging deploy
the deployment will try to do the default tasks for Ruby on Rails application , but it will not anyway impact the php application that you deployed.
Kaminey is a hatke masala movie first of its kind in bollywood history. While the critics are putting it in the tarantino style movies but there are many differences. You must watch it twice to have a opinion about it. Other than the title of movie and glimpses of the past in between there is nothing else common with pulp fiction or reservoir dogs. Vishal bhardwaj have his own style while all his previous movies are slow and spontaneous kaminey progresses too fast there are too many stories mingling with each other and central characters are twin brothers who hate each other. unlike of all the twin characters of bollywood they have a same accent and have a common problem with speech but they lives separately and when the need arises they are willing to sacrifice life of each other. The cinematography is best of the bollywood and the credit goes to tassaduq hussain who have earlier worked in omkara. I liked the go charlie scene which is filmed in a five star mumbai hotel. Producers presents it like a action movie of the 70s with all the guns , goons and dishum dishum. But the dhen te nan is more in the first half of drama then the final climax. The movie might not be popular with the naive indian movie goers but the urban class and the young generation will certainly like it. The movie should be watched by all the cinema goers as one critic have rightly put “like it or leave it you can not ignore it”. Other than the lead pair shahid and priyanka almost every character in the movie have a experience in stage acting. But shahid and priyanka are too good with acting particularly shahid is brilliant with most part of the movie the camera is on him. Amole gupta is great as a mee marathi manus politician of mumbai who hate all the outsiders coming to bombay. Though the movie is not yet opened in bombay because of swine flu there are many dialogs which are not understandable to non marathi peoples and the subtitles are in english for the part where african smugglers are conversing and also there were dialogs which are in english and bengali too. The creator are not at all taking the vast audience of bollywood in consideration. Earlier the language problem have hit the star studded omkara which have so many of its dialogs in the west U.P dialects that was not understandable to vast indian audience who have missed their share of laughs because they cannot understand the words being sad. But that did not discouraged the director to do a similar thing in his next movie. The dialogs were pretty good and my favorite of all is when charlie says
waat iffey nahin lagti ki tu konfa rafta chunta hai.waat lagti hai iffe ki tu konfa rafta chodta hai.
The music is really good as in all the director’s movies and the songs and dance are in the sync with the story. Like both omkara and maqbool kaminey have one fast beat song, one public gathering song, one intimate romantic song and one is a slow song. Sung and picturised in the way with vishal bhardwaj stamp all over them.
Sometime ago I got a domain from yahoo domains service. I searched for the domain and selected to buy. somewhere midway in the process i left for some other task till the time i came back i wasn’t sure if i had already done the payment process and the interface which is much cleaner then godaddy or the likes but with unclear messages did not help. I clicked for something like deactivate so that i don’t have to be charged and i will complete the process from beginning.But the interfaces weren’t clearly conveyed it to me that i already got the domain and my payments have been accepted and most important what exactly the deactivate means there.
I got 2-3 mails from them first one order confirmed last one cancelled confirmed. So now i was clear that i have been charged and i cannot even access my account so i wrote to the support and they replied back that i must reactivate again.I did but now i was charged again for the domain which by the order receipt i already owned. So i wrote again to the customer support and he wrote since he cannot access the billing information i must contact billing department at: the rest is template mail.I never contacted them again.
Another one is of the auto bill pay service of icici which i wanted for my phone bills and after doing all the confirnation this and confirmation that they never activated it.Then again after a year they contacted me and apologised for last time but this time they will certainly do it may be some more months after.My vodafone number did not worked for a month because the customer care executive cannot get my address verified. There are others from the SBI demat service, standard chartered and Bajaj allianz. The list is long the best option looks like to keep them away and live life like old fashioned way.
I saw a recent report in times of india that ghazaiabd mcd is giving the bulls their own park named nandi park on the world environment day. The number of bulls on city street have grown because nobody wanted to keep a bull anymore since they have become a liability with the advent of machines have made them useless.
the bulls will cut their own chaffe and do other work for mcd to save diesel and electricity. some of the good bulls will be used as stud for breeding purposes. Report mentions that there are bulls that got names like toofan and kaalia based on their notoriety. Mcd have made different squad to catch such bulls.