Documentation updates for gerrit

I managed to success setup an internal gerrit server following theses
instructions. I've included my notes for the process.

Change-Id: I18d06ca3e3030efc5f6b2f0dd697b289b89c38d4
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-on: https://review.openstack.org/16785
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Paul Belanger 2012-11-22 20:05:45 -05:00 committed by Jenkins
parent 5301a77462
commit 407a159acb

View File

@ -388,13 +388,13 @@ GitHub Configuration
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0 PTY allocation request failed on channel 0
You will also need to create the file ``github.secure.config`` in the gerrit2 user's home directory. The contents of this are as follows: You will also need to create the file ``github-projects.secure.config`` in the ``/etc/github/`` directory. The contents of this are as follows:
.. code-block:: ini .. code-block:: ini
[github] [github]
username = guthub-user username = guthub-user
api_token = hexstring password = string
The username should be the github username for gerrit to use when communicating The username should be the github username for gerrit to use when communicating
with github. The api_token can be found in github's account setting for the with github. The api_token can be found in github's account setting for the
@ -419,7 +419,7 @@ Create a Jenkins User in Gerrit
With the jenkins public key, as a gerrit admin user:: With the jenkins public key, as a gerrit admin user::
cat jenkins.pub | ssh -p29418 review.openstack.org gerrit create-account --ssh-key - --full-name Jenkins jenkins cat jenkins.pub | ssh -p29418 review.openstack.org gerrit create-account --ssh-key - --full-name Jenkins --email jenkins@openstack.org jenkins
Create "CI Systems" group in gerrit, make jenkins a member Create "CI Systems" group in gerrit, make jenkins a member
@ -634,6 +634,16 @@ Create a GPG and register it with Launchpad::
Log into the Launchpad account and add the GPG key to the account. Log into the Launchpad account and add the GPG key to the account.
Adding New Projects Adding New Projects
Generate an SSH key for Gerrit
------------------------------------------------
::
sudo su - gerrit2
gerrit2@gerrit:~$ ssh-keygen -f ~/.ssh/example_project_id_rsa
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
******************* *******************
Creating a new Gerrit Project with Puppet Creating a new Gerrit Project with Puppet
@ -660,6 +670,10 @@ file. This file contains two sections, the first is a set of default
config values that each project can override, and the second is a list config values that each project can override, and the second is a list
of projects (each may contain their own overrides). of projects (each may contain their own overrides).
As a Gerrit admin, create a user for example-project-creator::
cat ~gerrit2/.ssh/example_project_id_rsa | ssh -p29418 review.openstack.org gerrit create-account --ssh-key - --full-name "Example Project Creator" --email example-project-creator@example.org example-project-creator
#. Config default values:: #. Config default values::
- homepage: http://example.org - homepage: http://example.org
@ -673,6 +687,9 @@ of projects (each may contain their own overrides).
has-pull-requests: False has-pull-requests: False
has-downloads: False has-downloads: False
Note The gerrit-user 'example-project-creator' should be added to the
"Project Bootstrapers" group in :ref:`acl`.
#. Project definition:: #. Project definition::
- project: example/gerrit - project: example/gerrit
@ -1056,7 +1073,11 @@ These permissions try to achieve the high level goals::
-1/+1 registered users -1/+1 registered users
label approved (exclusive): 0/+1: opestack-stable-maint label approved (exclusive): 0/+1: opestack-stable-maint
refs/meta/*
push: project bootstrappers
refs/meta/config refs/meta/config
read: project bootstrappers
read: project owners read: project owners
API Projects (metaproject): API Projects (metaproject):