Review Board and git used together

Source: Internet
Author: User

For a good purpose, before submitting the code, you must automatically notify the relevant personnel to review the code. After the review code owner approves the code, the code can be submitted to the code repository, otherwise, review the changes again.

Project engineers may not work in one place, such as ESRI, where engineers are distributed across different departments in different countries. Therefore, email and web sites are required to work together.

Our code management is also diverse. The US team uses starteam. We use git in China. There is a good review tool on git, called Gerrit. However, considering that we can take care of different warehouse management software, we should try the review board first, because it supports a lot of code management software and provides APIs for programming and extension. Site reference: http://www.reviewboard.org/

Environment:

Git and gitosis are installed on centos 6.2 (64bit) for management. Gitosis is a little old. Change it later. At the same time, the latest Lighttpd version is compiled and installed, and the review board version is used.

Git installation can refer to one of my articles: http://blog.csdn.net/sheismylife/article/details/7204345, although installed on Ubuntu, but on centos does not change much.

I will not talk about the installation details, but I will point out the problems I encountered and how to solve them.

1. Installation Documentation Reference http://www.reviewboard.org/docs/manual/1.6/admin/installation/linux/

2. I installed Lighttpd, download the source code, and compile the installation,: http://www.lighttpd.net/download

Do not care about FastCGI, because it is supported by default. Installation Documentation Reference: http://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource

Run./configure first. If you are prompted that any module needs to be installed, you can directly disable it.

After compilation,

Create an init script. Note that the centos script has a special description below:

If you're runningCentosOrRHELYou might need to change the first line to this

sed -e 's/FOO/lighttpd/g' doc/initscripts/rc.lighttpd.redhat > /etc/init.d/lighttpd

Then, you can edit the/etc/Lighttpd. conf file, modify the configuration, and set the port to 80. Because the link address in the email content does not contain the port number when the review board sends an email. Make it easier for everyone.

In addition, Lighttpd does not allow (of course you can try to bypass) to run directly with the root user, which allows you to start with the root permission and then switch to another user identity for running. I first created a Lighttpd user, and everything was fine. However, the review board needs to access the GIT repository and is directly accessed through the local file path, such as/home/git/repositories/maventest. git, So let Lighttpd run under the GIT user. This can also be configured in the Lighttpd. conf file.

In addition, to allow other machines to access Lighttpd, use 0.0.0.0 for configuration. Well, let's take a quick look at how I configured it.

#######################################################################                                                                                                          ##                                                                                                                                                                               ##  Basic Configuration                                                                                                                                                          ## ---------------------                                                                                                                                                         ##                                                                                                                                                                               server.port = 80##                                                                                                                                                                               ## Use IPv6?                                                                                                                                                                     ##                                                                                                                                                                               #server.use-ipv6 = "enable"                                                                                                                                                      ##                                                                                                                                                                               ## bind to a specific IP                                                                                                                                                         ##                                                                                                                                                                               server.bind = "0.0.0.0"##                                                                                                                                                                               ## Run as a different username/groupname.                                                                                                                                        ## This requires root permissions during startup.                                                                                                                                ##                                                                                                                                                                               server.username  = "git"server.groupname = "git"

Well, some of the tricky things have been introduced. The rest is the services since Review Board is installed, such as MySQL, memcached, and some other libraries and programs. Refer to the documents listed above.

Okay. Assuming that the review board has been installed, refer to the following document to create a site:

Http://www.reviewboard.org/docs/manual/1.6/admin/installation/creating-sites/

Note the following during creation:

Create a database in MySQL in advance. Its name seems to be reviewboard :)

When answering a question, you need to enter the MySQL user name and password that can be used, and the Review Board uses it to access MySQL, instead of creating users for you. I made a mistake at the beginning.

Specify the username and password of the administrator of the Review Board site, which will be used to log on to the website and set later.

At the end of my Lighttpd. conf file, introduce the configuration file prepared by review board for us.

include "/var/www/reviews.esri.com/conf/lighttpd.conf"

When you restart Lighttpd, a warning is triggered. Some modules have been referenced twice and can be manually modified and removed. It's not difficult to find it. I didn't record it at the time.

Okay. Now you can log on to our website. Oh, no. Check the firewall. The iptable rule does not allow me to access from outside. Turn it off directly.

Still not working. Take a look at the/var/www/reviews.example.com/conf/lighttpd.conf file and the configuration is as follows:

$ HTTP ["host"] = ~ "Battleship" indicates the Host Name of the server. It must have been generated when it was created automatically. OK. Modify the hosts file of the client.

10.112.18.104 battleship

Then access http: // battleship through a browser. I finally saw you!

Well, the content is too long to pass my habits. Open another article to describe how to configure and use it. There are still many things to introduce.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.