-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Got it working in customer environment (#14)
* Refactoring docker compose files for easier execution and customer PoC usage of repo-converter * Moved running process check to beginning of loop to skip earlier * Better handling and checking of child processes * Deleting abandoned lockfiles * Starting on batch sizes (not finished) * Removing psutils from docker image build to speed up build time * Updating README to match recent changes * Updating cloud-agent to latest * Showing more output for LOG_LEVEL=INFO
- Loading branch information
1 parent
05518a8
commit c9a859a
Showing
18 changed files
with
621 additions
and
222 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,4 @@ | ||
version: '2.4' | ||
|
||
services: | ||
|
||
cloud-agent: | ||
container_name: cloud-agent | ||
image: index.docker.io/sourcegraph/src-tunnel-agent:2024-02-05-22-28-333320ee | ||
volumes: | ||
- ../config/cloud-agent-service-account-key.json:/sourcegraph/cloud-agent-service-account-key.json:ro | ||
- ../config/cloud-agent-config.yaml:/sourcegraph/cloud-agent-config.yaml:ro | ||
command: ["-config=/sourcegraph/cloud-agent-config.yaml"] | ||
restart: always | ||
networks: | ||
- sourcegraph | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local | ||
image: index.docker.io/sourcegraph/src-cli:latest | ||
volumes: | ||
- ../src-serve-root/:/sourcegraph/src-serve-root:ro | ||
command: "serve-git -addr :443 /sourcegraph/src-serve-root" | ||
networks: | ||
- sourcegraph | ||
|
||
networks: | ||
sourcegraph: | ||
include: | ||
- path: | ||
- ../config/docker-compose-common-services.yaml | ||
- docker-compose-override.yaml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-wsl.local |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include: | ||
- path: | ||
- ../config/docker-compose-common-services.yaml | ||
- docker-compose-override.yaml |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-wsl.local | ||
command: "-v serve-git -addr :443 /sourcegraph/src-serve-root" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
version: '2.4' | ||
|
||
include: | ||
- path: | ||
- ../../config/docker-compose-common-services.yaml | ||
- docker-compose-override.yaml | ||
|
||
services: | ||
|
||
repo-converter: | ||
container_name: repo-converter | ||
build: | ||
context: . | ||
image: sourcegraph/implementation-bridge-repo-converter:build | ||
restart: always | ||
volumes: | ||
- ../../config/repos-to-convert.yaml:/sourcegraph/repos-to-convert.yaml:ro | ||
- ../../config/toprc:/root/.config/procps/toprc | ||
- ../../src-serve-root/:/sourcegraph/src-serve-root | ||
environment: | ||
- BRIDGE_REPO_CONVERTER_INTERVAL_SECONDS=10 | ||
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO | ||
- BRIDGE_REPO_CONVERTER_INTERVAL_SECONDS=60 | ||
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# To be used in a cronjob to always pull and build the latest commit to the current branch | ||
# every 10 minutes | ||
# so that the running container is only 10 minutes behind the latest commit in the branch | ||
|
||
# crontab -e | ||
# */10 * * * * sudo bash /sourcegraph/implementation-bridges/repo-converter/build/pull-build-start.sh >> /sourcegraph/implementation-bridges/repo-converter/build/pull-build-start.log 2>&1 | ||
|
||
repo_converter_build_path="/sourcegraph/implementation-bridges/repo-converter/build" | ||
|
||
git -C $repo_converter_build_path pull | ||
|
||
docker compose -f $repo_converter_build_path/docker-compose.yaml up -d --build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
psutil | ||
PyYAML |
Oops, something went wrong.