Repository navigation
self-hosted: Correct Docker Compose settings which Sourcegraph does not read - #2162
Draft
marcleblanc2 wants to merge 2 commits into
Draft
marcleblanc2 wants to merge 2 commits into
marcleblanc2 wants to merge 2 commits into
Conversation
…ot read - INDEXED_SEARCH_INDEXERS is not a variable; the frontend reads INDEXED_SEARCH_INDEXER. - Nothing reads SYMBOLS_URL or AWS_STS_REGIONAL_ENDPOINTS. - Only the frontends read SRC_GIT_SERVERS, so the gitserver shard example no longer sets it on worker. - The collector has a debug exporter, not logging, and listens on localhost unless the receiver names an address. - The Compose debug ports were those of the removed single-container image. - The external database steps edited the base file of the 3.37 branch; point at the override examples in deploy-sourcegraph-docker instead, and list the code insights database variables. - The Caddyfile volume lines did not match the base file. Amp-Thread-ID: https://ampcode.com/threads/T-01a1d40c-fdd9-73bd-a123-0a3e4f0dc0c3 Co-authored-by: Amp <amp@ampcode.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Contributor
|
This comment has been minimized.
This comment has been minimized.
1 task done
Each snippet was run on Sourcegraph 8.2.0 with Docker Compose:
- Disable a service: mark the dependency on the disabled service as not
required, or Compose rejects the project
- Git SSH: the gitserver user (100:101) must own the files; `chmod -R 600`
on the directory makes it unreadable
- OpenTelemetry: `$JAEGER_HOST` is not expanded, `${env:JAEGER_HOST}` is;
the image's jaeger.yaml also reads JAEGER_OTLP_GRPC_PORT; the
googlecloud exporter rejects `retry_on_failure`
- Grafana: the base file publishes no Grafana port, so show the override
which publishes it on loopback; give the Compose authentication
override its own block under `services:`
Amp-Thread-ID: https://ampcode.com/threads/T-01a1d40c-fdd9-73bd-a123-0a3e4f0dc0c3
Co-authored-by: Amp <amp@ampcode.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An audit of the Docker Compose deployment (deploy-sourcegraph-docker#1507) checked the self-hosted pages against the v8.2.0 source and a running deployment. These pages tell customers to set things Sourcegraph does not read, or give steps which fail:
INDEXED_SEARCH_INDEXERSis not a variable. The frontend readsINDEXED_SEARCH_INDEXER.SYMBOLS_URLorAWS_STS_REGIONAL_ENDPOINTS.SRC_GIT_SERVERSonworker. Only the frontend services read it.loggingexporter, which the collector in the image rejects, and receivers without an address, which listen on localhost only, so no other container reaches them.3.37branch and tell customers to edit the base file. They never mention the code insights database.//builtins/...) do not match the base file, and the link goes to the3.14branch.service "sourcegraph-frontend-internal" depends on undefined service "codeintel-db".chmod -v -R 600makes the directory unreadable, and the files must belong to thegitservercontainer's user (100:101).'$JAEGER_HOST:4317', so it exports no spans. The image'sjaeger.yamlalso needsJAEGER_OTLP_GRPC_PORT. Thegooglecloudexporter rejectsretry_on_failure.localhost:3370on Docker Compose: the base file publishes no Grafana port. The Compose authentication override has noservices:key and sits inside the Helm block.Solution
debugexporter, receivers on0.0.0.0CODEINSIGHTS_PG*variables; the Compose steps use an override file and link theexternal-databasesandaws-rds-databasesexamples in deploy-sourcegraph-dockermainrequired: falseonmigratorandsourcegraph-frontend-internalchmod 700the directory,chmod 600the files, thenchownthem to100:101${env:JAEGER_HOST}, name both variablesjaeger.yamlreads, dropretry_on_failure, and say that your own Jaeger must serve its UI under/-/debug/jaeger(the bundled image ignoresQUERY_BASE_PATH)ssh -Lin place ofsshuttlefor a remote server, and the authentication override in its own block underservices:Not in this pull request:
#operationslink inpprof.mdx: fix/links: Fix broken links (50 moved pages) #1926postgres.mdxwhich fix/links: Replace or remove dead external links #1999 changes'$JAEGER_HOST:4317'inself-hosted/deploy/kubernetes/index.mdx: not tested on KubernetesTest plan
sourcegraph/sourcegraphand the pinnedsourcegraph/zoektrevisionloggingexporter and starts withdebug; with no receiver address it listens on127.0.0.1onlygitserver,searcher,worker, and the code intel workers connect withoutPG*variables of their owndocker compose config -qandup -dexit 0, 24 containers running against a stand-in external databasesshandgit ls-remotefrom insidegitserver-0authenticate with the key against a test SSH server'${env:JAEGER_HOST}:4317'exports spans (68);'$JAEGER_HOST:4317'logs "Exporting failed"jaeger.yamlwith onlyJAEGER_HOSTfails withinvalid port ""; thegooglecloudsnippet passes validation withoutretry_on_failurehttp://localhost:3370/-/debug/grafanareturns 200, and Docker binds127.0.0.1:3370only; the authentication override passesconfig -qunderservices:node dev/check-spelling.mjs --diff <(git diff -U0 origin/main): no issuespnpm run check links --check-anchors --check-self-links: no failure on a changed line (thepprof.mdx#operationsfailure is onmain)JAEGER_SERVER_URLwith a customer's own Jaeger