Skip to content

Commit 5957370

Browse files
authored
Merge branch 'main' into sourcegraph-pricing
2 parents 2a5faf2 + 7f28a51 commit 5957370

File tree

7 files changed

+65
-132
lines changed

7 files changed

+65
-132
lines changed

docs/admin/audit_log.mdx

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -98,33 +98,8 @@ There are two easy approaches to filtering the audit logs:
9898
- Message-based: we recommend going the JSON route, but if there's no easy way of parsing JSON using your SIEM or data processing stack, you can filter based on the following string: `auditId`.
9999

100100
### Cloud
101-
[Cloud](/cloud/#audit-logs)
102-
103-
104-
Audit Logs are a default feature for Cloud instances, with a standard retention policy of 30 days. Should you wish to
105-
extend this period, please be aware that additional charges will apply. To request an extension, please contact
106-
your assigned Customer Engineer (CE) or send an email to Sourcegraph Support at [email protected].
107-
108-
#### Access Cloud intance audit logs
109-
110-
##### Download audit logs ocassionally
111-
112-
For requesting audit logs, please contact your assigned Sourcegraph representative or our support team.
113-
114-
##### Instant audit logs access (experimental)
115-
116-
Sourcegraph LogPush service is streaming audit logs to customer provided destination.
117-
118-
Features:
119-
- single tenant, dedicated per customer
120-
- streaming only newly created logs
121-
- streaming on schedule, every 1h
122-
123-
Supported destinations:
124-
- Google Cloud Storage
125-
126-
If you are interested to use this feature or to stream to a different destination, please contact your assigned Sourcegraph representative or our support team.
127101

102+
For Sourcegraph Cloud customers, please refer to Cloud [documentations](/cloud/#audit-logs).
128103

129104
## Developing
130105

docs/admin/code_hosts/go.mdx

Lines changed: 0 additions & 84 deletions
This file was deleted.

docs/admin/code_hosts/rate_limits.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,3 @@ Sourcegraph supports internal rate limit configuration for the following connect
7272
- [Bitbucket Cloud](/admin/code_hosts/bitbucket_cloud#rateLimit)
7373
- [Bitbucket Server](/admin/code_hosts/bitbucket_server#rateLimit)
7474
- [Perforce](/admin/repo/perforce#rateLimit)
75-
- [Go Modules](/admin/code_hosts/go#rateLimit)
76-
- [JVM Packages](/admin/code_hosts/jvm#rateLimit)
77-
- [NPM Packages](/admin/code_hosts/npm#rateLimit)
78-
- [Python Packages](/admin/code_hosts/python#rateLimit)
79-
- [Ruby Packages](/admin/code_hosts/ruby#rateLimit)
80-
- [Rust Packages](/admin/code_hosts/rust#rateLimit)

docs/admin/deploy/docker-single-container/index.mdx

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,34 @@ SELECT * FROM users;
138138

139139
## Upgrade
140140

141+
### Postgresql 16
141142
> Warning: The 5.11 release updates the database container images from Postgres 12 to Postgres 16. Customers are advised to have a database backup before upgrading! See our [postgres 12 end of life](https://sourcegraph.com/docs/admin/postgres12_end_of_life_notice#postgres-12-end-of-life) notice!
143+
144+
From sourcegraph version 5.11 onwards, the Sourcegraph single container Docker image uses Postgresql 16. Upgrading from Postgresql 12 to Postgresql 16 is a manual process, that is similar to the one outlined below for multi-version upgrades, but migrator has been merged into the container, allowing for a simpler upgrade.
145+
146+
> NOTE: It is highly recommended to **take an up-to-date snapshot of your databases** prior to starting a multi-version upgrade. The upgrade process aggressively mutates the shape and contents of your database, and undiscovered errors in the migration process or unexpected environmental differences may cause an unusable instance or data loss.
142147
>
143-
> Single-container *does not* support auto migration to postgres 16. If you are planning to upgrade to 5.11.0 and beyond on single-container, you will need to dump the postgres databases and restore them after the upgrade.
144-
> In this event, we highly recommend you migrate to a production supported deployment method, or switch to our cloud offering.
148+
> We recommend performing the entire upgrade procedure on an idle clone of the production instance and switch traffic over on success, if possible. This may be low-effort for installations with a canary environment or a blue/green deployment strategy.
149+
>
150+
> **If you do not feel confident running this process solo**, contact customer support team to help guide you thorough the process.
151+
152+
**Before performing a multi-version upgrade**:
153+
154+
- Read our [update policy](/admin/updates/#update-policy) to learn about Sourcegraph updates.
155+
- Find the entries that apply to the version range you're passing through in the [update notes for Sourcegraph with Docker Single Container](/admin/updates/server#multi-version-upgrade-procedure).
156+
157+
0. You must first shutdown the container instance via `docker stop [CONTAINER]`.
158+
1. Start a temporary Postgres container on top of the Postgres data directory used by the old `sourcegraph/server` image. You must use the *new* postgresql-16-codeinsights image, which is based on the new Postgresql 16 image, and provides an automatic upgrade script to move from Postgresql 12 to Postgresql 16.
159+
160+
`docker run --rm -it -v ~/.sourcegraph/data/postgresql:/data/pgdata-12 -e POSTGRES_USER=postgres -p 5432:5432 sourcegraph/postgresql-16-codeinsights:{CURRENT_VERSION_NO_V}`
161+
162+
2. Once that temporary container marks that Postgresql has started, the migration is complete and you can stop the temporary container.
163+
3. Start the new `sourcegraph/server` container.
164+
165+
`docker run --publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:{CURRENT_VERSION_NO_V}`
166+
167+
You now have a single server Sourcegraph container image running on Postgresql 16.
168+
145169

146170
### Standard upgrades
147171

@@ -156,6 +180,16 @@ To update, just use the newer `sourcegraph/server:N.N.N` Docker image (where `N.
156180

157181
### Multi-version upgrades
158182

183+
> NOTE: It is no longer necessary to run Migrator outside of the single instance container. Migrator is now built into the container, and will be run via the `sourcegraph/server` image.
184+
>
185+
> We **still** recommend performing the entire upgrade procedure on an idle clone of the production instance and switch traffic over on success, if possible. This may be low-effort for installations with a canary environment or a blue/green deployment strategy.
186+
>
187+
> The below docs are kept for posterity for users on older versions of Sourcegraph that are looking to upgrade or run the migrator tool.
188+
189+
To update, just use the newer `sourcegraph/server:N.N.N` Docker image in place of the older one, using the same Docker volumes. Your server's data will be migrated automatically if needed. You can always find the version number details of the latest release via the [technical changelog](/technical-changelog).
190+
191+
### (Legacy) Multi-version upgrades
192+
159193
A [multi-version upgrade](/admin/updates/#multi-version-upgrades) is a downtime-incurring upgrade from version 3.20 or later to any future version. Multi-version upgrades will run both schema and data migrations to ensure the data available from the instance remains available post-upgrade.
160194

161195
> NOTE: It is highly recommended to **take an up-to-date snapshot of your databases** prior to starting a multi-version upgrade. The upgrade process aggressively mutates the shape and contents of your database, and undiscovered errors in the migration process or unexpected environmental differences may cause an unusable instance or data loss.
@@ -218,21 +252,22 @@ For example, `${PATH}` is `~/.sourcegraph/data` in `-v ~/.sourcegraph/data:/var/
218252

219253
```sh
220254
$ docker run --rm -it \
221-
-v ${PATH}/postgresql:/data/pgdata-${PG_VERSION} \
255+
-v ${PATH}/postgresql:/data/pgdata-12 \
222256
-u 70 \
223257
-p 5432:5432 \
224258
--entrypoint bash \
225-
sourcegraph/postgres-${PG_VERSION_TAG}:${SG_VERSION} \
226-
-c 'echo "host all all 0.0.0.0/0 trust" >> /data/pgdata-${PG_VERSION}/pg_hba.conf && postgres -c l listen_addresses="*" -D /data/pgdata-${PG_VERSION}'
259+
sourcegraph/${PG_VERSION_TAG}:${SG_VERSION} \
260+
-c 'echo "host all all 0.0.0.0/0 trust" >> /data/pgdata-12/pg_hba.conf && postgres -c l listen_addresses="*" -D /data/pgdata-12'
227261
```
228262

229263
The version of this Postgres container is dependent on the version of the instance prior to upgrade.
230264

231-
| `${SG_VERSION}` | `${PG_VERSION}` | `${PG_VERSION_TAG}` |
232-
| ------------------- | --------------- | ------------------- |
233-
| `3.20.X` - `3.29.X` | `12` | `12.6` |
234-
| `3.30.X` - `3.37.X` | `12` | `12.6-alpine` |
235-
| `3.38.X` - | `12` | `12-alpine` |
265+
| `${SG_VERSION}` | `${PG_VERSION_TAG}` |
266+
| ------------------- | ------------------- |
267+
| `3.20.X` - `3.29.X` | `postgres-12.6` |
268+
| `3.30.X` - `3.37.X` | `postgres-12.6-alpine`|
269+
| `3.38.X` - `5.9.X` | `postgres-12-alpine` |
270+
| `5.10.X` - | `postgresql-16` |
236271

237272
## Troubleshooting
238273

docs/cloud/index.mdx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,24 @@ To opt out of managed SMTP, please let your Sourcegraph Account team know when r
151151

152152
To learn more about how the Sourcegraph team operates managed SMTP internally, refer to [our handbook](https://handbook.sourcegraph.com/departments/cloud/technical-docs/managed-smtp/).
153153

154+
### Audit Logs
155+
156+
Our Cloud instances provide [audit logs](/admin/audit_log#cloud) to help you monitor and investigate actions taken by users and the system. These logs are available to download by request and are also sent to a [centralized logging service](https://about.sourcegraph.com/security#logging) for 30 day retention. Should you wish to
157+
extend this period, please be aware that additional charges will apply.
158+
To request an extension, please contact your assigned Customer Engineer (CE) or send an email to Sourcegraph Support at [email protected].
159+
160+
#### Download audit logs
161+
162+
For requesting audit logs, please contact your our support team.
163+
164+
#### Deliver audit logs to customer-managed destination (LogPush)
165+
166+
Sourcegraph LogPush is an optional add-on to deliver audit logs to a customer provided destination. To enable this feature, please contact your assigned Customer Engineer (CE) or support team.
167+
168+
Supported destinations:
169+
170+
- Google Cloud Storage (GCS)
171+
154172
## Requirements
155173

156174
### Business
@@ -190,10 +208,6 @@ Only essential Sourcegraph personnel will have access to the instance, server, c
190208

191209
All Sourcegraph Cloud instances have Sourcegraph management access enabled by default, and customers may request to disable by contacting your Sourcegraph contact.
192210

193-
### Audit Logs
194-
195-
Our Cloud instances provide [audit logs](/admin/audit_log#cloud) to help you monitor and investigate actions taken by users and the system. These logs are available to download by request and are also sent to a [centralized logging service](https://about.sourcegraph.com/security#logging) for 30 day retention (configurable for greater periods by request).
196-
197211
## Accommodating special requirements
198212

199213
We may be able to support special requests (network access policies, infrastructure requirements, custom version control systems, etc.) with additional time, support, and fees. [Contact us](https://about.sourcegraph.com/contact/sales) to discuss any special requirements you may have.

docs/code-search/code-navigation/precise_code_navigation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ The following repositories have precise code navigation enabled:
6767
## More resources
6868

6969
<QuickLinks>
70-
<QuickLink href="/code-search/code-navigation/writing_an_indexer" icon="installation" imgAlt="Code Navigation" title="Writing a SCIP indexer" description="Learn how you can write an indexer to emit SCIP with Sourcegraph." />
70+
<QuickLink href="/code-search/code-navigation/writing_an_indexer" icon="installation" imgAlt="Code Navigation" title="Writing a SCIP indexer" description="Learn how you can write an indexer to emit SCIP for code navigation in Sourcegraph." />
7171
<QuickLink href="/code-search/code-navigation/how-to/adding_lsif_to_workflows" icon="lightbulb" imgAlt="Code Navigation" title="Adding precise code navigation to CI/CD workflows" description="Learn how to add precise code navigation to CI/CD workflows to Sourcegraph." />
7272
</QuickLinks>

src/data/navigation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ export const navigation: NavigationItem[] = [
102102
{ title: "Features", href: "/code-search/code-navigation/features", },
103103
{ title: "Search-based code navigation", href: "/code-search/code-navigation/search_based_code_navigation", },
104104
{ title: "Precise code navigation", href: "/code-search/code-navigation/precise_code_navigation", },
105-
{ title: "Indexers", href: "/code-search/code-navigation/writing_an_indexer", },
106105
{ title: "Auto-indexing", href: "/code-search/code-navigation/auto_indexing", },
107106
{ title: "Environment Variables", href: "/code-search/code-navigation/envvars", },
108107
{ title: "Troubleshooting", href: "/code-search/code-navigation/troubleshooting", },

0 commit comments

Comments
 (0)