Company code review Gerrit VS Gitlab

Source: Internet
Author: User
Tags http authentication ruby on rails

  • The meaning of Code review


    • Programmers in the world, different people, different backgrounds, different work experiences, levels and habits vary.

    • Like Loeb and cabbage, who will not abandon who, it is because they have different standards, and in the process of the world, from the open source community, there are countless predecessors according to their life experience summed up the law, is gradually becoming the standard of the procedural standards, with the standard, who went crooked, who walked right, at a glance.

    • China's special national conditions, resulting in the programmer is not respected, lack of engineer culture, resulting in programmers to move more frequently than the traditional industry or other occupations in the Internet, resulting in lines of business code is constantly being * * *, miserable, extremely difficult to maintain, not programmers are not serious, but the enterprise does not specify standards, Everyone in their own best way to do, nature is colorful.

    • Most of the work of programmers, boring, especially work for many years, all kinds of business models have come into contact, are constantly repeating themselves, not only the technology will not grow, the original passion has also been lost, reduced to real yards, no ideas, no self.

    • High-quality code is like art, a little bit less is not so natural, unified norms, let you review code is feeling team and one effect, like the martial arts of the human Sword of the realm, no matter how the rotation of the programmer, the standard is the same, is the follow-up management and maintenance costs greatly reduced.

    • Do not want to see the code to vomit, do not want to hear "fuck, who wrote the code, have the basic qualities?" "Such complaints, want to every afternoon to a cup of coffee, from code review start bar, below you recommend two review magic."


  • Gerrit Features and deployment

    • Gerrit is a free, open source code reviewer, with the earliest versions written in Python, followed by a gradual change to Java && (MySQL | | H2), the efficiency has been greatly improved, the following gives the introduction of Gerrit installation, just the key point of introduction, no fool's teaching.


    • 1) Install Git

      • {{{

        • Apt-get Install git

      • }}}

    • 2) Install Gerrit

      • Download Gerrit.war Bag: Http://code.google.com/p/gerrit/downloads/detail?name=gerrit-2.1.7-rc1.war

      • Initialize: (If you want to install Java OPENJDK first)

      • {{{

        • Java-jar gerrit-$version-rc1.war init-d review_site

        • Then I prompted to go, choose the MySQL storage mode, and HTTP authentication method, SMTP can also customize the settings, of course, you can also do their own SMTP server

        • Once executed, the Review_site folder is created in the current directory, which is the working directory of Gerrit.

      • }}}

    • 3) Install Nginx

      • {{{

        • Apt-get Install Nginx

      • }}}

    • 4) front-end with Nginx forwarding

      • {{{

        • Server {
                  server_name review.mastsumassage.cn;
                  Access_log/var/log/nginx/review.log;

                  location/{
          #                Proxy_set_header Host
                           auth_basic "Code Review Site";
                          Auth_basic_user_ file /usr/local/review_sites/etc/passwords;

        • Proxy_pass http://10.5.0.10:8000;
          Proxy_set_header X-real-ip $remote _addr;
          Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;
          }
          }

      • }}}

    • 5) gerrit.conf Configuration

      • {{{

        • [Gerrit]
          BasePath = git
          Canonicalweburl = Http://10.5.0.10:8000/

        • [HTTPD]
          Listenurl = Proxy-http://10.5.0.10:8000/

      • }}}

      • Then visit review.matsumassage.cn to see the page, but the user name and password are required

    • 6) Create user

      • Make the following commands according to the configuration path of the Nginx passwords file:

      • {{{

        • Htpasswd/usr/local/review_sites/etc/passwords FLWU

        • Enter Password two times

      • }}}

    • 7) User Login & Register Email

        • When the user logs in, the user enters MySQL and then needs to set an email to the user. Of course, if you configure the SMTP, then this is not necessary, if not, it is necessary to manually register the mailbox for the user to use in the development process of email notification.

        • {{{

          • To configure the content:

          • [[[

            • HOST Gerrit
                   USER admin
                   PORT 29418
                &N bsp;  HOSTNAME 10.5.0.10
                   identityfile ~/.ssh/id_rsa

          • ]]

          • If you add the user's certificate to the Gerrit, you can do it.

        • }}

        • The configuration for this Gerrit is over, followed by the creation of the project, but this is relatively simple.


  • Gitlab Features and deployment

    • Gitlab is an open source code moderator, written in Ruby on Rails, simple and efficient, fully functional, easy to use interface, project management and group management and support code multi-mode review, deployment is extremely simple, highly recommended by individuals.

    • Gitlab Official website has done the detailed installation steps, simple and efficient, please refer to: https://about.gitlab.com/downloads/

    • After selecting different operating systems, the installation methods and steps of different systems are given automatically.

    • Depending on the experience of the individual installation, there are some areas to note:

      • Install MySQL in advance without a password so gitlab can import the database.

      • Gitlab software download, and difficult, the file is too large, and the resource station is not many.

      • Gitlab configuration is simple, according to the steps of the official website will be installed on the SMTP mail server, more than Gerrit to stay cool.

      • After installation, direct IP access is OK, if you need to set up proxy, domain name can be in:/var/opt/gitlab/nginx file simple modification. A restart is required after the modification.

      • If you need a package, leave a message, email address, thank you.


This article is from the "Architecture Technology Digest" blog, so be sure to keep this source http://wufaliang.blog.51cto.com/3160882/1617960

Company code review Gerrit VS Gitlab

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.