Add images for gitlab-zoekt chart
What does this MR do?
These images will be used by gitlab-org/cloud-native/charts/gitlab-zoekt!1 (merged) . These Dockerfile
are copying the same approach taken for gitlab-container-registry/Dockerfile
.
I had previously implemented minimal images based on Alpine Go in gitlab-org/cloud-native/charts/gitlab-zoekt!2 (closed) but I guess for this CNG project we probably really want to depend on gitlab-go
to save bandwidth and so-on so I've adapted to the patterns of this repo.
More discussions about these images can be found in the readiness review at gitlab-com/gl-infra/readiness!146 (comment 1300887310) and the Helm chart at gitlab-org/cloud-native/charts/gitlab-zoekt!1 (comment 1301627202)
How to test it
docker build -t gitlab-zoekt-dynamic-indexserver -f gitlab-zoekt-dynamic-indexserver/Dockerfile gitlab-zoekt-dynamic-indexserver
docker build -t gitlab-zoekt-webserver -f gitlab-zoekt-webserver/Dockerfile gitlab-zoekt-webserver
mkdir /tmp/zoekt-repos /tmp/zoekt-index && sudo chown 1000:1000 /tmp/zoekt-*
docker run -p 6060:6060 --name gitlab-zoekt-dynamic-indexserver --rm -v /tmp/zoekt-repos:/data/repos -v /tmp/zoekt-index:/data/index gitlab-zoekt-dynamic-indexserver
docker run -p 6070:6070 --name gitlab-zoekt-webserver --rm -v /tmp/zoekt-index:/data/index gitlab-zoekt-webserver
curl -XPOST -d '{"CloneUrl":"https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer.git","RepoId":2953390}' -H 'Content-Type: application/json' http://127.0.0.1:6060/index
- See search results
$ curl -XPOST -d '{"Q":"gitaly","RepoIDs":[2953390]}' 'http://127.0.0.1:6070/api/search' |jq . { "Result": { "ContentBytesLoaded": 58728, "IndexBytesLoaded": 441, "Crashes": 0, "Duration": 464177, "FileCount": 11, "ShardFilesConsidered": 0, "FilesConsidered": 11, "FilesLoaded": 11, "FilesSkipped": 0, "ShardsScanned": 1, "ShardsSkipped": 0, "ShardsSkippedFilter": 0, "MatchCount": 96, "NgramMatches": 116, "Wait": 18076, "RegexpsConsidered": 0, "FlushReason": 0, "Files": [ { "Score": 727.3157894736842, "Debug": "", "FileName": "git/gitaly.go", "Repository": "2953390", ...
Related issues
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Integration tests added to GitLab QA - GitLab QA tests for the Zoekt integration would need to be added after it is supported in Omnibus. It's not a near term goal to support this for self-managed so prioritizing these containers to support deployment on GitLab.com makes more sense.
-
The impact any change in container size has should be evaluated REPOSITORY TAG IMAGE ID CREATED SIZE gitlab-zoekt-webserver latest cdb6c6a7dd70 About a minute ago 233MB <none> <none> d584d37def31 About a minute ago 731MB gitlab-zoekt-dynamic-indexserver latest e14d1c998faa 7 minutes ago 316MB <none> <none> 1b2c6b1afdbd 7 minutes ago 682MB registry.gitlab.com/gitlab-org/build/cng/gitlab-base master 4f895d111284 About an hour ago 157MB registry.gitlab.com/gitlab-org/build/cng/gitlab-go master 095ffe131cc9 About an hour ago 518MB