Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/admin/deploy/docker-compose/aws.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ set -euxo pipefail
###############################################################################
# Please read the notes below the script if you are cloning a private repository
DEPLOY_SOURCEGRAPH_DOCKER_FORK_CLONE_URL='https://github.com/sourcegraph/deploy-sourcegraph-docker.git'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION='v5.6.2535'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION={CURRENT_VERSION}
##################### NO CHANGES REQUIRED BELOW THIS LINE #####################
DEPLOY_SOURCEGRAPH_DOCKER_CHECKOUT='/home/ec2-user/deploy-sourcegraph-docker'
DOCKER_COMPOSE_VERSION='1.29.2'
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/deploy/docker-compose/azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ set -euxo pipefail
###############################################################################
# Please read the notes below the script if you are cloning a private repository
DEPLOY_SOURCEGRAPH_DOCKER_FORK_CLONE_URL='https://github.com/sourcegraph/deploy-sourcegraph-docker.git'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION='v5.6.2535'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION={CURRENT_VERSION}
##################### NO CHANGES REQUIRED BELOW THIS LINE #####################
DEPLOY_SOURCEGRAPH_DOCKER_CHECKOUT='/root/deploy-sourcegraph-docker'
DOCKER_COMPOSE_VERSION='1.29.2'
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/deploy/docker-compose/digitalocean.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ set -euxo pipefail
###############################################################################
# Please read the notes below the script if you are cloning a private repository
DEPLOY_SOURCEGRAPH_DOCKER_FORK_CLONE_URL='https://github.com/sourcegraph/deploy-sourcegraph-docker.git'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION='v5.6.2535'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION={CURRENT_VERSION}
##################### NO CHANGES REQUIRED BELOW THIS LINE #####################
DEPLOY_SOURCEGRAPH_DOCKER_CHECKOUT='/root/deploy-sourcegraph-docker'
DOCKER_DATA_ROOT='/mnt/docker-data'
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/deploy/docker-compose/google_cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ set -euxo pipefail
###############################################################################
# Please read the notes below the script if you are cloning a private repository
DEPLOY_SOURCEGRAPH_DOCKER_FORK_CLONE_URL='https://github.com/sourcegraph/deploy-sourcegraph-docker.git'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION='v5.6.2535'
DEPLOY_SOURCEGRAPH_DOCKER_FORK_REVISION={CURRENT_VERSION}
##################### NO CHANGES REQUIRED BELOW THIS LINE #####################
# IMPORTANT: DO NOT MAKE ANY CHANGES FROM THIS POINT ONWARD
DEPLOY_SOURCEGRAPH_DOCKER_CHECKOUT='/root/deploy-sourcegraph-docker'
Expand Down
7 changes: 3 additions & 4 deletions docs/admin/deploy/docker-compose/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Sourcegraph with Docker Compose

