<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ivan Kuznetsov</title>
	<atom:link href="http://www.ivankuznetsov.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ivankuznetsov.com</link>
	<description>Entrepreneur, Ruby on Rails and Ubuntu fanatic, consultant</description>
	<lastBuildDate>Tue, 18 May 2010 18:39:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Running Rails applications using Nginx with Passenger on Ubuntu Server</title>
		<link>http://www.ivankuznetsov.com/2010/05/running-rails-applications-using-nginx-with-passenger-on-ubuntu-server.html</link>
		<comments>http://www.ivankuznetsov.com/2010/05/running-rails-applications-using-nginx-with-passenger-on-ubuntu-server.html#comments</comments>
		<pubDate>Fri, 14 May 2010 10:40:50 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web/Tech]]></category>
		<category><![CDATA[mod_rails]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=279</guid>
		<description><![CDATA[If you&#8217;re planning to run Rails applications on Nginx using Phusion Passenger, and do it on Ubuntu Linux, here&#8217;s what needs to be done. Even though there&#8217;s Ubuntu nginx package available (which works perfectly when you&#8217;re running PHP apps using FCGI), if you want to take into use Phusion Passenger, you&#8217;ll need to recompile Nginx [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ivankuznetsov.com/wp-content/uploads/enterprise_logo.png"><img class="alignleft size-full wp-image-281" title="enterprise_logo" src="http://www.ivankuznetsov.com/wp-content/uploads/enterprise_logo.png" alt="" width="261" height="68" /></a>If you&#8217;re planning to run <a href="http://rubyonrails.org/" target="_blank">Rails</a> applications on <a href="http://www.nginx.org" target="_blank">Nginx</a> using <a href="http://www.modrails.com/" target="_blank">Phusion Passenger</a>, and do it on <a href="http://www.ubuntu.com" target="_blank">Ubuntu</a> Linux, here&#8217;s what needs to be done.</p>
<p>Even though there&#8217;s Ubuntu nginx package available (which works perfectly when you&#8217;re running <a href="http://www.ivankuznetsov.com/2010/05/moving-joomla-wordpress-and-other-phpfastcgi-apps-to-nginx.html">PHP apps using FCGI</a>), if you want to take into use Phusion Passenger, you&#8217;ll need to recompile Nginx from sources.</p>
<p>Instructions below were verified on Ubuntu 10.04 (Lucid Lynx) Server Edition.</p>
<p><span id="more-279"></span></p>
<p>If you already have Nginx ubuntu package installed, uninstall it (NOTE! purge will delete all configuration files &#8211; so if you changed them &#8211; make a backup for future reference):</p>
<pre>sudo aptitude purge nginx</pre>
<p>Assuming you already have Rails stack installed, install Passenger gem:</p>
<pre>sudo gem install passenger</pre>
<p>At the time of this writing the latest version of Passenger is 2.2.11</p>
<p>Let&#8217;s check dependencies that Ubuntu nginx package has and install them before compilation:</p>
<pre>aptitude show nginx | grep Depends</pre>
<div>You&#8217;ll see something like:</div>
<pre>Depends: libc6 (&gt;= 2.4), libpcre3 (&gt;= 7.7), libssl0.9.8 (&gt;= 0.9.8k-1), zlib1g</pre>
<div>Install build dependencies and start nginx module installation (it will offer you to recompile nginx)</div>
<pre>sudo apt-get install libc6 libpcre3 libssl0.9.8 zlib1g
sudo /usr/local/bin/passenger-install-nginx-module</pre>
<div>Choose option 1 (Yes: download, compile and install Nginx for me) unless you need special configuration parameters or need features not enabled by default (like SSL).</div>
<div>Further instructions assume that you also chose default installation directory /opt/nginx.</div>
<div>If you&#8217;ve purchased Passenger Enterprise Edition, don&#8217;t forget to register it:</div>
<pre>sudo /usr/local/bin/passenger-make-enterprisey</pre>
<div>Now add nginx init script (I just copied this from Ubuntu default nginx package):</div>
<pre>sudo vim /etc/init.d/nginx</pre>
<div>with the following content:</div>
<pre>#! /bin/sh

### BEGIN INIT INFO
# Provides:          nginx
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the nginx web server
# Description:       starts nginx using start-stop-daemon
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/nginx/sbin
DAEMON=/opt/nginx/sbin/nginx
NAME=nginx
DESC=nginx

test -x $DAEMON || exit 0

# Include nginx defaults if available
if [ -f /etc/default/nginx ] ; then
        . /etc/default/nginx
fi

set -e

. /lib/lsb/init-functions

test_nginx_config() {
  if nginx -t $DAEMON_OPTS
  then
    return 0
  else
    return $?
  fi
}

case "$1" in
  start)
        echo -n "Starting $DESC: "
        test_nginx_config
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON -- $DAEMON_OPTS || true
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON || true
        echo "$NAME."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: "
        start-stop-daemon --stop --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON || true
        sleep 1
        test_nginx_config
        start-stop-daemon --start --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true
        echo "$NAME."
        ;;
  reload)
        echo -n "Reloading $DESC configuration: "
        test_nginx_config
        start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/$NAME.pid \
            --exec $DAEMON || true
        echo "$NAME."
        ;;
  configtest)
        echo -n "Testing $DESC configuration: "
        if test_nginx_config
        then
          echo "$NAME."
        else
          exit $?
        fi
        ;;
  status)
        status_of_proc -p /var/run/$NAME.pid "$DAEMON" nginx &amp;&amp; exit 0 || exit $?
        ;;
  *)
        echo "Usage: $NAME {start|stop|restart|reload|force-reload|status|configtest}" &gt;&amp;2
        exit 1
        ;;
esac

exit 0</pre>
<div>Now make this script executable add it to default run levels:</div>
<pre>sudo chmod +x /etc/init.d/nginx
sudo /usr/sbin/update-rc.d -f nginx defaults</pre>
<div>Edit  nginx.conf to look like this:</div>
<pre>user www-data;
worker_processes  4;

error_log  /opt/nginx/logs/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  8192;
    use epoll;
}

