Skip to content

Commit

Permalink
Updating README to match recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Feb 20, 2024
1 parent f65e158 commit 749a458
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Running src serve-git and the agent together on the same Docker network allows t
Docker compose also allows for easier upgrades, troubleshooting, monitoring, logging, flexibility of hosting, etc. than running the binaries directly on the OS.

## Setup - Sourcegraph Staff Only
1. Add the needed entries to the sourcegraphConnect targetGroups list in the Cloud instance's config.yaml, get your PR approved and merged
1. Add the needed entries to the sourcegraphConnect targetGroups list in the Cloud instance's config.yaml, and get your PR approved and merged
```yaml
- dnsName: src-serve-git-ubuntu.local
listeningAddress: 100.100.100.0
Expand All @@ -22,20 +22,25 @@ Docker compose also allows for easier upgrades, troubleshooting, monitoring, log
ports:
- 443
```
2. Run the Reload frontend GitHub Action, as this seems to be needed for the frontend pods to start using tunnel connections
2. Run the "Reload Instance for srcconnect config change" GitHub Action, as many containers need to be restarted to pick up tunnel connection config changes
3. Clone this repo to a customer's bridge VM, install Docker and Docker's Compose plugin
4. Copy the `config.yaml` and `service-account-key.json` files using the instructions on the instance's Cloud Ops dashboard
- Paste them into `./config/cloud-agent-config.yaml` and `./config/cloud-agent-service-account-key.json`
5. Modify the `./config/cloud-agent-config.yaml` file
- `serviceAccountKeyFile: /sourcegraph/cloud-agent-service-account-key.json` so that the Go binary inside the agent container finds this file in the path that's mapped via the docker-compose.yaml files
- Only include the `- dialAddress` entries that this cloud agent instance can reach, remove the others, so the Cloud instance doesn't try using this agent instance for code hosts it can't reach
- Use extra caution when pasting the config.yaml in Windows, as it may use Windows' line endings or extra spaces, which breaks YAML, as a whitespace-dependent format
6. Clone the customer's repos into the `repos-to-serve` directory at the root of this repo on the bridge VM, or update the volume mount path for the src-serve-git service in the docker-compose.yaml file
7. Run `docker compose up -d`
8. Add a Code Host config to the customer's Cloud instance
- Type: src serve-git
- URL: "http://src-serve-git-ubuntu.local:443"
- or
- URL: "http://src-serve-git-wsl.local:443"
- Note that the :443 port may be required, as this seems to default to port 443, even when used with http://
9. Use the repo-converter to convert SVN, TFVC, or Git repos, to Git format, which will store them in the `repos-to-serve` directory, or use any other means to get the repos into the directory
- Paste them into `./config/cloud-agent-config.yaml` and `./config/cloud-agent-service-account-key.json`
5. Modify the contents of the `./config/cloud-agent-config.yaml` file:
- `serviceAccountKeyFile: /sourcegraph/cloud-agent-service-account-key.json` so that the Go binary inside the agent container finds this file in the path that's mapped via the docker-compose.yaml files
- Only include the `- dialAddress` entries that this cloud agent instance can reach, remove the others, so the Cloud instance doesn't try using this agent instance for code hosts it can't reach
- Use extra caution when pasting the config.yaml in Windows, as it may use Windows' line endings or extra spaces, which breaks YAML, as a whitespace-dependent format
6. Run `docker compose up -d`
7. Add a Code Host config to the customer's Cloud instance
- Type: src serve-git
- `"url": "http://src-serve-git-ubuntu.local:443",`
- or
- `"url": "http://src-serve-git-wsl.local:443",`
- Note the port 443, even when used with http://
8. Use the repo-converter to convert SVN, TFVC, or Git repos, to Git format, which will store them in the `src-serve-root` directory, or use any other means to get the repos into the directory
- There are docker-compose.yaml and override files in a few different directories in this repo, separated by use case, so that each use case only needs to run `docker compose up -d` in one directory, and not fuss around with `-f` paths.
- The only difference between the docker-compose-override.yaml files in host-ubuntu vs host-wsl is the src-serve-git container's name, which is how we get a separate `dnsName` for each.
- If you're using the repo-converter:
- If you're using the pre-built images, `cd ./repo-converter && docker compose up -d`
- If you're building the Docker images, `cd ./repo-converter/build && docker compose up -d --build`
- Either of these will start all 3 containers: cloud-agent, src-serve-git, and the repo-converter

0 comments on commit 749a458

Please sign in to comment.