Setting up Docker applications with [multiple containers](https://www.docker.com/resources/what-container) like Sourcegraph using Docker Compose allows us to start all the applications with a single command. It also makes configuring the applications easier through updating the docker-compose.yaml and docker-compose.override.yaml files. Please see the [official Docker Compose docs](https://docs.docker.com/compose/) to learn more about Docker Compose.

This guide will take you through how to install Sourcegraph with Docker Compose on a server, which could be the local machine, a server on a local network, or cloud-hosted server. You can also follow one of the available *cloud-specific guides* listed below to prepare and install Sourcegraph on a supported cloud environment:
Expand Down Expand Up @@ -115,9 +113,10 @@ Continue with the following steps *after* you have created a public or private c
- This branch will be used to [upgrade Sourcegraph](/admin/deploy/docker-compose/upgrade) and install your Sourcegraph instance.
- It also allows us to track all of the customizations made to your Sourcegraph instance.

```bash

```
# Specify the version you want to install
export SOURCEGRAPH_VERSION="v5.6.2535"
export SOURCEGRAPH_VERSION={CURRENT_VERSION}
# Check out the selected version for use, in a new branch called "release"
git checkout $SOURCEGRAPH_VERSION -b release
```
Expand Down
10 changes: 6 additions & 4 deletions docs/admin/deploy/docker-compose/upgrade.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Upgrade Sourcegraph on Docker Compose

This document describes the process to update a Docker Compose Sourcegraph instance. If you are unfamiliar with sourcegraph versioning or releases see our [general concepts documentation](/admin/updates/).
Expand All @@ -8,7 +10,7 @@ This document describes the process to update a Docker Compose Sourcegraph insta

A [standard upgrade](/admin/updates/#upgrade-types) occurs between a Sourcegraph version and the minor or major version released immediately after it. If you would like to jump forward several versions, you must perform a [multi-version upgrade](#multi-version-upgrades) instead.

If you've [configured Docker Compose with a release branch](/admin/deploy/docker-compose/#step-1-prepare-the-deployment-repository), please merge the upstream release tag for the next minor version into your `release` branch. In the following example, the release branch is being upgraded to v5.6.2535.
If you've [configured Docker Compose with a release branch](/admin/deploy/docker-compose/#step-1-prepare-the-deployment-repository), please merge the upstream release tag for the next minor version into your `release` branch. In the following example, the release branch is being upgraded to {CURRENT_VERSION_STRING}.

```sh
# first, checkout the release branch
Expand All @@ -17,16 +19,16 @@ git checkout release
git fetch upstream
# merge the upstream release tag into your release branch
git checkout release
git merge v5.6.2535
git merge {CURRENT_VERSION}
```

#### Address any merge conflicts you might have

For each conflict, you need to reconcile any customizations you made with the updates from the new version. Use the information you gathered earlier from the change log and changes list to interpret the merge conflict and to ensure that it doesn't over-write your customizations. You may need to update your customizations to accommodate the new version.

> NOTE: If you have made no changes or only very minimal changes to your configuration, you can also ask git to always select incoming changes in the event of merge conflicts. In the following example merges will be accepted from the upstream version v5.6.2535:
> NOTE: If you have made no changes or only very minimal changes to your configuration, you can also ask git to always select incoming changes in the event of merge conflicts. In the following example merges will be accepted from the upstream version {CURREN_VERSION_STRING()}:
>
> `git merge -X theirs v5.6.2535`
> `git merge -X theirs {CURRENT_VERSION_STRING}`
>
> If you do this, make sure your configuration is correct before proceeding because it may have made changes to your docker-compose YAML file.

Expand Down
4 changes: 3 additions & 1 deletion docs/admin/deploy/docker-single-container/aws.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING_NO_V, CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Install single-container Sourcegraph with Docker on AWS

This tutorial shows you how to deploy [single-container Sourcegraph with Docker](/admin/deploy/docker-single-container/) to a single EC2 instance on AWS.
Expand Down Expand Up @@ -33,7 +35,7 @@ This tutorial shows you how to deploy [single-container Sourcegraph with Docker]
- usermod -a -G docker ec2-user

# Install and run Sourcegraph. Restart the container upon subsequent reboots
- [ sh, -c, 'docker run -d --publish 80:7080 --publish 443:7080 --publish 127.0.0.1:3370:3370 --restart unless-stopped --volume /home/ec2-user/.sourcegraph/config:/etc/sourcegraph --volume /home/ec2-user/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:5.6.2535' ]
- [ sh, -c, 'docker run -d --publish 80:7080 --publish 443:7080 --publish 127.0.0.1:3370:3370 --restart unless-stopped --volume /home/ec2-user/.sourcegraph/config:/etc/sourcegraph --volume /home/ec2-user/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:{CURRENT_VERSION_NO_V}' ]
```

- Select **Next: ...** until you get to the **Configure Security Group** page. Then add the following rules:
Expand Down
4 changes: 3 additions & 1 deletion docs/admin/deploy/docker-single-container/digitalocean.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING_NO_V, CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Install single-container Sourcegraph with Docker on DigitalOcean

This tutorial shows you how to deploy [single-container Sourcegraph with Docker](/admin/deploy/docker-single-container/) to a single node running on DigitalOcean.
Expand All @@ -17,7 +19,7 @@ This tutorial shows you how to deploy [single-container Sourcegraph with Docker]
1. Run the Sourcegraph Docker image as a daemon:

```
docker run -d --publish 80:7080 --publish 443:7443 --restart unless-stopped --volume /root/.sourcegraph/config:/etc/sourcegraph --volume /root/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:5.6.2535
docker run -d --publish 80:7080 --publish 443:7443 --restart unless-stopped --volume /root/.sourcegraph/config:/etc/sourcegraph --volume /root/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:{CURRENT_VERSION_NO_V}
```
1. Navigate to the droplet's IP address to finish initializing Sourcegraph. If you have configured a
DNS entry for the IP, configure `externalURL` to reflect that.
Expand Down
4 changes: 3 additions & 1 deletion docs/admin/deploy/docker-single-container/google_cloud.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING_NO_V, CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Install single-container Sourcegraph with Docker on Google Cloud

This tutorial shows you how to deploy [single-container Sourcegraph with Docker](/admin/deploy/docker-single-container/) to a single node running on Google Cloud.
Expand All @@ -23,7 +25,7 @@ This tutorial shows you how to deploy [single-container Sourcegraph with Docker]
sudo apt-get install -y docker-ce
mkdir -p /root/.sourcegraph/config
mkdir -p /root/.sourcegraph/data
docker run -d --publish 80:7080 --publish 443:7443 --restart unless-stopped --volume /root/.sourcegraph/config:/etc/sourcegraph --volume /root/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:5.6.2535
docker run -d --publish 80:7080 --publish 443:7443 --restart unless-stopped --volume /root/.sourcegraph/config:/etc/sourcegraph --volume /root/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:{CURRENT_VERSION_NO_V}
```

- Create your VM, then navigate to its public IP address.
Expand Down
12 changes: 7 additions & 5 deletions docs/admin/deploy/docker-single-container/index.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING_NO_V, CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Docker Single Container Deployment

The Docker Single Container deployment type is a way to very quickly get an instance of Sourcegraph set up locally to experiment with many of its features. However, it is **not recommended** for a production instance, and **has limitations** depending on the OS you are deploying to, as well as the associated resources. See the [troubleshooting section](#troubleshooting) for additional information.
Expand All @@ -13,7 +15,7 @@ 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:5.6.2535
sourcegraph/server:{CURRENT_VERSION_NO_V}
```

Once the server is ready (logo is displayed in the terminal), navigate to the hostname or IP address on port `7080`. Create the admin account, then you'll be guided through setting up Sourcegraph for code searching and navigation.
Expand Down Expand Up @@ -46,7 +48,7 @@ For example, to mount a `.gitconfig`, create a file `/mnt/sourcegraph/config/git
Alternatively you can create a new Docker image which inherits from Sourcegraph and then mutates the environment:

```dockerfile
FROM sourcegraph/server:5.6.2535
FROM sourcegraph/server:{CURRENT_VERSION_NO_V}

COPY gitconfig /etc/gitconfig
COPY ssh /root/.ssh
Expand Down Expand Up @@ -87,7 +89,7 @@ This is required to [collect debug data](/admin/pprof).
The docker run command for single-container Sourcegraph needs an additional publish flag to expose the debug port:

```sh
$ docker run --publish 7080:7080 --publish 127.0.0.1:3370:3370 --publish 127.0.0.1:6060:6060 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:5.6.2535
$ docker run --publish 7080:7080 --publish 127.0.0.1:3370:3370 --publish 127.0.0.1:6060:6060 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:{CURRENT_VERSION_NO_V}
```

If Sourcegraph is deployed to a remote server, then access via an SSH tunnel using a tool
Expand All @@ -105,7 +107,7 @@ Add the following to your docker run command:
```sh
$ docker run [...]
-e (YOUR CODE)
sourcegraph/server:5.6.2535
sourcegraph/server:{CURRENT_VERSION_NO_V}
```

## Operation
Expand Down Expand Up @@ -254,7 +256,7 @@ Sourcegraph can be **tested** on Windows 10 using roughly the same steps provide
1. [Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/)
2. Using a command prompt, follow the same [installation steps provided above](#install-sourcegraph-with-docker) but remove the `--volume` arguments. For example by pasting this:

<pre class="pre-wrap"><code>docker run<span class="virtual-br"></span> --publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm<span class="virtual-br"></span> sourcegraph/server:5.6.2535</code></pre>
<pre class="pre-wrap"><code>docker run<span class="virtual-br"></span> --publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm<span class="virtual-br"></span> sourcegraph/server:{CURRENT_VERSION_STRING_NO_V()}</code></pre>

### Low resource environments

Expand Down
18 changes: 10 additions & 8 deletions docs/admin/deploy/kubernetes/index.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING_NO_V, CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Sourcegraph on Kubernetes with Helm

Best for large enterprises that require a multi-node, self-hosted solution.
Expand Down Expand Up @@ -52,7 +54,7 @@ $ helm repo add sourcegraph https://helm.sourcegraph.com/release
Install the Sourcegraph chart using default values:

```sh
$ helm install --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm install --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```

Sourcegraph should now be available via the address set. Browsing to the url should now provide access to the Sourcegraph UI to create the initial administrator account.
Expand All @@ -79,7 +81,7 @@ Example overrides can be found in the [examples](https://github.com/sourcegraph/

Providing the override file to Helm is done with the inclusion of the values flag and the name of the file:
```sh
$ helm upgrade --install --values ./override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm upgrade --install --values ./override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```
When making configuration changes, it's recommended to review the changes that will be applied—see [Reviewing Changes](#reviewing-changes).

Expand Down Expand Up @@ -515,7 +517,7 @@ The override file includes a [BackendConfig] CRD. This is necessary to instruct
**Step 2:** – Install the chart

```sh
$ helm upgrade --install --values ./override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm upgrade --install --values ./override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```

It will take around 10 minutes for the load balancer to be fully ready, you may check on the status and obtain the load balancer IP using the following command:
Expand Down Expand Up @@ -636,7 +638,7 @@ storageClass:
**Step 2:** – Install the chart

```sh
$ helm upgrade --install --values ./override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm upgrade --install --values ./override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```

It will take some time for the load balancer to be fully ready, use the following to check on the status and obtain the load balancer address (once available):
Expand Down Expand Up @@ -723,7 +725,7 @@ storageClass:
**Step 2:** – Install the chart

```sh
$ helm upgrade --install --values ./override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm upgrade --install --values ./override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```

It will take some time for the load balancer to be fully ready, you can check on the status and obtain the load balancer address (when ready) using:
Expand Down Expand Up @@ -809,7 +811,7 @@ storageClass:
**Step 2:** – Install the chart

```sh
$ helm upgrade --install --values ./override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm upgrade --install --values ./override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```

It may take some time before your ingress is up and ready to proceed. Depending on how your Ingress Controller works, you may be able to check on its status and obtain the public address of your Ingress using:
Expand Down Expand Up @@ -909,7 +911,7 @@ $ helm repo update sourcegraph
**Step 4:** Install the new version:

```sh
$ helm upgrade --install -f override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
$ helm upgrade --install -f override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
```

**Step 5:** Verify the installation has started:
Expand Down Expand Up @@ -975,7 +977,7 @@ $ helm upgrade --install -n <your namespace> --set "migrator.args={upgrade,--fro

**Example:**
```sh
$ helm upgrade --install -n sourcegraph --set "migrator.args={upgrade,--from=3.41.0,--to=4.5.1}" sourcegraph-migrator sourcegraph/sourcegraph-migrator --version 5.6.2535
$ helm upgrade --install -n sourcegraph --set "migrator.args={upgrade,--from=3.41.0,--to=4.5.1}" sourcegraph-migrator sourcegraph/sourcegraph-migrator --version {CURRENT_VERSION_NO_V}
Release "sourcegraph-migrator" has been upgraded. Happy Helming!
NAME: sourcegraph-migrator
LAST DEPLOYED: Tue Mar 7 18:23:56 2023
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/deploy/kubernetes/kustomize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ See the [docs on reference repository](/admin/deploy/repositories) for detailed
# Recommended: replace the URL with your private fork
$ git clone https://github.com/sourcegraph/deploy-sourcegraph-k8s.git
$ cd deploy-sourcegraph-k8s
$ git checkout v5.6.2535 && git checkout -b release
$ git checkout {CURRENT_VERSION} && git checkout -b release
```

### **Step 2**: Set up a directory for your instance
Expand Down
4 changes: 3 additions & 1 deletion docs/admin/deploy/machine-images/gce.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CURRENT_VERSION_STRING_NO_V, CURRENT_VERSION_STRING } from 'src/components/PreCodeBlock'

# Sourcegraph Google Compute Instances

Sourcegraph [Google Compute Engine (GCE) Images](https://cloud.google.com/compute/docs/images) allow you to quickly deploy a production-ready Sourcegraph instance tuned to your organization's scale in just a few clicks.
Expand Down Expand Up @@ -143,7 +145,7 @@ SSH into the VM as user `sourcegraph` and run the following command:

```bash
# Please update the version number according to the upgrade notes
helm upgrade -i -f /home/sourcegraph/deploy/install/override.yaml --version 5.6.2535 sourcegraph sourcegraph/sourcegraph
helm upgrade -i -f /home/sourcegraph/deploy/install/override.yaml --version {CURRENT_VERSION_NO_V} sourcegraph sourcegraph/sourcegraph
# Note: /home/sourcegraph/deploy/install/override.yaml is the override file for your instance size
```

Expand Down
Loading
Loading