Monday, January 25, 2010

Setting-up the development infrastructure 2 - Subversion

Installing Subversion is straightforward. With Fedora-Core 11 (FC11), we could install the necessary packages via yum:
$ yum install subversion mod_dav_svn

The package mod_dav_svn is needed for accessing Subversion repositories via Apache.

After the installation, we decided to have the Subversion repositories under /home/svn. We created one repository for our project:
$ cd /home/svn
$ svnadmin create our-project


Making Subversion repositories accessible via Apache


To make the repository accessible via Apache, we first had to configure Apache accordingly. The repository, and all future ones respectively, should be accessible via http://our-domain.org/svn/*. So, we had to configure a location in the default virtual host (/etc/http/conf.d/vhost.conf):
<VirtualHost *:80>
...
<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Subversion Repositories"
AuthUserFile /etc/subversion/svn-users
Require valid-user
</Location>
</VirtualHost>


The user passwords in the file /etc/subversion/svn-users are created with htpasswd.

To let Apache access the Subversion repository, we had to change the permissions of the corresponding directory:
$ cd /home/svn
$ chown -R apache:apache our-project

Since we did these steps, we can browse the repository via http://our-domain.org/svn/our-project.

Sunday, January 17, 2010

Setting-up the development infrastructure 1 - Redmine

The sooner we write down all decisions the better. Thus, the Wiki is the most important tool and has to be installed first.

Setting up Redmine is straightforward. We used Redmine's own installation guide. On Fedora-Core 11 (FC11), we had to install the following packages in advance:
$ yum install mysql mysql-server ruby rubygem-rake

We also installed the ruby-C-mysql-connector. Since the connector has to be built from scratch, we had to get additional FC11 packages:
$ yum install ruby-devel mysql-devel gcc

Installing these packages is necessary; without we got the errors:
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mysql
can't find header files for ruby.

and
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mysql
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***

Now, the ruby-C-mysql-connector can be installed via gem
$ gem install mysql


Making Redmine accessible via Apache


Since Redmine is written in Ruby on Rails, we use the Apache passenger module to pass client-request through Apache to Redmine. The passenger module is compiled from scratch, therefore, we installed the httpd-devel and gcc-c++ packages via yum and used gem to install the module:
$ yum install httpd-devel gcc-c++
$ gem install passenger
$ passenger-install-apache2-module

On FC11 and older Fedora-Core installations, the httpd configuration resides under /etc/httpd. The main config file is /etc/httpd/conf/httpd.conf. Since user configurations should go into the directory /etc/httpd/conf.d, we enabled virtual hosting by making the file /etc/httpd/conf.d/vhosts.conf:
NameVirtualHost *:80

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /usr/bin/ruby
LoadModule dav_svn_module modules/mod_dav_svn.so

<VirtualHost *:80>
ServerName our-domain.org
DocumentRoot /var/www/redmine-0.8.5/public
</VirtualHost>

By entering the address http://our-domain.org in a browser, we saw the Redmine start page.

Monday, December 7, 2009

The Server Room


As we do not earn money for the first couple of months, we have to be sparse with spending money for gadgets. That also means, we have only bought two old Dell PowerEdge 2650 servers with hardware RAID-5 and three SCSI harddisks each. The first step was to setup the two servers with Fedora Core 11 (FC11). We don't want to explain why we took FC11; we just did it. First problem: hardware RAID-5 is extremely slow. Let me make this clear: RAID-5 is extremely slow. After fiddling around with a lot of raid controller configurations; we gave software RAID-5 a try (you can setup software RAID-5 while installing FC11). Result: even slower. After a long discussion, we decided to try the following scenario:
We use one server with four hard disks and software RAID-1 (also via FC11 installation). We connected two disks at a time to a RAID-1 composite. The first is occupied with the partitions /boot and /; the second /home and /opt. To setup the RAID-1 composites we used the "Configuring Software RAID1 on Fedora Core using Disk Druid during system install" tutorial of Adam Ben-Gur.

The second server is used as spare in case we have to make a disaster recovery. How we prepare ourselves for a disaster recovery, we'll explain later.

The server now runs relatively fast. So, we can begin with installing the necessary tools for our project. Must haves: Wiki, task management, version control, continuous integration, issue tracking.

We decided to use:
Don't worry, we didn't forget about the backup setup for disaster recovery. We'll write about them later; when we have a running system to test backup restore and disaster recovery scenarios.

Tuesday, November 24, 2009

After a few beers...

... we, a five-brain team, joined and founded the company ambitz. Our primary goals are to realize a custom-made internet platform and to have a lot of fun. ambitz stands for an ambitious team -- a team that is led by passion, a team that is dedicated to an idea.

On a regularly basis we're going to write blogs about our work in progress. We will explain how we produce a valuable product with a low budget; provide insights into our infrastructure; describe what technical tool-set we use to accomplish our goal; illustrate how we solved the various technical problems we encounter (and already have encountered); let you take part in the joy of having an outstanding team; and show how we are spoiled by our personal chef.

So stay tuned and watch out!