Skip to content

Commit 82288fe

Browse files
committed
Remove symbols statefulset
Starting in Sourcegraph 6.4, the Symbols and Searcher services are now combined, for easier operation, simplified architecture, and better resource utilization. Customers can delete the service if not deleted automatically, and may want to consider reallocating resources previously given to symbols to searcher. Environment variables should be copied over from symbols to searcher. Test plan: This deployment ran for ~2 weeks on S2 and dotcom already and has signoff from team-product-platform.
1 parent d08150f commit 82288fe

10 files changed

+4
-73
lines changed

docker-compose/docker-compose.yaml

+1-32
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ services:
118118
# Ports exposed to other Sourcegraph services: 6060/TCP, 3080 (HTTP), and/or 3443 (HTTPS)
119119
# Ports exposed to the public internet: none
120120
#
121-
# Note: SRC_GIT_SERVERS, SEARCHER_URL, and SYMBOLS_URL are space-separated
121+
# Note: SRC_GIT_SERVERS, and SEARCHER_URL are space-separated
122122
# lists which each allow you to specify more container instances for scaling
123123
# purposes. Be sure to also apply such a change here to the frontend-internal
124124
# service.
@@ -136,7 +136,6 @@ services:
136136
- 'SRC_GIT_SERVERS=gitserver-0:3178'
137137
- 'SRC_SYNTECT_SERVER=http://syntect-server:9238'
138138
- 'SEARCHER_URL=http://searcher-0:3181'
139-
- 'SYMBOLS_URL=http://symbols-0:3184'
140139
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
141140
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
142141
- 'GRAFANA_SERVER_URL=http://grafana:3370'
@@ -150,7 +149,6 @@ services:
150149
{ "Name": "frontend-internal-0", "Host": "sourcegraph-frontend-internal:6060" },
151150
{ "Name": "gitserver-0", "Host": "gitserver-0:6060" },
152151
{ "Name": "searcher-0", "Host": "searcher-0:6060" },
153-
{ "Name": "symbols-0", "Host": "symbols-0:6060" },
154152
{ "Name": "worker", "Host": "worker:6060" },
155153
{ "Name": "zoekt-indexserver-0", "Host": "zoekt-indexserver-0:6072" },
156154
{ "Name": "zoekt-webserver-0", "Host": "zoekt-webserver-0:6070", "DefaultPath": "/debug/requests/" }
@@ -189,7 +187,6 @@ services:
189187
- 'SRC_GIT_SERVERS=gitserver-0:3178'
190188
- 'SRC_SYNTECT_SERVER=http://syntect-server:9238'
191189
- 'SEARCHER_URL=http://searcher-0:3181'
192-
- 'SYMBOLS_URL=http://symbols-0:3184'
193190
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
194191
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
195192
- 'GRAFANA_SERVER_URL=http://grafana:3370'
@@ -355,7 +352,6 @@ services:
355352
- 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317'
356353
- 'SRC_GIT_SERVERS=gitserver-0:3178'
357354
- 'SEARCHER_URL=http://searcher-0:3181'
358-
- 'SYMBOLS_URL=http://symbols-0:3184'
359355
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
360356
- 'PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore'
361357
- 'PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000'
@@ -413,32 +409,6 @@ services:
413409
- sourcegraph
414410
restart: always
415411

416-
# Description: Backend for symbols operations.
417-
#
418-
# Disk: 128GB / non-persistent SSD
419-
# Ports exposed to other Sourcegraph services: 3184/TCP 6060/TCP
420-
# Ports exposed to the public internet: none
421-
#
422-
symbols-0:
423-
container_name: symbols-0
424-
image: 'index.docker.io/sourcegraph/symbols:6.1.2889@sha256:0ffea2e2d7641decf87587a2c0fbcedb172d876f71a10da4cd3e72b566ce12b4'
425-
cpus: 2
426-
mem_limit: '4g'
427-
environment:
428-
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
429-
- 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317'
430-
healthcheck:
431-
test: "wget -q 'http://127.0.0.1:3184/healthz' -O /dev/null || exit 1"
432-
interval: 5s
433-
timeout: 5s
434-
retries: 3
435-
start_period: 60s
436-
volumes:
437-
- 'symbols-0:/mnt/cache'
438-
networks:
439-
- sourcegraph
440-
restart: always
441-
442412
# Description: Prometheus collects metrics and aggregates them into graphs.
443413
#
444414
# Disk: 200GB / persistent SSD
@@ -781,7 +751,6 @@ volumes:
781751
searcher-0:
782752
sourcegraph-frontend-0:
783753
sourcegraph-frontend-internal-0:
784-
symbols-0:
785754
zoekt-0-shared:
786755
networks:
787756
sourcegraph:

prometheus/prometheus_targets.yml

-5
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
job: searcher
5252
targets:
5353
- searcher-0:6060
54-
- labels:
55-
nodename: "sourcegraph-docker-compose-host"
56-
job: symbols
57-
targets:
58-
- symbols-0:6060
5954
- labels:
6055
nodename: "sourcegraph-docker-compose-host"
6156
job: pgsql

