Related CLI Commands
The table below provides the list of service-related commands and their descriptions:
|or2-manage-service...-s gerrit -a
||Activates the Gerrit service in the specified project and region
||Displays the details of VMs created during the service activation
||Describes the Gerrit services activated in the specified project and region
Further on this page, you can find more details on the Gerrit service manipulation.
Gerrit as a Service is deployed with two virtual machines each performing the dedicated function.
The main VM hosts the Gerrit server together with three additional storage volumes:
Such distribution enhances the system security by safekeeping the data in case of the Gerrit server failure.
Additionally, with such configuration the system capacity and, therefore, efficiency is increased.
The second VM hosts the MySQL database to which Gerrit refers.
Service Activation and Manipulation
Before activating Gerrit as a service, make sure that the following pre-requisites are met:
There is an empty Git repository which will be served by Gerrit
You have an SSH key created in the same project and region where Gerrit service will be run.
If no key is available, use the or2-create-keypair command to obtain an SSH key
The user activating Gerrit automatically becomes the Gerrit administrator to whom the SSH key is assigned.
To activate Gerrit as a Service, use the or2-manage-service (or2ms) command with the
-a/--activate flag and the -s/--service-name parameter with the gerrit value:
or2ms -p project -r region -a -s gerrit -k key_name -h shape
Add the SSH key created in the previous step and use the -h (--shape) option to specify the shape, if necessary.
If you send no SSH key during activation, you will have to enter it additionally to access the Gerrit UI.
Gerrit as a Service can only be activated in EPAM regions. AWS and Azure regions are currently not supported.
When the command is called, the system prompts for the path to the Git repository to be served by Gerrit.
The Git repository is a mandatory parameter. If the or2ms command is sent with no 'Git repository' value,
an error message will be returned, and the service will not be activated.
For additional customization, add the --customize flag to the or2ms command.
The following parameters can be customized during service activation:
|Disk size for attached volumes
|Name of general storage device*
|Name of git replica dir device*
|Name of cache directory device*
|Git repository to be served by Gerrit
*Used only in AWS regions.
The service, when activated, by default starts a Gerrit server VM with the following configuration:
- Image: Ubuntu14.04 64-bit LTS
- Shape: MEDIUM
- Additional volumes: 3 volumes 100 GB each (only for the Gerrit server)
As soon as the service gets activated, its status will be marked as initialized in or2-describe-services (or2dser) command response.
You can find the details on the VMs created within the service activation, by calling the or2-describe-instances (or2din) or
or2-describe-services (or2dser) commands with -S gerrit parameter:
or2din -p project -r region -S gerrit
After the Gerrit service has been activated, access the Gerrit server and generate another SSH key to be used with the Git repository.
Add the public part of the key to the repository.
Logging to Gerrit
Authentication to Gerrit is performed through the LDAP protocol referring to EPAM Active Directory.
Your login (firstname_lastname) must be up to 20 characters long. If your first and last name are longer than that, truncate your last name.
The login must be entered in lowercase.
Gerrit has an own Web UI where code review can be performed.
Dynamic Integration with Jenkins
For additional convenience of the development process, EPAM Cloud supports dynamic integration of Gerrit and Jenkins.
Such integration allows checking builds for consistency and reports any errors detected.
To integrate Gerrit and Jenkins, activate a Jenkins service for the same project for which you have already activated Gerrit.
When the Jenkins service is activated, it automatically creates its dedicated SSH key and a Jenkins job. This job receives data from the Git repository
specified in Gerrit and writes to the Gerrit database whenever any build errors are found.
The service usage price is defined by the price of the VM on which Gerrit is running.
The default parameters of a Gerrit instance are:
Image: Ubuntu14.04 64-bit LTS
Additional volumes: 3 volumes 100 GB each
The approximate monthly cost of a Gerrit server with 100% and 24/7 load is about $62.36 in EPAM-BY2 region (as of 05/12/2017).
The default parameters of a MySQL database VM are:
Image: Ubuntu14.04 64-bit LTS
The approximate monthly cost of a MySQL database VM with 100% and 24/7 load is about $42.2 in EPAM-BY2 region (as of 05/12/2017).
Therefore, the total price of a Gerrit service with the configuration and usage pattern described above is $104.56 per month.
The price can vary depending on the region and the usage pattern.
To get more detailed estimations, please, use our Cost Estimator tool.
Below is a list of documents related to this section. You can find the full list of our documents
in the Documentation Storage.
Please select the required document: