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
@@ -4,115 +4,170 @@ By default, Sourcegraph will use a `sourcegraph/blobstore` server bundled with t
4
4
5
5
You can alternatively configure your instance to instead store this data in an S3 or GCS bucket. Doing so may decrease your hosting costs as persistent volumes are often more expensive than the same storage space in an object store service.
6
6
7
+
## `sourcegraph` bucket
8
+
9
+
<Callouttype="warning">
10
+
Starting in Sourcegraph 7.2, self-hosted Sourcegraph instances using S3 or
11
+
GCS object storage should now provision an additional bucket named
12
+
`sourcegraph`. Sourcegraph currently reports a warning when this bucket is
13
+
not present, and it will become required for new features in a future
14
+
release. No action is required if you are using the default
15
+
`sourcegraph/blobstore`.
16
+
</Callout>
17
+
18
+
The `sourcegraph` bucket is intended to be the single bucket for new Sourcegraph features. Instead of creating one bucket per feature, new features store objects under namespaced key prefixes within this bucket.
19
+
20
+
Existing buckets for code graph indexes and search jobs remain in use. This change ensures future features can be enabled without requiring a new bucket for each feature.
21
+
22
+
### Using S3 for the `sourcegraph` bucket
23
+
24
+
Set the following environment variables to target an S3 bucket for shared Sourcegraph uploads.
### Automatically provision the `sourcegraph` bucket
47
+
48
+
If you would like to allow your Sourcegraph instance to manage the target bucket configuration, set the following environment variable:
49
+
50
+
<Callouttype="note">
51
+
This requires additional bucket-management permissions from your configured
52
+
storage vendor (AWS or GCP).
53
+
</Callout>
54
+
55
+
-`SOURCEGRAPH_UPLOAD_MANAGE_BUCKET=true`
56
+
7
57
## Code Graph Indexes
8
58
9
59
To target a managed object storage service for storing [code graph index uploads](../../code-navigation/precise-code-navigation), you will need to set a handful of environment variables for configuration and authentication to the target service.
10
60
11
-
-If you are running a `sourcegraph/server` deployment, set the environment variables on the server container
12
-
-If you are running via Docker-compose or Kubernetes, set the environment variables on the `frontend`, `worker`, and `precise-code-intel-worker` containers
61
+
- If you are running a `sourcegraph/server` deployment, set the environment variables on the server container
62
+
- If you are running via Docker-compose or Kubernetes, set the environment variables on the `frontend`, `worker`, and `precise-code-intel-worker` containers
13
63
14
-
### Using S3
64
+
### Using S3 for the Code Graph Indexes bucket
15
65
16
66
To target an S3 bucket you've already provisioned, set the following environment variables. Authentication can be done through [an access and secret key pair](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) (and optional session token), or via the EC2 metadata API.
17
67
18
68
<Callouttype="warning">
19
-
{''}
20
-
Never commit AWS access keys in Git. You should consider using a secret handling
21
-
service offered by your cloud provider.{''}
69
+
Never commit AWS access keys in Git. You should consider using a secret
If a non-default region is supplied, ensure that the subdomain of the endpoint
36
-
URL (_the `AWS_ENDPOINT` value_) matches the target region.{''}
83
+
If a non-default region is supplied, ensure that the subdomain of the
84
+
endpoint URL (_the `AWS_ENDPOINT` value_) matches the target region.
37
85
</Callout>
38
86
39
87
<Callouttype="tip">
40
-
{''}
41
-
You don't need to set the `PRECISE_CODE_INTEL_UPLOAD_AWS_ACCESS_KEY_ID` environment
42
-
variable when using `PRECISE_CODE_INTEL_UPLOAD_AWS_USE_EC2_ROLE_CREDENTIALS=true`
43
-
because role credentials will be automatically resolved. Attach the IAM role
44
-
to the EC2 instances hosting the `frontend`, `worker`, and `precise-code-intel-worker`
45
-
containers in a multi-node environment.{''}
88
+
You don't need to set the `PRECISE_CODE_INTEL_UPLOAD_AWS_ACCESS_KEY_ID`
89
+
environment variable when using
90
+
`PRECISE_CODE_INTEL_UPLOAD_AWS_USE_EC2_ROLE_CREDENTIALS=true` because role
91
+
credentials will be automatically resolved. Attach the IAM role to the EC2
92
+
instances hosting the `frontend`, `worker`, and `precise-code-intel-worker`
93
+
containers in a multi-node environment.
46
94
</Callout>
47
95
48
-
### Using GCS
96
+
### Using GCS for the Code Graph Indexes bucket
49
97
50
98
To target a GCS bucket you've already provisioned, set the following environment variables. Authentication is done through a service account key, supplied as either a path to a volume-mounted file, or the contents read in as an environment variable payload.
### Automatically provision the Code Graph Indexes bucket
59
107
60
108
If you would like to allow your Sourcegraph instance to control the creation and lifecycle configuration management of the target buckets, set the following environment variables:
61
109
62
-
-`PRECISE_CODE_INTEL_UPLOAD_MANAGE_BUCKET=true`
63
-
-`PRECISE_CODE_INTEL_UPLOAD_TTL=168h` (default)
110
+
<Callouttype="note">
111
+
This requires additional bucket-management permissions from your configured
112
+
storage vendor (AWS or GCP).
113
+
</Callout>
114
+
115
+
-`PRECISE_CODE_INTEL_UPLOAD_MANAGE_BUCKET=true`
116
+
-`PRECISE_CODE_INTEL_UPLOAD_TTL=168h` (default)
64
117
65
118
## Search Job Results
66
119
67
120
To target a third party managed object storage service for storing [search job results](../../code-search/types/search-jobs), you must set a handful of environment variables for configuration and authentication to the target service.
68
121
69
-
-If you are running a `sourcegraph/server` deployment, set the environment variables on the server container
70
-
-If you are running via Docker-compose or Kubernetes, set the environment variables on the `frontend` and `worker` containers
122
+
- If you are running a `sourcegraph/server` deployment, set the environment variables on the server container
123
+
- If you are running via Docker-compose or Kubernetes, set the environment variables on the `frontend` and `worker` containers
71
124
72
-
### Using S3
125
+
### Using S3 for the Search Job Results bucket
73
126
74
127
Set the following environment variables to target an S3 bucket you've already provisioned. Authentication can be done through [an access and secret key pair](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) (and optionally through session token) or via the EC2 metadata API.
75
128
76
129
<Callouttype="warning">
77
-
{''}
78
-
Never commit AWS access keys in Git. You should consider using a secret handling
79
-
service offered by your cloud provider.
130
+
Never commit AWS access keys in Git. You should consider using a secret
If a non-default region is supplied, ensure that the subdomain of the endpoint
94
-
URL (the `AWS_ENDPOINT` value) matches the target region.
144
+
If a non-default region is supplied, ensure that the subdomain of the
145
+
endpoint URL (the `AWS_ENDPOINT` value) matches the target region.
95
146
</Callout>
96
147
97
148
<Callouttype="tip">
98
-
{''}
99
149
You don't need to set the `SEARCH_JOBS_UPLOAD_AWS_ACCESS_KEY_ID` environment
100
-
variable when using `SEARCH_JOBS_UPLOAD_AWS_USE_EC2_ROLE_CREDENTIALS=true` because
101
-
role credentials will be automatically resolved.
150
+
variable when using `SEARCH_JOBS_UPLOAD_AWS_USE_EC2_ROLE_CREDENTIALS=true`
151
+
because role credentials will be automatically resolved.
102
152
</Callout>
103
153
104
-
### Using GCS
154
+
### Using GCS for the Search Job Results bucket
105
155
106
156
Set the following environment variables to target a GCS bucket you've already provisioned. Authentication is done through a service account key, either as a path to a volume-mounted file or the contents read in as an environment variable payload.
### Automatically provision the Search Job Results bucket
115
165
116
166
If you would like to allow your Sourcegraph instance to control the creation and lifecycle configuration management of the target buckets, set the following environment variables:
117
167
118
-
-`SEARCH_JOBS_UPLOAD_MANAGE_BUCKET=true`
168
+
<Callouttype="note">
169
+
This requires additional bucket-management permissions from your configured
0 commit comments