Build Service Developer Documentation
From openSUSE
Note: this document may contain better, worse, newer or older information than the file buildservice/src/README.devel in the svn repository. Eventually one document will win and continue to be maintained, and the other will refer to it.
Contents |
Architecture overview
The build service consists of three main components:
- the backend
- the frontend
- clients which connect to the frontend
Set up a development environment
Backend
The backend is not available in SVN yet.
Frontend
As there is no backend available in SVN yet, setting up the frontend locally is a bit pointless. Best to jump to the Webclient section for now...
The build service frontend and the web client are written in ruby and use ruby-on-rails, so you first need to install the following packages on your development system:
- ruby (version 1.8.2)
- rubygems
- rails (version 1.0)
- mysql
ruby and rubygems are available as packages for SUSE Linux, install them with your preferred installation tool.
To install ruby-on-rails, please install the rubygems package and run: "gem install -y rails" to install the rails libs on your system. To do this, run as root:
# gem install -y rails
This will install a few more things which are needed by rails. Eventually everything should be available as rpm packages, but we're not there yet.
The frontend uses a MySQL database. You need a database called "frontend_development" with the schema found in frontend/db/create_mysql.sql. To create this database:
If mysql isn't running, start it:
# rcmysql start
Give your database admin a password:
# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.18
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('your_password');
Query OK, 0 rows affected (0.00 sec)
mysql> SET PASSWORD FOR ''@'your_hostname' = PASSWORD('your_password');
Query OK, 0 rows affected (0.00 sec)
Create the database:
mysql> CREATE DATABASE frontend_development; Query OK, 1 row affected (0.00 sec)
Give the the opensuse user access to the database:
mysql> GRANT ALL ON frontend_development.* TO 'opensuse'@'localhost'; Query OK, 0 rows affected (0.00 sec)
The user name is configurable in src/frontend/config/database.yml, so feel free to use another one. If you will run the database on a different machine than the rest of the frontend, you'll need to replace 'localhost' with the respective hostname in the command above.
Web client
The web client has no user management on its own.