pure-docker/deploy-frontend-internal.sh

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ docker run --detach \
3131
-e SRC_GIT_SERVERS="$(addresses "gitserver-" $NUM_GITSERVER ":3178")" \
3232
-e SRC_SYNTECT_SERVER=http://syntect-server:9238 \
3333
-e SEARCHER_URL="$(addresses "http://searcher-" $NUM_SEARCHER ":3181")" \
34-
-e SYMBOLS_URL="$(addresses "http://symbols-" $NUM_SYMBOLS ":3184")" \
3534
-e INDEXED_SEARCH_SERVERS="$(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH ":6070")" \
3635
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
3736
-e GRAFANA_SERVER_URL=http://grafana:3000 \

pure-docker/deploy-frontend.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ docker run --detach \
3232
-e SRC_GIT_SERVERS="$(addresses "gitserver-" $NUM_GITSERVER ":3178")" \
3333
-e SRC_SYNTECT_SERVER=http://syntect-server:9238 \
3434
-e SEARCHER_URL="$(addresses "http://searcher-" $NUM_SEARCHER ":3181")" \
35-
-e SYMBOLS_URL="$(addresses "http://symbols-" $NUM_SYMBOLS ":3184")" \
3635
-e INDEXED_SEARCH_SERVERS="$(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH ":6070")" \
3736
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
3837
-e GRAFANA_SERVER_URL=http://grafana:3370 \
@@ -43,7 +42,7 @@ docker run --detach \
4342
-p 0.0.0.0:$((3080 + $1)):3080 \
4443
index.docker.io/sourcegraph/frontend:187572_2022-12-06_cbecc5321c7d@sha256:73e64a8636e70ebbaf7f4a3300479529294f67e8cf644cdaea02435915aec869
4544

46-
# Note: SRC_GIT_SERVERS, SEARCHER_URL, and SYMBOLS_URL are space-separated
45+
# Note: SRC_GIT_SERVERS, and SEARCHER_URL are space-separated
4746
# lists which each allow you to specify more container instances for scaling
4847
# purposes. Be sure to also apply such a change here to the frontend-internal
4948
# service.

pure-docker/deploy-symbols.sh

-27
This file was deleted.

pure-docker/deploy-worker.sh

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ docker run --detach \
2424
-e INDEXED_SEARCH_SERVERS="$(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH ":6070")" \
2525
-e SEARCHER_URL="$(addresses "http://searcher-" $NUM_SEARCHER ":3181")" \
2626
-e SRC_GIT_SERVERS="$(addresses "gitserver-" $NUM_GITSERVER ":3178")" \
27-
-e SYMBOLS_URL="$(addresses "http://symbols-" $NUM_SYMBOLS ":3184")" \
2827
-e PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore \
2928
-e PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000 \
3029
-v $VOLUME:/mnt/cache \

pure-docker/deploy.sh

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ for i in $(seq 0 $(($NUM_GITSERVER - 1))); do ./deploy-gitserver.sh $i; done
2525
./deploy-worker.sh
2626
./deploy-otel-collector.sh
2727
for i in $(seq 0 $(($NUM_SEARCHER - 1))); do ./deploy-searcher.sh $i; done
28-
for i in $(seq 0 $(($NUM_SYMBOLS - 1))); do ./deploy-symbols.sh $i; done
2928
./deploy-syntect-server.sh
3029
for i in $(seq 0 $(($NUM_INDEXED_SEARCH - 1))); do ./deploy-zoekt-indexserver.sh $i; done
3130
for i in $(seq 0 $(($NUM_INDEXED_SEARCH - 1))); do ./deploy-zoekt-webserver.sh $i; done

pure-docker/replicas.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Here you can specify the number of service replicas to deploy.
22
NUM_GITSERVER=1
33
NUM_SEARCHER=1
4-
NUM_SYMBOLS=1
54
NUM_INDEXED_SEARCH=1
65
NUM_FRONTEND=3
76

8-
addresses() { for i in $(seq 0 $(($2 - 1))); do echo -n "$1$i$3 "; done }
7+
addresses() { for i in $(seq 0 $(($2 - 1))); do echo -n "$1$i$3 "; done; }

pure-docker/teardown.sh

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ docker rm -f redis-cache &>/dev/null || true &
2525
docker rm -f redis-store &>/dev/null || true &
2626
docker rm -f worker &>/dev/null || true &
2727
docker rm -f $(addresses "searcher-" $NUM_SEARCHER "") &>/dev/null || true &
28-
docker rm -f $(addresses "symbols-" $NUM_SYMBOLS "") &>/dev/null || true &
2928
docker rm -f syntect-server &>/dev/null || true &
3029
docker rm -f $(addresses "zoekt-indexserver-" $NUM_INDEXED_SEARCH "") &>/dev/null || true &
3130
docker rm -f $(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH "") &>/dev/null || true &

test/volume-config.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo
1818
echo "forcing static permissions on volume directories"
1919
echo
2020
pushd ~/sourcegraph-docker
21-
chown -R 100:101 gitserver* prometheus-v2* worker* searcher* sourcegraph-frontend* symbols* zoekt* blobstore-disk
21+
chown -R 100:101 gitserver* prometheus-v2* worker* searcher* sourcegraph-frontend* zoekt* blobstore-disk
2222
chown -R 999:1000 redis-store-disk redis-cache-disk
2323
chown -R 472:472 grafana-disk
2424
chown -R 999:999 pgsql-disk codeintel-db-disk

0 commit comments

Comments
 (0)