Tuesday, March 11, 2014
Faster capistrano deploy with skipping bundler and asset precompilation
Sunday, July 26, 2009
Give partial test release and get early feedback
In scrumpad project we give our test rollout on Tuesday and production rollout on Wednesday(if every thing goes well :) ). But soon we realized that one day after test deployment is not enough to provide a smooth production delivery, as we need to work on client feedback and issues after test rollout. This becomes a bigger issue if the client is in the opposite time zone, which gives us less time to communicate.
To resolve this issue we introduced partial test rollout with in the sprint, which helped us a big time. This way we get early feedback from client, which makes us more efficient in responding.
Benefits
- Early feedback reduces risk on successful production delivery
- Reduces the scope of communication gap between client and developers
Things to keep an eye on
- With in the sprint the code base can be unstable. To resolve this we predefine a date for partial test deployment, so that people are prepared and commit only stable code on that day. Before test rollout we run all the test codes and always keep a sharp eye on the continuous integration report so that our code base is kept stable.
- Be brave to give partial test rollout. Some functionality might break(so let the client be aware of this) but the early feedback will surely make your life easy :) . So iterate test deploy with in the iteration.
Thursday, July 9, 2009
Rails logger configuration and log level in production environment
In production environment, it not feasible to use one log file forever. So people use log that rolls over, depending on file size or time etc.
If we want to roll over the log file, we can define our custom logger using the following code in the configuration(in config/environments/production.rb).
config.logger = Logger.new(config.log_path, 50, 5242880)Here is the doc for instantiating Logger. The params are as follows.
Logger.new(name, shift_age = 7, shift_size = 1048576)<br />Logger.new(name, shift_age = 'weekly')Another thing that we need to set for the production is the log level. We do not need to log the query generated by active record or logs that are in debug level. So we can define the log level as follows.
config.logger = Logger.new(config.log_path, 50, 5242880)<br />config.logger.level = Logger::INFOBut if you are using the default log which rails offers by default, you can set the log level as,
config.log_level = :infoYou can find the rails environment configuration cheat sheet here.