commit | 8a5fbc847e01b1c01759be1a63c354d0dd315e23 | [log] [tgz] |
---|---|---|
author | Thomas Draebing <thomas.draebing@sap.com> | Thu Jan 03 16:40:33 2019 +0100 |
committer | Matthias Sohn <matthias.sohn@sap.com> | Wed Feb 20 15:28:56 2019 +0100 |
tree | e0a1f3ce2c29eed6627004be515a5c839015b147 | |
parent | 9cfd5b97b83fa7f3ea9721d16506b71a9b77495f [diff] |
Remove docker-setup-specific contents of gerrit-init image The purpose of this project is to provide a Kubernetes setup for Gerrit. Out of historical reasons the container images maintained by this project were built in a way to also support running a similar setup in docker. This causes a lot of additional effort and also adds contents to the containers that are not used in the Kubernetes context, which makes them larger and potentially more insecure than need be. This change removes the check of the filesystem permissions and the script starting the container in the docker setup. Since the script used to start up all containers in the docker setup does not start up any container anymore, it is removed as well. Change-Id: I33dfb591bbb218067b81b84ee977d0897cf1a9c4
Container images, configurations and Helm charts for installing Gerrit on Kubernetes.
Images to run a Gerrit master and slave setup based on the latest stable-2.12 Gerrit build.
To build all images, the build
-script in the root directory of the project can be used:
./build
If a specific image should be build, the image name can be specified as an argument. Multiple images can be specified at once:
./build gerrit-slave git-gc
The build-script usually uses the latest
-tag to tag the images. By using the --tag TAG
-option, a custom tag can be defined:
./build --tag test
The build script will in addition tag the image with the output of git describe --dirty
.
The single component images inherit a base image. The Dockerfile
for the base image can be found in the ./base
-directory. It will be automatically built by the ./build
-script. If the component images are built manually, the base image has to be built first with the target base:latest
, since it is not available in a registry and thus has to exist locally.
The publish script in the root directory of the project can be used to push the built images to the configured registry. To do so, log in first, before executing the script.
docker login <registry>
To configure the registry and image version, the respective values can be configured via env variables REGISTRY
and TAG
. In addition, these values can also be passed as command line options named --registry
and --tag
in which case they override the values from env variables:
./publish <component-name>
The <component-name>
is one of: apache-git-http-backend
, git-gc
, gerrit-slave
.
Adding the --update-latest
-flag will also update the images tagged latest
in the repository:
./publish --update-latest <component-name>
The container images are meant to be used by the helm-charts provided in this project. The images are thus not designed to be used in a standalone setup. To run Gerrit on Docker use the docker-gerrit project.
Currently, java is installed under /usr/lib/jvm/java-8-openjdk-amd64/jre
. Therefore, make sure that container.javaHome
is set to that path in the gerrit.config
:
javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre
The mysql-replication-init docker image is only required for setting up the Gerrit slave on Kubernetes. If deploying the Gerrit slave outside of Kubernetes, it can be ignored.
These Helm charts can be used to install a Gerrit cluster consisting of a Gerrit master and a Gerrit slave on a Kubernetes cluster.
To evaluate and test the helm-charts, they can be installed on a local machine running Minikube. Follow this guide to get a detailed description how to set up the Minikube cluster and install the charts.
Currently this deployment uses NFS, some options: