You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/self-hosted/deploy/docker-compose/configuration.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ See ["Environment variables in Compose"](https://docs.docker.com/compose/environ
54
54
55
55
Sourcegraph supports HTTP tracing to help troubleshoot issues. See [Tracing](/self-hosted/observability/tracing) for details.
56
56
57
-
The base docker-compose.yaml file enables the bundled [otel-collector](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/deploy-sourcegraph-docker$+file:docker-compose/docker-compose.yaml+content:%22++otel-collector:%22&patternType=keyword) by default, but a tracing backend needs to be deployed or configured to see HTTP traces.
57
+
The base docker-compose.yaml file enables the bundled [otel-collector](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/deploy-sourcegraph-docker$+file:docker-compose/docker-compose.yaml+content:%22++otel-collector:%22&patternType=keyword) by default, but a tracing backend needs to be deployed or configured to see traces.
58
58
59
59
To enable tracing on your instance, you'll need to either:
60
60
@@ -65,7 +65,7 @@ Once a tracing backend has been deployed, see our [Tracing](/self-hosted/observa
65
65
66
66
### Deploy the bundled Jaeger
67
67
68
-
To deploy the bundled Jaeger web UI to see HTTP trace data, add [Jaeger's docker-compose.yaml override file](https://github.com/sourcegraph/deploy-sourcegraph-docker/blob/main/docker-compose/jaeger/docker-compose.yaml) to your deployment command.
68
+
To deploy the bundled Jaeger web UI to see trace data, add [Jaeger's docker-compose.yaml override file](https://github.com/sourcegraph/deploy-sourcegraph-docker/blob/main/docker-compose/jaeger/docker-compose.yaml) to your deployment command.
69
69
70
70
```bash
71
71
docker compose \
@@ -77,13 +77,13 @@ docker compose \
77
77
78
78
### Configure an external tracing backend
79
79
80
-
The bundled otel-collector can be configured to export HTTP traces to an OTel-compatible backend of your choosing.
80
+
The bundled otel-collector can be configured to export traces to an OTEL-compatible backend of your choosing.
81
81
82
82
To customize the otel-collector config file:
83
83
84
-
-Create a copy of the default config in [otel-collector/config.yaml](https://github.com/sourcegraph/deploy-sourcegraph-docker/blob/main/otel-collector/config.yaml)
85
-
-Follow the [OpenTelemetry collector configuration guidance](/self-hosted/observability/opentelemetry)
86
-
-Edit your `docker-compose.override.yaml` file to mount your custom config file to the `otel-collector` container:
84
+
- Create a copy of the default config in [otel-collector/config.yaml](https://github.com/sourcegraph/deploy-sourcegraph-docker/blob/main/otel-collector/config.yaml)
85
+
- Follow the [OpenTelemetry collector configuration guidance](/self-hosted/observability/opentelemetry)
86
+
- Edit your `docker-compose.override.yaml` file to mount your custom config file to the `otel-collector` container:
87
87
88
88
```yaml
89
89
services:
@@ -99,10 +99,10 @@ services:
99
99
100
100
Provide your `gitserver` container with SSH / Git configuration needed to connect to some code hosts, by mounting a directory that contains the needed config files into the `gitserver` container, ex.
101
101
102
-
- `.ssh/config`
103
-
- `.ssh/id_rsa.pub`
104
-
- `.ssh/id_rsa`
105
-
- `.ssh/known_hosts`
102
+
- `.ssh/config`
103
+
- `.ssh/id_rsa.pub`
104
+
- `.ssh/id_rsa`
105
+
- `.ssh/known_hosts`
106
106
107
107
You can also provide other files like `.netrc`, `.gitconfig`, etc. at their respective paths, if needed.
@@ -187,12 +187,12 @@ Once a tracing backend has been deployed, see our [Tracing](/self-hosted/observa
187
187
188
188
### Deploy the bundled OpenTelemetry Collector and Jaeger
189
189
190
-
The quickest way to get started with HTTP tracing is by deploying our bundled OTel and Jaeger containers together.
190
+
The quickest way to get started with HTTP tracing is by deploying our bundled OTEL and Jaeger containers together.
191
191
192
192
Include the `tracing` component to deploy both OpenTelemetry and Jaeger together. This component also configures the following services:
193
193
194
-
- `otel-collector`to export to this Jaeger instance
195
-
- `grafana`to get metrics from this Jaeger instance
194
+
- `otel-collector`to export to this Jaeger instance
195
+
- `grafana`to get metrics from this Jaeger instance
196
196
197
197
```yaml
198
198
# instances/$INSTANCE_NAME/kustomization.yaml
@@ -216,7 +216,7 @@ components:
216
216
217
217
#### Configure a tracing backend
218
218
219
-
Follow these steps to configure the otel-collector to export traces to an external OTel-compatible backend:
219
+
Follow these steps to configure the otel-collector to export traces to an external OTEL-compatible backend:
220
220
221
221
1. Create a subdirectory called 'patches' within the directory of your overlay
222
222
2. Copy and paste the [base/otel-collector/otel-collector.ConfigMap.yaml file](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s@master/-/tree/base/otel-collector/otel-collector.ConfigMap.yaml) to the new [patches subdirectory](/self-hosted/deploy/kubernetes/kustomize/#patches-directory)
The component takes care of creating a new storage class named `sourcegraph` with the following configurations:
456
456
457
-
- Provisioner: pd.csi.storage.gke.io
458
-
- SSD: types: pd-ssd
457
+
- Provisioner: pd.csi.storage.gke.io
458
+
- SSD: types: pd-ssd
459
459
460
460
It also updates the storage class name for all resources to `sourcegraph`.
461
461
@@ -467,8 +467,8 @@ It also updates the storage class name for all resources to `sourcegraph`.
467
467
468
468
**Step 2**: Include one of the AWS storage class components in your overlay: [storage-class/aws/eks](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s/-/tree/components/storage-class/aws/eks) or [storage-class/aws/ebs](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s/-/tree/components/storage-class/aws/ebs)
469
469
470
-
- The [storage-class/aws/ebs-csi](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s/-/tree/components/storage-class/aws/eks) component is configured with the `ebs.csi.aws.com` storage class provisioner for clusters with self-managed Amazon EBS Container Storage Interface driver installed
471
-
- The [storage-class/aws/aws-ebs](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s/-/tree/components/storage-class/aws/ebs) component is configured with the `kubernetes.io/aws-ebs` storage class provisioner for clusters with the [AWS EBS CSI driver installed as Amazon EKS add-on](https://docs.aws.amazon.com/eks/latest/userguide/managing-ebs-csi.html)
470
+
- The [storage-class/aws/ebs-csi](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s/-/tree/components/storage-class/aws/eks) component is configured with the `ebs.csi.aws.com` storage class provisioner for clusters with self-managed Amazon EBS Container Storage Interface driver installed
471
+
- The [storage-class/aws/aws-ebs](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-k8s/-/tree/components/storage-class/aws/ebs) component is configured with the `kubernetes.io/aws-ebs` storage class provisioner for clusters with the [AWS EBS CSI driver installed as Amazon EKS add-on](https://docs.aws.amazon.com/eks/latest/userguide/managing-ebs-csi.html)
472
472
473
473
```yaml
474
474
# instances/$INSTANCE_NAME/kustomization.yaml
@@ -497,10 +497,10 @@ components:
497
497
498
498
This component creates a new storage class named `sourcegraph` in your cluster with the following configurations:
499
499
500
-
- provisioner: disk.csi.azure.com
501
-
- parameters.storageaccounttype: Premium_LRS
502
-
- This configures SSDs and is highly recommended.
503
-
- **A Premium VM is required.**
500
+
- provisioner: disk.csi.azure.com
501
+
- parameters.storageaccounttype: Premium_LRS
502
+
- This configures SSDs and is highly recommended.
503
+
- **A Premium VM is required.**
504
504
505
505
[Additional documentation](https://docs.microsoft.com/en-us/azure/aks/csi-storage-drivers) for more information.
506
506
@@ -688,9 +688,9 @@ data:
688
688
689
689
**Step 3**: Configure the TLS settings of your Ingress by adding the following variables to your [buildConfig.yaml](/self-hosted/deploy/kubernetes/kustomize/#buildconfig-yaml) file:
690
690
691
-
- **TLS_HOST**: your domain name
692
-
- **TLS_INGRESS_CLASS_NAME**: ingress class name required by your cluster-issuer
693
-
- **TLS_CLUSTER_ISSUER**: name of the cluster-issuer
691
+
- **TLS_HOST**: your domain name
692
+
- **TLS_INGRESS_CLASS_NAME**: ingress class name required by your cluster-issuer
693
+
- **TLS_CLUSTER_ISSUER**: name of the cluster-issuer
694
694
695
695
Example:
696
696
@@ -878,33 +878,33 @@ Add a network rule that allows incoming traffic on port 30080 (HTTP) to at least
- Include the nodeport component to change the type of the `sourcegraph-frontend` service from `ClusterIP` to `NodePort` with the `nodeport` component:
887
+
- Include the nodeport component to change the type of the `sourcegraph-frontend` service from `ClusterIP` to `NodePort` with the `nodeport` component:
888
888
889
889
```yaml
890
890
# instances/$INSTANCE_NAME/kustomization.yaml
891
891
components:
892
892
- ../../components/network/nodeport/30080
893
893
```
894
894
895
-
- Directly applying this change to a running service [will fail](https://github.com/kubernetes/kubernetes/issues/42282). You must first delete the old service before redeploying a new one (with a few seconds of downtime):
895
+
- Directly applying this change to a running service [will fail](https://github.com/kubernetes/kubernetes/issues/42282). You must first delete the old service before redeploying a new one (with a few seconds of downtime):
896
896
897
897
```bash
898
898
$ kubectl delete svc sourcegraph-frontend
899
899
```
900
900
901
-
- Find a node name.
901
+
- Find a node name.
902
902
903
903
```bash
904
904
$ kubectl get pods -l app=sourcegraph-frontend -o=custom-columns=NODE:.spec.nodeName
905
905
```
906
906
907
-
- Get the EXTERNAL-IP address (will be ephemeral unless you [make it static](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address#promote_ephemeral_ip)).
907
+
- Get the EXTERNAL-IP address (will be ephemeral unless you [make it static](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address#promote_ephemeral_ip)).
908
908
909
909
```bash
910
910
$ kubectl get node $NODE -o wide
@@ -1079,15 +1079,15 @@ configMapGenerator:
1079
1079
1080
1080
Sourcegraph supports specifying an external Redis server with these environment variables:
1081
1081
1082
-
- **REDIS_CACHE_ENDPOINT**=[redis-cache:6379](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24++REDIS_CACHE_ENDPOINT+AND+REDIS_STORE_ENDPOINT+-file:doc+file:internal&patternType=literal) for caching information.
1083
-
- **REDIS_STORE_ENDPOINT**=[redis-store:6379](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24++REDIS_CACHE_ENDPOINT+AND+REDIS_STORE_ENDPOINT+-file:doc+file:internal&patternType=literal) for storing information (session data and job queues).
1082
+
- **REDIS_CACHE_ENDPOINT**=[redis-cache:6379](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24++REDIS_CACHE_ENDPOINT+AND+REDIS_STORE_ENDPOINT+-file:doc+file:internal&patternType=literal) for caching information.
1083
+
- **REDIS_STORE_ENDPOINT**=[redis-store:6379](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24++REDIS_CACHE_ENDPOINT+AND+REDIS_STORE_ENDPOINT+-file:doc+file:internal&patternType=literal) for storing information (session data and job queues).
1084
1084
1085
1085
When using an external Redis server, the corresponding environment variable must also be added to the following services:
1086
1086
1087
-
- `sourcegraph-frontend`
1088
-
- `gitserver`
1089
-
- `searcher`
1090
-
- `worker`
1087
+
- `sourcegraph-frontend`
1088
+
- `gitserver`
1089
+
- `searcher`
1090
+
- `worker`
1091
1091
1092
1092
**Step 1**: Include the `services/redis` component in your components:
0 commit comments