http {
    passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11;
    passenger_ruby /usr/local/bin/ruby;

    include       /opt/nginx/conf/mime.types;

    # set a default type for the rare situation that
    # nothing matches from the mimie-type include
    default_type application/octet-stream;

    # This log format is compatible with any tool like awstats
    # that can parse standard apache logs.
    log_format main '$remote_addr - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"' ;

    access_log  /opt/nginx/logs/access.log;

    sendfile        on;
    tcp_nopush     on;

    keepalive_timeout  0;
    tcp_nodelay        on;

    gzip  on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
    gzip_http_version 1.0;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    include /opt/nginx/conf/sites-enabled/*;
}</pre>
<div>Now create virtual hosts structure (so that it looks like the structure created by Ubuntu original nginx package):</div>
<div>
<pre>sudo mkdir /opt/nginx/conf/sites-available
sudo mkdir /opt/nginx/conf/sites-enabled</pre>
</div>
<div>Now it is time to configure your first rails site. Create virtual host configuration in sites-available.</div>
<pre>sudo vim /opt/nginx/conf/sites-available/mysite.com</pre>
<div>Content can be something like:</div>
<pre>server {
        listen   80;
        server_name  www.mysite.com;

        access_log  /home/user/logs/www.mysite.com/access.log;
        root   /home/user/www.mysite.com/public;

        # serve static content directly
        location ~* \.(ico|jpg|gif|png|css|js|swf|html)$ {
          if (-f $request_filename) {
            expires max;
            break;
          }
        }

        passenger_enabled on;

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
          deny  all;
        }
}</pre>
<div>Make a symlink in sites-enabled directory and restart nginx.</div>
<pre>sudo ln -s /opt/nginx/conf/sites-available/mysite.com /opt/nginx/conf/sites-enabled/mysite.com
sudo /etc/init.d/nginx restart</pre>
<div>Now open the browser and check that your site is working.</div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F05%2Frunning-rails-applications-using-nginx-with-passenger-on-ubuntu-server.html&amp;linkname=Running%20Rails%20applications%20using%20Nginx%20with%20Passenger%20on%20Ubuntu%20Server"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/05/running-rails-applications-using-nginx-with-passenger-on-ubuntu-server.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moving Joomla, WordPress and other PHP/FastCGI apps to Nginx</title>
		<link>http://www.ivankuznetsov.com/2010/05/moving-joomla-wordpress-and-other-phpfastcgi-apps-to-nginx.html</link>
		<comments>http://www.ivankuznetsov.com/2010/05/moving-joomla-wordpress-and-other-phpfastcgi-apps-to-nginx.html#comments</comments>
		<pubDate>Fri, 14 May 2010 07:01:50 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web/Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[fast-cgi]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=272</guid>
		<description><![CDATA[Have you moved your site from Apache to Nginx and now your FastCGI (php-cgi/spawn-fcgi) processes die/hang/crash periodically and your users see &#8220;HTTP 502 Bad gateway&#8221; or &#8220;HTTP 504 Gateway timeout&#8221; instead of a website? I have faced this problem and found a relatively simple and robust solution. Here&#8217;s how I did it on Ubuntu 9.10 (Karmic [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ivankuznetsov.com/wp-content/uploads/nginx-logo.png"><img class="alignleft size-full wp-image-273" title="nginx-logo" src="http://www.ivankuznetsov.com/wp-content/uploads/nginx-logo.png" alt="" width="350" height="90" /></a>Have you moved your site from <a href="http://apache.org/" target="_blank">Apache</a> to <a href="http://nginx.org/" target="_blank">Nginx</a> and now your FastCGI (php-cgi/spawn-fcgi) processes die/hang/crash periodically and your users see &#8220;HTTP 502 Bad gateway&#8221; or &#8220;HTTP 504 Gateway timeout&#8221; instead of a website?</p>
<p>I have faced this problem and found a relatively simple and robust solution. Here&#8217;s how I did it on Ubuntu 9.10 (Karmic Koala) and 10.04 (Lucid Lynx) server edition.</p>
<p><span id="more-272"></span>Solution was to replace default FastCGI implementation with <a href="http://php-fpm.org/" target="_blank">PHP-FPM</a> (FastCGI Process Manager). PHP-FPM is not supported in PHP out of the box &#8211; so if you use PHP 5.2.*, you&#8217;ll need to apply a patch and recompile PHP, and if you&#8217;re using PHP 5.3.* (at least in 5.3.2 PHP-FPM is not yet in the core) &#8211; you&#8217;ll need to check out PHP-FPM from PHP SVN.</p>
<p>Let&#8217;s start with uninstalling default Ubuntu php packages:</p>
<pre>sudo apt-get remove php5*</pre>
<p>Now we need to install dependencies. Note, that Ubuntu comes with a new autoconf tool version, which is <a href="https://bugs.launchpad.net/ubuntu/+source/php5/+bug/411890" target="_blank">not compatible</a> with PHP, that&#8217;s why for successful compilation you need to temporarily install autoconf2.13 package.</p>
<pre>sudo apt-get install libcurl4-openssl-dev libmcrypt-dev libxml2-dev libpng-dev 
autoconf2.13 libevent-dev libltdl-dev</pre>
<p>Download latest stable PHP 5.2.13, Suhosin patch, PHP-FPM patch</p>
<pre>cd ~/tmp
wget <a href="http://pl2.php.net/get/php-5.2.13.tar.gz/from/pl.php.net/mirror">http://pl2.php.net/get/php-5.2.13.tar.gz/from/pl.php.net/mirror</a>
wget <a href="http://download.suhosin.org/suhosin-patch-5.2.13-0.9.7.patch.gz">http://download.suhosin.org/suhosin-patch-5.2.13-0.9.7.patch.gz</a>
wget <a href="http://php-fpm.org/downloads/php-5.2.13-fpm-0.5.13.diff.gz">http://php-fpm.org/downloads/php-5.2.13-fpm-0.5.13.diff.gz</a>
tar xvzf php-5.2.13.tar.gz
gunzip suhosin-patch-5.2.13-0.9.7.patch.gz
gunzip php-5.2.13-fpm-0.5.13.diff.gz
cd php-5.2.13
patch -p 1 -i ../php-5.2.13-fpm-0.5.13.diff
patch -p 1 -i ../suhosin-patch-5.2.13-0.9.7.patch
./buildconf --force
./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --with-openssl
--with-mysql --with-mysql-sock --with-gd --without-sqlite --disable-pdo
make
make test
sudo make install</pre>
<p>Alternatively you can download latest stable PHP 5.3.2, Suhosin patch, apply PHP-FPM patch. Note, that not all PHP based projects and plugins work correctly with new PHP 5.3 &#8211; it is not backwards compatible with PHP 5.2. I had troubles at least with some Joomla plugins and ZenCart.</p>
<pre>cd ~/tmp
<a href="http://fi.php.net/get/php-5.3.2.tar.gz/from/this/mirror">http://fi.php.net/get/php-5.3.2.tar.gz/from/this/mirror</a>
wget <a href="http://download.suhosin.org/suhosin-patch-5.3.2-0.9.9.1.patch.gz">http://download.suhosin.org/suhosin-patch-5.3.2-0.9.9.1.patch.gz</a>
tar xvzf php-5.3.2.tar.gz
gunzip suhosin-patch-5.3.2-0.9.9.1.patch.gz
cd php-5.3.2
patch -p 1 -i ../suhosin-patch-5.3.2-0.9.9.1.patch
svn co <a href="http://svn.php.net/repository/php/php-src/trunk/sapi/fpm">http://svn.php.net/repository/php/php-src/trunk/sapi/fpm</a> sapi/fpm
./buildconf --force
./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --with-openssl
--with-mysql --with-mysql-sock --with-gd --without-sqlite --disable-pdo --disable-reflection
make
make test
sudo make install</pre>
<p>Uninstall autoconf2.13 after compilation.</p>
<pre>sudo apt-get remove autoconf2.13</pre>
<p>Change user and group of php-fpm processes to user and group of your choice (e.g. www-data and www-data) &#8211; lines 63 and 66</p>
<pre>sudo vim /usr/local/etc/php-fpm.conf</pre>
<p>Edit PHP settings</p>
<pre>sudo vim /etc/php5/cgi/php.ini (in Ubuntu 9.xx)</pre>
<pre>sudo vim /etc/php5/apache2/php.ini (in Ubuntu 10.04)</pre>
<p>Set:</p>
<pre>max_execution_time = 30
memory_limit = 128M
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
display_errors = Off
log_errors = On
error_log = /var/log/php.log
register_globals = Off</pre>
<p>Now if you haven&#8217;t done so yet, install Nginx. Ubuntu 10.04 comes with the latest stable Nginx 0.7.65, so just do:</p>
<pre>sudo apt-get install nginx</pre>
<p>Now you can congifure your sites, e.g. for WordPress Nginx configuration can look like this:</p>
<pre>server {
        listen   80;
        server_name  blog.mysite.com;

        access_log  /home/user/logs/blog.mysite.com/access.log;

        location / {
          root   /home/user/blog.mysite.com;
          index  index.php index.html index.htm;

          # this serves static files that exist without running other rewrite tests
          if (-f $request_filename) {
              expires 30d;
              break;
          }

          # this sends all non-existing file or directory requests to index.php
          if (!-e $request_filename) {
              rewrite ^(.+)$ /index.php?q=$1 last;
          }

        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
          include /etc/nginx/fastcgi_params;
          fastcgi_pass  127.0.0.1:9000;
          fastcgi_index index.php;
          fastcgi_param  SCRIPT_FILENAME  /home/user/blog.mysite.com/$fastcgi_script_name;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
          deny  all;
        }
}</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F05%2Fmoving-joomla-wordpress-and-other-phpfastcgi-apps-to-nginx.html&amp;linkname=Moving%20Joomla%2C%20WordPress%20and%20other%20PHP%2FFastCGI%20apps%20to%20Nginx"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/05/moving-joomla-wordpress-and-other-phpfastcgi-apps-to-nginx.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting up your own git server on Ubuntu</title>
		<link>http://www.ivankuznetsov.com/2010/05/setting-up-your-own-git-server-on-ubuntu.html</link>
		<comments>http://www.ivankuznetsov.com/2010/05/setting-up-your-own-git-server-on-ubuntu.html#comments</comments>
		<pubDate>Thu, 13 May 2010 12:39:00 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[gitosis]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=262</guid>
		<description><![CDATA[This will create a new user &#8216;gitosis&#8217; and prepare a structure for repositories in /srv/gitosis. Now let&#8217;s initialize a gitosis-admin repo &#8211; it is used for managing repositories and access Of course there&#8217;s always an option to use github. And if you&#8217;re working on an open source project, or want to concentrate on coding and [...]]]></description>
			<content:encoded><![CDATA[<p>This will create a new user &#8216;gitosis&#8217; and prepare a structure for repositories in /srv/gitosis. Now let&#8217;s initialize a gitosis-admin repo &#8211; it is used for managing repositories and access<img class="alignleft size-full wp-image-261" title="git-logo" src="http://www.ivankuznetsov.com/wp-content/uploads/git-logo.png" alt="" width="97" height="188" /></p>
<p>Of course there&#8217;s always an option to use <a href="http://www.github.com" target="_blank">github</a>. And if you&#8217;re working on an open source project, or want to concentrate on coding and not system administration, github is a lot better option than setting up and managing your own git server (I&#8217;ve been so impressed by <a href="http://twitter.com/defunkt" target="_blank">@defunkt</a>&#8216;s presentation on <a href="http://www.frozenrails.eu" target="_blank">#frozenrails</a>, that started recommending github to everyone <img src='http://www.ivankuznetsov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But if you already pay for a virtual machine somewhere (like <a href="http://www.linode.com" target="_blank">Linode</a>), then setting up your own git server might be a viable option, especially that it is sooo easy.</p>
<p>The following instructions have been verified on Ubuntu 10.04 Lucid Lynx, but should work at least on Ubuntu 9.04 and 9.10 just as well.</p>
<p><span id="more-262"></span></p>
<p>Let&#8217;s start with installing gitosis itself. Issue the following command on the server:</p>
<pre>sudo apt-get install gitosis</pre>
<p>This will create a new user &#8216;gitosis&#8217; and prepare a structure for repositories in /srv/gitosis. Now let&#8217;s initialize a gitosis-admin repo &#8211; it is used for managing repositories and access rights.</p>
<pre>sudo -H -u gitosis gitosis-init &lt; ~/tmp/my_public.key</pre>
<p>You need to have a public key for accessing it. If you don&#8217;t have one yet, you can use</p>
<pre><code>ssh-keygen -t rsa</code></pre>
<p>command on your local machine to generate public/private key pair. Copy public key to the server before initializing gitosis-admin repository.</p>
<p>Now with gitosis-admin repo initialized on the server &#8211; let&#8217;s clone it to the local computer.</p>
<pre>git clone gitosis@myserver.com:gitosis-admin.git</pre>
<p>If you see an error like:</p>
<pre>Permission denied (publickey).
fatal: The remote end hung up unexpectedly</pre>
<p>That is most likely because you restricted access to you server via ssh to only certain users, and gitosis is not one of them. Edit /etc/ssh/sshd_config, find AllowUsers line and add gitosis to the list.</p>
<p>Now that you have successfully cloned gitosis-admin repo to your local computer, you can add  new users and new repositories.</p>
<p>To add new repository, edit gitosis.conf and add lines like:</p>
<pre>[group myrepo]
writable = myrepo
members = user@computer</pre>
<p>After that commit and push the changes to gitosis-admin project:</p>
<pre>git commit -a -m "Added myrepo repository"</pre>
<p>Now you can clone this new repository to your local machine (note .git added to the name of the repository):</p>
<pre>git clone gitosis@mygitserver.com:myrepo.git</pre>
<p>To allow new user to access your repository, get this user&#8217;s public key, copy it to gitosis-admin/keydir as newuser@computer.pub, then edit gitosis.conf and add newuser@computer (without .pub) to the list of members:</p>
<pre>[group myrepo]
writable = myrepo
members = user@computer newuser@computer</pre>
<p>Now add new files and commit and push changes to git server (make sure you really add all files and don&#8217;t forget to push &#8211; these are quite common mistakes when adding new users).</p>
<pre>git add .
git commit -m "Added user newuser"
git push</pre>
<p>With a freshly cloned empty repository you&#8217;ll need to add you first files, do a commit and push origin master:</p>
<pre>vim README.txt
git commit -a -m "Added readme"
git push origin master</pre>
<p>Now you can git pull and git push as much as you like.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F05%2Fsetting-up-your-own-git-server-on-ubuntu.html&amp;linkname=Setting%20up%20your%20own%20git%20server%20on%20Ubuntu"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/05/setting-up-your-own-git-server-on-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Informal notes from #frozenrails 2010</title>
		<link>http://www.ivankuznetsov.com/2010/05/informal-notes-from-frozenrails-2010.html</link>
		<comments>http://www.ivankuznetsov.com/2010/05/informal-notes-from-frozenrails-2010.html#comments</comments>
		<pubDate>Tue, 11 May 2010 07:17:53 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web/Tech]]></category>
		<category><![CDATA[frozenrails]]></category>
		<category><![CDATA[ror]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=248</guid>
		<description><![CDATA[Thanks to organisers from Kisko Labs and the HHLinuxClub on Friday, May 7th, 2010 Finland got its first  Rails conference. Conference has drawn very interesting speakers and  international crowd &#8211; from Finland (naturally), Sweden, Poland, Germany, Russia and other countries. I made a few notes from selected talks on the conference. Chris Wanstrath / GitHub (@defunkt) Slides: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ivankuznetsov.com/wp-content/uploads/frozen_rails_logo.png"><img class="alignleft " title="frozen_rails_logo" src="http://www.ivankuznetsov.com/wp-content/uploads/frozen_rails_logo.png" alt="" width="99" height="95" /></a>Thanks to organisers from <a href="http://www.kiskolabs.com/">Kisko Labs</a> and the <a href="http://www.hhlinuxclub.org/">HHLinuxClub</a> on Friday, May 7th, 2010 Finland got its first  Rails conference.</p>
<p>Conference has drawn very interesting speakers and  international crowd &#8211; from Finland (naturally), Sweden, Poland, Germany, Russia and other countries. I made a few notes from selected talks on the conference.</p>
<h3>Chris Wanstrath / GitHub (<a href="http://twitter.com/defunkt" target="_blank">@defunkt</a>)</h3>
<ul>
<li>Slides: <a href="http://www.slideshare.net/err/inside-github" target="_blank">http://www.slideshare.net/err/inside-github</a></li>
<li><a href="http://www.youtube.com/watch?v=4XpnKHJAok8" target="_blank">Linus Trovalds Google tech talk about git</a> &#8211; where Linus tell you that you&#8217;re stpid if you&#8217;re not using git</li>
<li><a href="http://github.com/talison/rack-mobile-detect" target="_blank">rack-mobile-detect</a> – is used by GitHub, super useful if you&#8217;re planning to create mobile optimized version</li>
<li>GitHub uses Unicorn as an application server – personally I&#8217;m not sure if that&#8217;s better than Apache + Passenger. Chris tells that Unicorn is cool, because does fair load balancing on Linux kernel level, also Rails are loaded only once &#8211; and then required number of processes are forked &#8211; and this is very fast, a lot faster than loading rails separately for each Mongrel. And when one of the processes dies &#8211; there&#8217;s no need to re-load Rails, but just fork another process.</li>
<li>GitHub users <a href="http://github.com/blog/531-introducing-bert-and-bert-rpc" target="_blank">BERT</a> to forward requests to one of their six servers – BERT to Erlang is the same as JSON to JavaScript</li>
<li>GitHub doesn&#8217;t use <a href="http://github.com/collectiveidea/delayed_job" target="_blank">delayed_job</a> anymore since they needed several queues with different priorities &#8211; so far they use <a href="http://github.com/blog/542-introducing-resque" target="_blank">resque</a>, but are considering developing a real queue management system</li>
</ul>
<p><span id="more-248"></span></p>
<h3>Jose Valim / Plataforma (<a href="http://twitter.com/josevalim" target="_blank">@josevalim</a>)</h3>
<ul>
<li>Brazilian Rails consultants and developers: <a href="http://plataformatec.com.br/" target="_blank">http://plataformatec.com.br/</a></li>
<li>Developed several interesting components to make their life easier &#8211; extracted common components from several customer projects and open-sourced them</li>
<li>User authorisation and roles: Devise – <a href="http://blog.plataformatec.com.br/2010/04/authentication-is-with-devise/" target="_blank">http://blog.plataformatec.com.br/2010/04/authentication-is-with-devise/</a></li>
<li><a href="http://blog.plataformatec.com.br/2010/04/authentication-is-with-devise/" target="_blank"></a>Nice forms with labels, error handling, etc. : Simple Form – <a href="http://github.com/plataformatec/simple_form" target="_blank">http://github.com/plataformatec/simple_form</a></li>
</ul>
<h3>Mike Dirolf / MongoDB (<a href="http://twitter.com/mdirolf" target="_blank">@mdirolf</a>) &amp; Jonathan Weiss / CouchDB (<a href="http://twitter.com/jweiss" target="_blank">@jweiss</a>)</h3>
<ul>
<li>Two very interesting NoSQL presentations: <a href="http://www.slideshare.net/mdirolf/mongodb-at-frozenrails" target="_blank">http://www.slideshare.net/mdirolf/mongodb-at-frozenrails</a>, <a href="http://www.slideshare.net/jweiss/couchdb-on-rails-frozenrails-2010" target="_blank">http://www.slideshare.net/jweiss/couchdb-on-rails-frozenrails-2010</a></li>
<li>Answering a question from the audience Mike said that fault tolerance is something that is not quite there yet in MongoDB &#8211; there is a possibility to do recovery, but there&#8217;s a chance data might be lost</li>
<li>There is no such issue in CouchDB, it also is written in Erland and provides REST API</li>
<li>Links to project homepages: <a href="http://couchdb.apache.org/" target="_blank">http://couchdb.apache.org/</a> &amp;<a href=" http://www.mongodb.org/" target="_blank"> http://www.mongodb.org/</a> &#8211; worth taking a look at both</li>
</ul>
<h3>Yehuda Katz / EngineYard (<a href="http://twitter.com/wycats" target="_blank">@wycats</a>)</h3>
<ul>
<li>Very interesting presentation about developing web application for mobile devices (in Rails 3)</li>
<li>One of the central messages &#8211; HTML5 is coming &#8211; learn how to use it now, if you want to stay in business</li>
<li>I really hope Yehuda will publish his slides &#8211; it was a presentation worth spreading around</li>
<li>interesting thoughts:
<ul>
<li>same optimization methods as we traditionally use for Rails apps on desktop are not suitable for mobile browsers due to constraints &#8211; connection availability, memory, cpu, battery, etc.</li>
<li>don&#8217;t count on browser cach on mobile devices – separate data and presentation, cache presentation using localStorage feature of HTML5, load only data from the web after that</li>
<li>mobile browsers are updated a lot faster than desktop borwser &#8211; there are new browsers in the new phones, and nobody uses 2 year old phone</li>
<li>HTML5 will become mainstream on mobile devices a lot faster than on desktop (IE6 will not happen on mobile)</li>
<li>when developing apps for mobile take into account that in some places people still pay per kilobyte of traffic</li>
<li>incremental rendering on the mobile is evil &#8211; it consumes battery and can be very slow, unpleasant and unusable for the user</li>
</ul>
</li>
<li>battery &#8211; unoptimized sites can easily drain the battery, and even though users are most likely to blame the phone manufacturer it is good to think about it</li>
<li>http://Railsdispatch.com – recommended reading about Rails 3</li>
</ul>
<h3>Carl Lerche / Engine Yard (<a href="http://twitter.com/carllerche" target="_blank">@carllerche</a>)</h3>
<ul>
<li>Carl told about Rails 3 and migration to version 3 from earlier ones <a href="http://www.slideshare.net/carllerche/frozen-rails-slides" target="_blank">http://www.slideshare.net/carllerche/frozen-rails-slides</a></li>
<li>Migration itself is not that difficult (provided that you know what you&#8217;re doing) – it can even be done in 15 minutes, but thus far stability and performance of Rails 3 / Ruby 1.9.1 are not quite there yet</li>
<li>Rails 3 is not finished &#8211; the plan is to make RC for RailsConf, and the it will be released “when it’s ready”</li>
<li>When asked if they have done performance tests on Rails 3, Carl answered that, yes, they did, and its sad.  Performance optimization is the next big step after stabilization.</li>
<li>When asked which Ruby release is better to use with Rails 3, Carl answered &#8211; 1.8.7, since Ruby 1.9.1 still segfaults and is not ready for production sites.</li>
</ul>
<h3>JetBrains (<a href="http://twitter.com/rubymine" target="_blank">@rubymine</a>):</h3>
<ul>
<li>new release of RubyMine is available with Rails3 support</li>
<li>guys from JetBrains tell that  TextMate development/maintenance is lagging behind, and they observe migration of TextMate and even vim users to RubyMine (there&#8217;s now vim interface emultion)</li>
</ul>
<h3>overall impression:</h3>
<ul>
<li>Apple is the king – virtually everybody was walking around with either MacBook, iPhone, iPad or all of the above</li>
<li>first Rails conference in Finland was a huge success &#8211; I really hope there will be FrozenRails 2011</li>
</ul>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F05%2Finformal-notes-from-frozenrails-2010.html&amp;linkname=Informal%20notes%20from%20%23frozenrails%202010"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/05/informal-notes-from-frozenrails-2010.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>No space left on device &#8211; running out of Inodes</title>
		<link>http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html</link>
		<comments>http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html#comments</comments>
		<pubDate>Wed, 10 Feb 2010 09:12:56 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file system]]></category>
		<category><![CDATA[Inode]]></category>
		<category><![CDATA[no space left]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=238</guid>
		<description><![CDATA[One of our development servers went down today. Problems started with deployment script that claimed that claimed &#8220;No space left on device&#8221;, although partition was not nearly full. If you ever run into such trouble &#8211; most likely you have too many small or 0-sized files on your disk, and while you have enough disk [...]]]></description>
			<content:encoded><![CDATA[<p>One of our development servers went down today. Problems started with deployment script that claimed that claimed &#8220;No space left on device&#8221;, although partition was not nearly full. If you ever run into such trouble &#8211; most likely you have too many small or 0-sized files on your disk, and while you have enough disk space, you have exhausted all available <a href="http://www.linfo.org/inode.html" target="_blank">Inodes</a>. Below is the solution for this problem.</p>
<p><span id="more-238"></span></p>
<p>1. check available disk space to ensure that you still have some</p>
<pre style="padding-left: 30px;">$ df

<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">Filesystem           1K-blocks      Used Available Use% Mounted on</span>
/dev/xvda             33030016  10407780  22622236  32% /
tmpfs                   368748         0    368748   0% /lib/init/rw
varrun                  368748        56    368692   1% /var/run
varlock                 368748         0    368748   0% /var/lock
udev                    368748       108    368640   1% /dev
tmpfs                   368748         0    368748   0% /dev/shm</pre>
<p>2. check available Inodes</p>
<pre style="padding-left: 30px;">$ df -i

<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">Filesystem            Inodes   IUsed   IFree IUse% Mounted on</span>
/dev/xvda            2080768 2080768       0  100% /
tmpfs                  92187       3   92184    1% /lib/init/rw
varrun                 92187      38   92149    1% /var/run
varlock                92187       4   92183    1% /var/lock
udev                   92187    4404   87783    5% /dev
tmpfs                  92187       1   92186    1% /dev/shm</pre>
<div>If you have IUse% at 100 or near, then huge number of small files is the reason for &#8220;No space left on device&#8221; errors.</div>
<p>3. find those little bastards</p>
<pre style="padding-left: 30px;">$ for i in /*; do echo $i; find $i |wc -l; done</pre>
<p>This command will list directories and number of files in them. Once you see a directory with unusually high number of files (or command just hangs over calculation for a long time), repeat the command for that directory to see where exactly the small files are.</p>
<pre style="padding-left: 30px;">$ for i in /home/*; do echo $i; find $i |wc -l; done</pre>
<p>4. once you found the suspect &#8211; just delete the files</p>
<pre style="padding-left: 30px;">$ sudo rm -rf /home/bad_user/directory_with_lots_of_empty_files</pre>
<p>You&#8217;re done. Check the results with df -i command again. You should see something like this:</p>
<pre style="padding-left: 30px;">Filesystem            Inodes   IUsed   IFree IUse% Mounted on

/dev/xvda            2080768  284431 1796337   14% /
tmpfs                  92187       3   92184    1% /lib/init/rw
varrun                 92187      38   92149    1% /var/run
varlock                92187       4   92183    1% /var/lock
udev                   92187    4404   87783    5% /dev
tmpfs                  92187       1   92186    1% /dev/shm</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F02%2Fno-space-left-on-device-running-out-of-inodes.html&amp;linkname=No%20space%20left%20on%20device%20%26%238211%3B%20running%20out%20of%20Inodes"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git &#8211; revert or amend last commit</title>
		<link>http://www.ivankuznetsov.com/2010/01/git-revert-or-amend-last-commit.html</link>
		<comments>http://www.ivankuznetsov.com/2010/01/git-revert-or-amend-last-commit.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 20:15:53 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=232</guid>
		<description><![CDATA[Since we moved from SVN to git in HeiaHeia I had to revert or amend changes I accidentally committed or committed and pushed to git repository. This is not the most common operation, so I have to browse the documentation every time I do that. This is more of a memo to myself, which hopefully [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Git" src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Git-logo.svg/71px-Git-logo.svg.png" alt="" width="71" height="26" />Since we moved from SVN to git in <a href="http://www.ivankuznetsov.com/2010/01/heiaheia-probably-the-most-fun-way-to-keep-fit-2.html">HeiaHeia</a> I had to revert or amend changes I accidentally committed or committed and pushed to git repository. This is not the most common operation, so I have to browse the documentation every time I do that. This is more of a memo to myself, which hopefully will be useful to others too.</p>
<p>Committed some changes, didn&#8217;t push them, and need to amend the commit:</p>
<pre>git commit --amend -a -m "Commit message"</pre>
<p>Committed some changes, pushed them, and need to amend the commit, do the revert operation instead, since someone might&#8217;ve already used your changes.</p>
<p>Committed some changes, didn&#8217;t push them, and need to undo the commit:</p>
<pre>git reset --hard HEAD<code>^</code></pre>
<p>This will just toss away the last commit completely.</p>
<p>Commited some changes, pushed them, and need to undo the commit:</p>
<pre>git revert HEAD</pre>
<p>This will automatically create a new commit, reverting the changes from the previous</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F01%2Fgit-revert-or-amend-last-commit.html&amp;linkname=Git%20%26%238211%3B%20revert%20or%20amend%20last%20commit"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/01/git-revert-or-amend-last-commit.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web hosting for internet startups</title>
		<link>http://www.ivankuznetsov.com/2010/01/web-hosting-for-internet-startups.html</link>
		<comments>http://www.ivankuznetsov.com/2010/01/web-hosting-for-internet-startups.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 18:02:41 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[Linode]]></category>
		<category><![CDATA[Web/Tech]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=227</guid>
		<description><![CDATA[A lot of companies launching their own internet services have faced the same question &#8211; where to host. Over the course of the last few months I was asked for opinion on this matter several times. While I have no definitive answer, here are some recommendations. Don&#8217;t start with maximum capacity, start small, and think [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Linode" src="http://www.linode.com/images/linode_logo_gray.png" alt="" width="288" height="65" />A lot of companies launching their own internet services have faced the same question &#8211; where to host. Over the course of the last few months I was asked for opinion on this matter several times. While I have no definitive answer, here are some recommendations.</p>
<p>Don&#8217;t start with maximum capacity, start small, and think about scalability &#8211; how fast you can do it, and how you will do it. Then map the plans to what your selected hosting provider offers. Avoid temptation to use your own hardware, unless you really have resources for administering and maintaining it and a real need to have physical access to the servers. Even companies using their own hardware use virtualization to run virtual machines on top of physical ones.</p>
<p>Two years ago, when we were just experimenting with ideas of the social training log, a shared hosting option on Dreamhost gave us the best prices/features/quality combination. When we launched first closed version of the service named <a href="http://www.ivankuznetsov.com/2009/03/introducing-moozement.html">Moozement</a> at the time, we switched to Dreamhost VPS, which allowed enough flexibility and had reasonable pricing. For <a href="http://www.heiaheia.com" target="_blank">HeiaHeia</a> (<a href="http://www.ivankuznetsov.com/2010/01/heiaheia-probably-the-most-fun-way-to-keep-fit-2.html" target="_self">Moozement beta version</a>) we&#8217;ve chosen <a href="http://www.linode.com/?r=9fabdff6a260bde81ad4c6df63ec6a26f6940e94" target="_blank">Linode</a>, as it offers Xen virtualization (as opposed to Dreamhost&#8217;s VServer), servers with up to 14400Mb of RAM, easy resizing, wide selection of Linux distributions, and several data centres to choose from, including one in London. As HeiaHeia grows, we are preparing for the next step, but for now Linode proved to be excellent choice.</p>
<p>If your company is based in EU, you also need to remember about <a href="http://en.wikipedia.org/wiki/Data_Protection_Directive" target="_blank">EU Data Protection Directive</a> &#8211; your servers need to be physically located in one of the European Union countries or in the US with a provider following <a href="http://en.wikipedia.org/wiki/Safe_Harbor_Principles" target="_blank">Safe Harbor Principles</a>.</p>
<p>If you have no clue about how much CPU/RAM/traffic your application will need &#8211; check reference cases &#8211; there are plenty on the internet. Here are just a couple of examples: social network <a href="http://highscalability.com/blog/2009/9/22/how-ravelry-scales-to-10-million-requests-using-rails.html" target="_blank">Ravelry</a> and Facebook app <a href="http://highscalability.com/friends-sale-architecture-300-million-page-view-month-facebook-ror-app" target="_blank">Friends for Sale</a>.</p>
<p>Want second opinion? Check these:</p>
<ul>
<li>Teemu Kurppa from Huikea has a <a href="http://dirtyaura.org/blog/2009/09/22/programmer-friendly-virtual-private-server-hosts/" target="_blank">great write up on choosing hosting subject</a> &#8211; Teemu has chosen Slicehost</li>
</ul>
<ul>
<li>Eivind Uggedal has a <a href="http://journal.uggedal.com/vps-performance-comparison">very thorough comparison</a> of Slicehost, Linode, Prgmr, Rackspace and Amazon EC2 pricing and performance and arrives at a conclusion that Linode gives you best bang for the buck.</li>
</ul>
<p>In case you decide to use Linode, use <a href="http://www.linode.com/?r=9fabdff6a260bde81ad4c6df63ec6a26f6940e94">this referral link</a> to give us some reward <img src='http://www.ivankuznetsov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you&#8217;re planning to host a low traffic service, and don&#8217;t want to spend much time on system administration &#8211; Dreamhost is a great starting point. And as I <a href="http://www.ivankuznetsov.com/2008/03/radiant-cms.html">already wrote earlier</a>, <a href="http://www.dreamhost.com/">Dreamhost</a> provides excellent value for money. If you are looking for a good hosting – use IVANKUZNETSOV promocode and get a $50 discount when setting up an account on Dreamhost.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F01%2Fweb-hosting-for-internet-startups.html&amp;linkname=Web%20hosting%20for%20internet%20startups"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/01/web-hosting-for-internet-startups.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HeiaHeia &#8211; probably the most fun way to keep fit!</title>
		<link>http://www.ivankuznetsov.com/2010/01/heiaheia-probably-the-most-fun-way-to-keep-fit-2.html</link>
		<comments>http://www.ivankuznetsov.com/2010/01/heiaheia-probably-the-most-fun-way-to-keep-fit-2.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 12:48:42 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[HeiaHeia]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=224</guid>
		<description><![CDATA[Wow, what an autumn it has been! It has come and gone so fast. By Christmas 2009 a major milestone was reached &#8211; Moozement moved from Alpha to Beta phase. Most of my time and efforts went into development of the service &#8211; and it was exciting time of super intensive work in a small, [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<dl class="wp-caption alignleft" style="width: 369px;">
<dt class="wp-caption-dt"><img title="HeiaHeia" src="http://www.heiaheia.com/images/heiaheia_logo.png?1263594504" alt="" width="359" height="63" /></dt>
</dl>
</div>
<p>Wow, what an autumn it has been! It has come and gone so fast. By Christmas 2009 a major milestone was reached &#8211; <a href="http://www.ivankuznetsov.com/2009/03/introducing-moozement.html">Moozement</a> moved from Alpha to Beta phase. Most of my time and efforts went into development of the service &#8211; and it was exciting time of super intensive work in a small, but very dedicated team.</p>
<p>Beta version brought with it new professional design, easier to use interface, new interaction concepts, new sports, new faster servers.  We decided to change the name of the service as well and were inspired by a hypnotic <em>Heia</em>! <em>Heia</em>! chant that Norwegians use to support their cross-country skiers and other athletes. We named our service <a href="http://www.heiaheia.com" target="_blank">HeiaHeia</a> to give it a spell of positive cheering among friends.</p>
<p>Sports and wellbeing are hot markets both regarding hardware and web service innovation. HeiaHeia&#8217;s focus is on the social aspect of sports – mastering the ways in which friends can motivate each other in a positive spirit, without being overly competitive. The difference between us and most of the other players is that we want to provide a service which anybody can use. You don&#8217;t need any kind of technical gear to use the service, and the service itself is as easy to use as Facebook.</p>
<p>The HeiaHeia philosophy on sports is that everything counts. HeiaHeia already supports over 250 different types of sports, most of them requested by users of the service. Understanding user behaviour and user requests will remain a guiding principle in the development of HeiaHeia.</p>
<p>Work doesn&#8217;t stop here, and new functionalities will be introduced on a weekly basis going forward, in a true Web 2.0 mode of development.We are looking forward to a very exciting year ahead.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2010%2F01%2Fheiaheia-probably-the-most-fun-way-to-keep-fit-2.html&amp;linkname=HeiaHeia%20%26%238211%3B%20probably%20the%20most%20fun%20way%20to%20keep%20fit%21"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2010/01/heiaheia-probably-the-most-fun-way-to-keep-fit-2.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Agile distributed team &#8211; using chat to run scrum meetings</title>
		<link>http://www.ivankuznetsov.com/2009/10/agile-distributed-team-using-chat-to-run-scrum-meetings.html</link>
		<comments>http://www.ivankuznetsov.com/2009/10/agile-distributed-team-using-chat-to-run-scrum-meetings.html#comments</comments>
		<pubDate>Mon, 19 Oct 2009 16:42:53 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[remote work]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=212</guid>
		<description><![CDATA[The current development team that I&#8217;m working in is really small &#8211; just 2 software gurus, a product owner and me as a scum-master/system admninistrator/part-time developer/architect. Our team is distributed to the extent that sometimes all four of us are located in different places during our meetings &#8211; but time zones difference is in most [...]]]></description>
			<content:encoded><![CDATA[<p>The current development team that I&#8217;m working in is really small &#8211; just 2 software gurus, a product owner and me as a scum-master/system admninistrator/part-time developer/architect.</p>
<p>Our team is distributed to the extent that sometimes all four of us are located in different places during our meetings &#8211; but time zones difference is in most of the cases withing 1-2 hours. Up until recently some of us didn&#8217;t have a permanent office and had to participate in daily scrum meetings, and sprint planning/reviews from public open spaces.<span id="more-212"></span></p>
<p>We tired to use Skype, but flakiness of wireless in some locations and sometimes just insufficient bandwith quickly rendered it as a non-viable option. Even with commercial telco systems it is quite often that people spend first 10 minutes of the meeting on making sure that everyone is on the line and can hear the other party &#8211; can be really frustrating, especially when the meeting is supposed to last for 15 minutes.</p>
<p>In the end we started using Google Talk for daily scrum meetings and for sprint planning / reviews as well. Works really good &#8211; keeps reports short and to the point. No time is lost on setting up voice connections and exchanging &#8220;can you hear me &#8211; you are breaking up&#8221;.</p>
<p>I believe two major factors that contribute to success use of chat are that:<br />
1. the team is small and<br />
2. everyone is in equal position</p>
<p>When a part of the team is located in the same physical space and there is just one or two people on the other side of the telephone &#8211; most important discussions tend to take place face-2-face, and remote members of the team are excluded. Using chat ensures that those team members who happen to be in the same office are talking to each other the same way as if they were remote.</p>
<p>It would be interesting to hear experiences from other teams that are running scrum with chat as primary means of communication.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2009%2F10%2Fagile-distributed-team-using-chat-to-run-scrum-meetings.html&amp;linkname=Agile%20distributed%20team%20%26%238211%3B%20using%20chat%20to%20run%20scrum%20meetings"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2009/10/agile-distributed-team-using-chat-to-run-scrum-meetings.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading iPhone firmware using VMWare and Ubuntu 9.04</title>
		<link>http://www.ivankuznetsov.com/2009/10/upgrading-iphone-firmware-using-vmware-and-ubuntu-9-04.html</link>
		<comments>http://www.ivankuznetsov.com/2009/10/upgrading-iphone-firmware-using-vmware-and-ubuntu-9-04.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 07:35:10 +0000</pubDate>
		<dc:creator>Ivan Kuznetsov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.ivankuznetsov.com/?p=210</guid>
		<description><![CDATA[This was the second time I upgrade firmware on my iPhone, and second time I ran into the same problem.  In the middle of the update iTunes reports &#8220;Unknown error&#8221; and iPhone dies (well, goes into recovery mode, but it is not much help). If that happened to you, don&#8217;t panic! To make this geeky [...]]]></description>
			<content:encoded><![CDATA[<p>This was the second time I upgrade firmware on my iPhone, and second time I ran into the same problem.  In the middle of the update iTunes reports &#8220;Unknown error&#8221; and iPhone dies (well, goes into recovery mode, but it is not much help). If that happened to you, don&#8217;t panic! To make this geeky combination (Ubuntu 9.04, VMware, iTunes and iPhone software update) work, there&#8217;s a little trick you need to do.<span id="more-210"></span>My setup:</p>
<p>- iPhone 3G 8Gb Sonera<br />
- Ubuntu Linux 9.04 (Jaunty) on Lenovo T61 laptop, kernel 2.6.28-15<br />
- VMware player 2.5.3<br />
- guest OS: WinXP Home SP3 with iTunes 9.0.1.8</p>
<p>goal: upgrading firmware to 3.1.2</p>
<p>I used instructions on <a href="http://freshfoo.com/blog/iphone_upgrade_with_vmware" target="_blank">Menno Smits&#8217; blog</a>. Here&#8217;s the summary:</p>
<p>1. Create a file /etc/modprobe.d/blacklist-usb</p>
<blockquote><p>sudo vim /etc/modprobe.d/blacklist-usb</p></blockquote>
<p>2. Add usb modules not to be loaded into that file</p>
<blockquote><p>blacklist snd_usb_audio<br />
blacklist usbhid</p></blockquote>
<p>I didn&#8217;t list ehci_hcd, and it still worked. By the way, USB HID stands for USB Human Interface Device, and blacklisting it might disable your USB mouse and keyboard as well. See a link in the end of the post how to work around it.</p>
<p>3. Unload blacklisted modules manually, in case if they have been loaded already</p>
<blockquote><p>sudo /sbin/modprobe -r snd_usb_audio<br />
sudo /sbin/modprobe -r usbhid</p></blockquote>
<p>4. Reload kernel event manager for the changes to take effect</p>
<blockquote><p>sudo /etc/init.t/udev reload</p></blockquote>
<p>5. Restart VMware and make sure you also restart Windows in VMware (it took me seveal attempts to figure that this was the problem)</p>
<p>6. Now start iPhone software update in iTunes or &#8220;restore and update&#8221;, if you already tried without disabling usbhid and got your iPhone into recovery mode.</p>
<p>7. After update is complete, remove the blacklist file and restart kernel event manager again</p>
<blockquote><p>sudo rm /etc/modprobe.d/blacklist-usb<br />
sudo /etc/init.t/udev reload</p></blockquote>
<p>If iTunes in WMware do not see iPhone, make sure that it is connected in VMware removable devices menu. Note that during firmware update iPhone might get disconnected &#8211; just connect it again using VMware removable devices menu.</p>
<p>I tried to verify suggestion from <a href="http://teknofire.net/articles/2009/01/08/using-linux-and-vmware-to-update-iphone-firmware/" target="_blank">Will</a> to disable only iPhone in ubuntu, using its USB ID, but don&#8217;t actually know if it worked, because I didn&#8217;t restart Windows in WMware and restore and update failed. Here&#8217;s what I did:</p>
<p>- connected iPhone and checked its USB ID:</p>
<blockquote><p>$ lsusb</p>
<p>Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 001 Device 024: ID 05ac:1292 Apple, Inc.<br />
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
Bus 003 Device 004: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller<br />
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub</p></blockquote>
<p>- created a file /etc/modprobe.d/usbhid</p>
<blockquote><p>sudo vim /etc/modprobe.d/usbhid</p></blockquote>
<p>with the following content</p>
<blockquote><p>options usbhid quirks=0×05ac:0×1292:0×04</p></blockquote>
<p>where 0&#215;1292 is the USB ID displayed by lsusb command, and 0&#215;04 is the instruction to ignore device with specified USB ID.</p>
<p>- did everything as isteps 1-7 except that I didn&#8217;t blacklist usbhid and didn&#8217;t unload it manually.</p>
<p>It would be interesting to know if anyone succeeds with iPhone firmware update on Ubuntu without blacklisting usbhid module completely.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.ivankuznetsov.com%2F2009%2F10%2Fupgrading-iphone-firmware-using-vmware-and-ubuntu-9-04.html&amp;linkname=Upgrading%20iPhone%20firmware%20using%20VMWare%20and%20Ubuntu%209.04"><img src="http://www.ivankuznetsov.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.ivankuznetsov.com/2009/10/upgrading-iphone-firmware-using-vmware-and-ubuntu-9-04.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
