Remove GitHub proxy service (#942)

See sourcegraph/sourcegraph#55290, we're removing this service in favor of deployment simplicity with a redis-based equivalent.
This commit is contained in:
Erik Seliger authored and GitHub committed 2023-10-12 15:19:12 +02:00
1 parent 60ef9eb5eb
commit 216c11be94
12 files changed
+27 -92

No files matched your search

-26
View File
@@ -141,7 +141,6 @@ services:
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
- 'REPO_UPDATER_URL=http://repo-updater:3182'
- 'GRAFANA_SERVER_URL=http://grafana:3370'
- 'GITHUB_BASE_URL=http://github-proxy:3180'
- 'PROMETHEUS_URL=http://prometheus:9090'
- 'PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore'
- 'PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000'
@@ -154,7 +153,6 @@ services:
{ "Name": "searcher-0", "Host": "searcher-0:6060" },
{ "Name": "symbols-0", "Host": "symbols-0:6060" },
{ "Name": "repo-updater", "Host": "repo-updater:6060" },
{ "Name": "github-proxy", "Host": "github-proxy:6060" },
{ "Name": "worker", "Host": "worker:6060" },
{ "Name": "zoekt-indexserver-0", "Host": "zoekt-indexserver-0:6072" },
{ "Name": "zoekt-webserver-0", "Host": "zoekt-webserver-0:6070", "DefaultPath": "/debug/requests/" }
@@ -198,7 +196,6 @@ services:
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
- 'REPO_UPDATER_URL=http://repo-updater:3182'
- 'GRAFANA_SERVER_URL=http://grafana:3000'
- 'GITHUB_BASE_URL=http://github-proxy:3180'
- 'PROMETHEUS_URL=http://prometheus:9090'
- 'PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore'
- 'PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000'
@@ -236,7 +233,6 @@ services:
environment:
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
- 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317'
- 'GITHUB_BASE_URL=http://github-proxy:3180'
volumes:
- 'gitserver-0:/data/repos'
networks:
@@ -321,26 +317,6 @@ services:
- sourcegraph
restart: always
# Description: Rate-limiting proxy for the GitHub API.
#
# CPU: 1
# Memory: 1GB
# Disk: 1GB / non-persistent SSD (only for read-only config file)
# Ports exposed to other Sourcegraph services: 3180/TCP 6060/TCP
# Ports exposed to the public internet: none
#
github-proxy:
container_name: github-proxy
image: 'index.docker.io/sourcegraph/github-proxy:216430_2023-05-02_5.0-3cc9006de32c@sha256:30d4550f51febc1e32ec8af175ef8cce4d1706fd75468572da86f6da451f546f'
cpus: 1
mem_limit: '1g'
environment:
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
- 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317'
networks:
- sourcegraph
restart: always
# Description: Handles conversion of uploaded precise code intelligence bundles.
#
# Ports exposed to other Sourcegraph services: 3188/TCP
@@ -380,7 +356,6 @@ services:
environment:
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
- 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317'
- 'GITHUB_BASE_URL=http://github-proxy:3180'
volumes:
- 'repo-updater:/mnt/cache'
networks:
@@ -405,7 +380,6 @@ services:
- 'SEARCHER_URL=http://searcher-0:3181'
- 'SYMBOLS_URL=http://symbols-0:3184'
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
- 'GITHUB_BASE_URL=http://github-proxy:3180'
- 'PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore'
- 'PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000'
volumes:
@@ -42,7 +42,6 @@ services:
{ "Name": "searcher-0", "Host": "searcher-0:6060" },
{ "Name": "symbols-0", "Host": "symbols-0:6060" },
{ "Name": "repo-updater", "Host": "repo-updater:6060" },
{ "Name": "github-proxy", "Host": "github-proxy:6060" },
{ "Name": "worker", "Host": "worker:6060" },
{ "Name": "zoekt-indexserver-0", "Host": "zoekt-indexserver-0:6072" },
{ "Name": "zoekt-webserver-0", "Host": "zoekt-webserver-0:6070", "DefaultPath": "/debug/requests/" },
-5
View File
@@ -5,11 +5,6 @@
targets:
- cadvisor:8080
- sourcegraph-frontend-internal:6060
- labels:
nodename: "sourcegraph-docker-compose-host"
job: github-proxy
targets:
- github-proxy:6060
- labels:
nodename: "sourcegraph-docker-compose-host"
job: repo-updater
-1
View File
@@ -36,7 +36,6 @@ docker run --detach \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e REPO_UPDATER_URL=http://repo-updater:3182 \
-e GRAFANA_SERVER_URL=http://grafana:3000 \
-e GITHUB_BASE_URL=http://github-proxy:3180 \
-e PROMETHEUS_URL=http://prometheus:9090 \
-e PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore \
-e PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000 \
-1
View File
@@ -37,7 +37,6 @@ docker run --detach \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e REPO_UPDATER_URL=http://repo-updater:3182 \
-e GRAFANA_SERVER_URL=http://grafana:3370 \
-e GITHUB_BASE_URL=http://github-proxy:3180 \
-e PROMETHEUS_URL=http://prometheus:9090 \
-e PRECISE_CODE_INTEL_UPLOAD_BACKEND=blobstore \
-e PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT=http://blobstore:9000 \
-26
View File
@@ -1,26 +0,0 @@
#!/usr/bin/env bash
set -e
source ./replicas.sh
# Description: Rate-limiting proxy for the GitHub API.
#
# CPU: 1
# Memory: 1GB
# Disk: 1GB / non-persistent SSD (only for read-only config file)
# Network: 100mbps
# Liveness probe: n/a
# Ports exposed to other Sourcegraph services: 3180/TCP 6060/TCP
# Ports exposed to the public internet: none
#
docker run --detach \
--name=github-proxy \
--network=sourcegraph \
--restart=always \
--cpus=1 \
--memory=1g \
-e GOMAXPROCS=1 \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317' \
index.docker.io/sourcegraph/github-proxy:187572_2022-12-06_cbecc5321c7d@sha256:b4739adfced18f2a8883da931da681f444b489f6606052246f7c8d536f22e425
echo "Deployed github-proxy service"
-1
View File
@@ -22,7 +22,6 @@ docker run --detach \
-e GOMAXPROCS=4 \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317' \
-e 'GITHUB_BASE_URL=http://github-proxy:3180' \
-v $VOLUME:/data/repos \
index.docker.io/sourcegraph/gitserver:187572_2022-12-06_cbecc5321c7d@sha256:87642b2f0cccbdcd661e470c8f7aa6c022ab03065a2c8ab565afc4b8829a4531
-1
View File
@@ -21,7 +21,6 @@ docker run --detach \
-e GOMAXPROCS=1 \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317' \
-e GITHUB_BASE_URL=http://github-proxy:3180 \
-v $VOLUME:/mnt/cache \
index.docker.io/sourcegraph/repo-updater:187572_2022-12-06_cbecc5321c7d@sha256:0bf2b95c73bceff8c3edb96299175fe36a550f57fd3f5256d38fa2c42992655a
-1
View File
@@ -21,7 +21,6 @@ docker run --detach \
-e GOMAXPROCS=1 \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e 'OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317' \
-e GITHUB_BASE_URL=http://github-proxy:3180 \
-e INDEXED_SEARCH_SERVERS="$(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH ":6070")" \
-e SEARCHER_URL="$(addresses "http://searcher-" $NUM_SEARCHER ":3181")" \
-e SRC_GIT_SERVERS="$(addresses "gitserver-" $NUM_GITSERVER ":3178")" \
-1
View File
@@ -12,7 +12,6 @@ docker network create sourcegraph &>/dev/null || true
./deploy-node-exporter.sh
./deploy-cadvisor.sh
./deploy-github-proxy.sh
for i in $(seq 0 $(($NUM_GITSERVER - 1))); do ./deploy-gitserver.sh $i; done
./deploy-grafana.sh
./deploy-precise-code-intel-worker.sh
+25 -26
View File
@@ -7,31 +7,30 @@ cd "$root_dir"
source ./replicas.sh
docker rm -f node-exporter &>/dev/null || true &
docker rm -f cadvisor &> /dev/null || true &
docker rm -f caddy &> /dev/null || true &
docker rm -f sourcegraph-frontend-internal &> /dev/null || true &
docker rm -f $(addresses "sourcegraph-frontend-" $NUM_FRONTEND "") &> /dev/null || true &
docker rm -f github-proxy &> /dev/null || true &
docker rm -f $(addresses "gitserver-" $NUM_GITSERVER "") &> /dev/null || true &
docker rm -f grafana &> /dev/null || true
docker rm -f jaeger &> /dev/null || true
docker rm -f precise-code-intel-worker &> /dev/null || true
docker rm -f pgsql &> /dev/null || true &
docker rm -f codeintel-db &> /dev/null || true &
docker rm -f codeinsights-db &> /dev/null || true &
docker rm -f blobstore &> /dev/null || true &
docker rm -f migrator &> /dev/null || true &
docker rm -f prometheus &> /dev/null || true
docker rm -f redis-cache &> /dev/null || true &
docker rm -f redis-store &> /dev/null || true &
docker rm -f repo-updater &> /dev/null || true &
docker rm -f worker &> /dev/null || true &
docker rm -f $(addresses "searcher-" $NUM_SEARCHER "") &> /dev/null || true &
docker rm -f $(addresses "symbols-" $NUM_SYMBOLS "") &> /dev/null || true &
docker rm -f syntect-server &> /dev/null || true &
docker rm -f $(addresses "zoekt-indexserver-" $NUM_INDEXED_SEARCH "") &> /dev/null || true &
docker rm -f $(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH "") &> /dev/null || true &
docker rm -f otel-collector &> /dev/null || true &
docker rm -f cadvisor &>/dev/null || true &
docker rm -f caddy &>/dev/null || true &
docker rm -f sourcegraph-frontend-internal &>/dev/null || true &
docker rm -f $(addresses "sourcegraph-frontend-" $NUM_FRONTEND "") &>/dev/null || true &
docker rm -f $(addresses "gitserver-" $NUM_GITSERVER "") &>/dev/null || true &
docker rm -f grafana &>/dev/null || true
docker rm -f jaeger &>/dev/null || true
docker rm -f precise-code-intel-worker &>/dev/null || true
docker rm -f pgsql &>/dev/null || true &
docker rm -f codeintel-db &>/dev/null || true &
docker rm -f codeinsights-db &>/dev/null || true &
docker rm -f blobstore &>/dev/null || true &
docker rm -f migrator &>/dev/null || true &
docker rm -f prometheus &>/dev/null || true
docker rm -f redis-cache &>/dev/null || true &
docker rm -f redis-store &>/dev/null || true &
docker rm -f repo-updater &>/dev/null || true &
docker rm -f worker &>/dev/null || true &
docker rm -f $(addresses "searcher-" $NUM_SEARCHER "") &>/dev/null || true &
docker rm -f $(addresses "symbols-" $NUM_SYMBOLS "") &>/dev/null || true &
docker rm -f syntect-server &>/dev/null || true &
docker rm -f $(addresses "zoekt-indexserver-" $NUM_INDEXED_SEARCH "") &>/dev/null || true &
docker rm -f $(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH "") &>/dev/null || true &
docker rm -f otel-collector &>/dev/null || true &
docker network rm sourcegraph &> /dev/null || true &
docker network rm sourcegraph &>/dev/null || true &
wait
+2 -2
View File
@@ -7,10 +7,10 @@ deploy_sourcegraph() {
if [[ "$TEST_TYPE" == "pure-docker-test" ]]; then
./test/volume-config.sh
timeout 600s ./pure-docker/deploy.sh
expect_containers="26"
expect_containers="25"
elif [[ "$TEST_TYPE" == "docker-compose-test" ]]; then
docker-compose --file docker-compose/docker-compose.yaml up -d -t 600
expect_containers="27"
expect_containers="26"
fi
echo "Giving containers 90s to start..."