# Installation

## Gitaly and gRPC vs. FreeBSD
We cannot use our standard platform, [FreeBSD], because [Gitaly] uses [gRPC].  Gitaly is an [RPC] mechanism which
exposes git via RPC either locally or over a network.  The end goal of Gitaly is to make `git` calls faster through
caching (when available) but also to avoid the overhead of [NFS].  Even though it is designed primarily for network
use, it should still provide at least some performance enhancement when everything is running in `localhost mode`.

While the goal of Gitaly is grand, the implementation leaves a bit to be desired, specifically the use of gRPC.  Google
appears to have designed gPRC specifically to not build on FreeBSD.  However, there is a way to install the gRPC library
on FreeBSD through the Ports Collection, in `devel/grpc`.  Unfortunately, the ruby gem for gRPC does not check if this
library exists.  Rather, the gem compiler will always build the gRPC library for use in wrapping it to make a Ruby
Native Extension.  Due to the fact the gem does not check to see if the gRPC library is already installed, it cannot be
built on a FreeBSD system.  Worse still, the gRPC team and/or Google does not consider FreeBSD a priority.

 * https://github.com/grpc/grpc/issues/10411
 * https://github.com/grpc/grpc/issues/9721

## GitLab CI and Docker
We are now using the `Docker` runner in GitLab CI.  Please note, however, not all images contain all the tools required
for a specific build.  This is because Docker and the Docker Community build generic images.  Most of our [Maven]
projects require `git` as part of the build and/or versioning process.  To overcome this, it is possible to build
custom Docker images.  See the [DockerHelper/maven] project as an example.  For more information, see [Docker Config]

[FreeBSD]: https://freebsd.org/
[Gitaly]: https://gitlab.com/gitlab-org/gitaly
[gRPC]: http://grpc.io/
[RPC]: https://en.wikipedia.org/wiki/Remote_procedure_call
[NFS]: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html
[Docker]: https://docker.io/
[git]: https://git-scm.com/
[maven]: https://maven.apache.org/
[DockerHelper/maven]: https://felinewith.me/DockerHelper/maven
[Docker Config]: docker-config.html