Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit e3a8be3

Browse files
authored
update docs (#15)
1 parent efa1cd6 commit e3a8be3

File tree

2 files changed

+7
-196
lines changed

2 files changed

+7
-196
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ be used for new Sourcegraph installations.
55

66
[![sourcegraph: search](https://img.shields.io/badge/sourcegraph-search-brightgreen.svg)](https://sourcegraph.com/github.com/sourcegraph/deploy-sourcegraph-docker) [![Build status](https://badge.buildkite.com/e60f9ffcafd68882d3db6fe5e33567e3a111d391a554d50d82.svg)](https://buildkite.com/sourcegraph/deploy-sourcegraph-docker)
77

8-
This repository is the deployment reference for [deploying Sourcegraph with Docker (Customer Replica 1)](https://docs.sourcegraph.com/admin/install/docker-compose).
8+
This repository is the replica deployment reference of [deploying Sourcegraph with Docker](https://docs.sourcegraph.com/admin/install/docker-compose) for [this](https://github.com/sourcegraph/accounts/issues/565) customer.
99

1010
> 🚨 IMPORTANT: When upgrading Sourcegraph, please check [upgrading docs](https://docs.sourcegraph.com/admin/updates/docker_compose) to check if any manual migrations are necessary.
1111
>
12-
> The `master` branch tracks development. Use the branch of this repository corresponding to the
12+
> The `main` branch tracks development. Use the branch of this repository corresponding to the
1313
> version of Sourcegraph you wish to deploy, e.g. `git checkout 3.19`.
1414
1515
For product and [pricing](https://about.sourcegraph.com/pricing/) information, visit

RELEASING.md

Lines changed: 5 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -1,200 +1,11 @@
11
# Release guide
22

3-
**This is the guide for releasing the [Pure-Docker Sourcegraph deployment reference](./pure-docker/README.md).**
4-
The docker-compose release is done entirely via the [Sourcegraph release tool](https://about.sourcegraph.com/handbook/engineering/distribution/tools/release).
3+
**This is the guide for releasing the [Pure-Docker Sourcegraph deployment reference replica](./pure-docker/README.md).** for [this](https://github.com/sourcegraph/accounts/issues/565) customer.
4+
The release is done entirely via the [Sourcegraph release tool](https://about.sourcegraph.com/handbook/engineering/distribution/tools/release).
55

66
## Branching/tagging scheme
77

8-
Just like deploy-sourcegraph, we use version branches and version tags. We _additionally_ have a second set which is customer-replication branches and version tags:
8+
Just like deploy-sourcegraph, we use version branches and version tags.
99

10-
- Tag examples: `v3.8.2`, `v3.9.2`, `customer-replica-v3.8.2`, `customer-replica-v3.9.2-2`
11-
- Branch examples: `3.8`, `3.9`, `3.8-customer-replica`, `3.9-customer-replica`
12-
13-
The customer replica branches are distinct living branches which have diffs we maintain for replicating some customers using the pure-docker deployment model described in the README.md of this repository (e.g. the customers' different Postgres version, changes to the `prometheus_targets.yml`, and more.) We test, tag, and release these `$VERSION-customer-replica` branches as `customer-replica-$VERSION` to produce the final diffs we send to customers running a pure-docker deployment on e.g. in the [pure docker upgrade guide](https://docs.sourcegraph.com/admin/updates/pure_docker).
14-
15-
## Releasing a new version
16-
17-
### Create the release branch
18-
19-
> ⚠️ If you are using the Sourcegraph release tooling, this step will be done for you in the PR it creates. Learn more about the release process in [the handbook](https://about.sourcegraph.com/handbook/engineering/releases). In this case, do not do this step manually.
20-
21-
For example if releasing `v3.17.2` then create this branch from latest `master`:
22-
23-
```
24-
git checkout -B 3.17
25-
git push --set-upstream origin 3.17
26-
```
27-
28-
### Update the image tags
29-
30-
> ⚠️ If you are using the Sourcegraph release tooling, this step will be done for you in the PR it creates. Learn more about the release process in [the handbook](https://about.sourcegraph.com/handbook/engineering/releases). In this case, do not do this step manually.
31-
32-
In the latest release branch you created:
33-
34-
1. Run `tools/update-docker-tags.sh $VERSION`
35-
2. Confirm the diff shows the image tags being updated to the version you expect, and push directly to the release branch.
36-
37-
### Smoke Test: ensure Pure-Docker starts from scratch
38-
39-
> ⚠️ This test now runs in Buildkite, under the `pure-docker-test` step - you can validate [the results of the CI run](https://buildkite.com/sourcegraph/deploy-sourcegraph-docker) instead.
40-
### Smoke test: ensure Docker Compose starts from scratch
41-
42-
> ⚠️ This test now runs in Buildkite, under the `docker-compose-test` step - you can validate [the results of the CI run](https://buildkite.com/sourcegraph/deploy-sourcegraph-docker) instead.
43-
44-
Refer to the [testing documentation](TESTING.md) for running tests from your local machine.
45-
46-
### Smoke test: ensure Docker Compose upgrades work
47-
48-
> ⚠️ This test now runs in Buildktie, in the `qa` pipeline under the `Sourcegraph Upgrade` step, you can validate [the results of the CI run](https://buildkite.com/sourcegraph)
49-
50-
Refer to the [testing documentation](TESTING.md) for running tests from your local machine.
51-
52-
### Tag the final release
53-
54-
> ⚠️ If you are using the Sourcegraph release tooling, this will be done for you as part of the release steps. Learn more about the release process in [the handbook](https://about.sourcegraph.com/handbook/engineering/releases). In this case, do not do this step manually.
55-
56-
For example:
57-
58-
```
59-
git checkout 3.9
60-
git tag v3.9.2
61-
git push origin v3.9.2
62-
```
63-
64-
## Releasing pure-docker
65-
66-
For pure-docker, we provide customers with an exact diff of changes to make. They do not run our deploy.sh scripts directly, instead they copy them or adapt them to their own deployment environment entirely. This means we must carefully communicate each change that is made.
67-
68-
To reduce the chance for errors, we send an exact diff of changes. This diff needs to be as minimal and concise as possible, and e.g. not include changes to unrelated files like `.prettierignore` or `docker-compose/` to avoid any confusion. See https://docs.sourcegraph.com/admin/updates/pure_docker for examples of what these diffs look like.
69-
70-
### Major/Minor release
71-
72-
Pretend `3.8` was the last version of pure-docker release (look for the latest `n.n-customer-replica` branch), and that `3.9` is the version we want to release. Then:
73-
74-
```sh
75-
# Checkout the current pure-docker release branch
76-
git checkout 3.8-customer-replica
77-
78-
# Create the new pure-docker release branch
79-
git checkout -B 3.9-customer-replica
80-
81-
# Merge the publish-3.9.0 branch, which will have been created by the release tool, into the pure-docker release branch. Default to taking the remote changes. Note that "theirs" is a Git term, not a placeholder.
82-
git merge publish-3.9.0 -X theirs
83-
84-
# Reset to previous commit so we can manually inspect ALL changes - we want to create multiple commits instead of keeping a single merge commit
85-
git reset HEAD~
86-
87-
# Show which files may have been deleted, etc.
88-
git status
89-
```
90-
91-
While committing in next steps, you will run into two merge conflicts:
92-
93-
- Do not commit `deploy-caddy.sh` or changes related to it, as `deploy-apache.sh` is used here.
94-
- The `.prettierignore` should contain the following lines:
95-
96-
```
97-
.github/
98-
*.md
99-
rootfs/etc/docker/daemon.json
100-
```
101-
102-
At this point you should evaluate the `git status` output as well as all the changes in your working git directory. You need to ensure the following happens:
103-
104-
1. Files that were shown as deleted in the `git status` output get deleted in the relevant commit.
105-
2. Create **one** commit with changes _unrelated to the upgrade_, i.e. include ALL changes that are not directly related to upgrading:
106-
- `git commit -m 'merge 3.9 (changes unrelated to upgrade)'`
107-
3. Create **one** commit with the changes _customers need to apply in order to ugprade_, i.e. the image tag changes, adding/removing any new services, updating env vars, but no unrelated changes.
108-
- Do not include `docker-compose/` changes in this commit, those are irrelevant to pure-docker users.
109-
- Double check `pure-docker/deploy-pgsql.sh` file and make sure it has the correct image sha. It should look something like `index.docker.io/sourcegraph/postgres-12.6-alpine:3.36.3@sha256:<hash>`
110-
- `git commit -m 'upgrade to v3.9.0'`
111-
4. Push the changes
112-
```shell
113-
git push --set-upstream origin 3.9-customer-replica
114-
```
115-
116-
Check buildkite for the branch after pushing it, e.g. at https://github.com/sourcegraph/deploy-sourcegraph-docker/commits/3.19-customer-replica
117-
118-
This will take about ~10 minutes to run. Refer to the [testing documentation](TESTING.md) if you run into issues / need more instructions.
119-
120-
Once you see `ALL TESTS PASSED`, tag the release:
121-
122-
```sh
123-
git tag customer-replica-v3.9.0
124-
git push origin customer-replica-v3.9.0
125-
```
126-
127-
Write an entry for https://docs.sourcegraph.com/admin/updates/pure_docker which includes:
128-
129-
- A link to your `upgrade to v3.9.0` commit describing the exact changes needed to be made.
130-
- Any specific manual migrations, including potential `chown` commands that may be needed (if any new service is introduced, etc.)
131-
- Look at https://github.com/sourcegraph/sourcegraph/pulls?q=is%3Apr+is%3Aopen+pure-docker to see if there are any open PRs that might need to be included.
132-
133-
### Patch release
134-
135-
Pretend `3.8` was the last version of pure-docker release (look for the latest `n.n-customer-replica` branch), and that `3.8.1` is the version we want to release. Then:
136-
137-
```sh
138-
# Checkout the current pure-docker release branch
139-
git checkout 3.8-customer-replica
140-
141-
# Create the new pure-docker release branch
142-
git checkout -B 3.8.1-customer-replica
143-
144-
# Merge the publish-3.8.1 branch, which will have been created by the release tool, into the pure-docker release branch. Default to taking the remote changes.
145-
git merge publish-3.8.1 -X theirs
146-
147-
# Reset to previous commit so we can manually inspect ALL changes - we want to create multiple commits instead of keeping a single merge commit
148-
git reset HEAD~
149-
150-
# Show which files may have been deleted, etc.
151-
git status
152-
```
153-
154-
While committing in next steps, you will run into two merge conflicts:
155-
156-
- Do not commit `deploy-caddy.sh` or changes related to it, as `deploy-apache.sh` is used here.
157-
- The `.prettierignore` should contain the following lines:
158-
159-
```
160-
.github/
161-
*.md
162-
rootfs/etc/docker/daemon.json
163-
```
164-
165-
At this point you should evaluate the `git status` output as well as all the changes in your working git directory. You need to ensure the following happens:
166-
167-
1. Files that were shown as deleted in the `git status` output get deleted in the relevant commit.
168-
2. Create **one** commit with changes _unrelated to the upgrade_, i.e. include ALL changes that are not directly related to upgrading:
169-
- `git commit -m 'merge 3.8.1 (changes unrelated to upgrade)'`
170-
3. Create **one** commit with the changes _customers need to apply in order to ugprade_, i.e. the image tag changes, adding/removing any new services, updating env vars, but no unrelated changes.
171-
- Do not include `docker-compose/` changes in this commit, those are irrelevant to pure-docker users.
172-
- Double check `pure-docker/deploy-pgsql.sh` file and make sure it has the correct image sha. It should look something like `index.docker.io/sourcegraph/postgres-12.6-alpine:3.36.3@sha256:<hash>`
173-
- `git commit -m 'upgrade to v3.8.1'`
174-
4. Push the changes to github
175-
```shell
176-
git push --set-upstream origin 3.8.1-customer-replica
177-
```
178-
179-
Open a Pull Request against `3.8-customer-replica` (base branch)
180-
181-
Check buildkite for the branch after pushing it, e.g. at https://github.com/sourcegraph/deploy-sourcegraph-docker/commits/3.19-customer-replica
182-
183-
This will take about ~10 minutes to run. Refer to the [testing documentation](TESTING.md) if you run into issues / need more instructions.
184-
185-
Once you see `ALL TESTS PASSED`, merge the Pull Request and tag a new release
186-
187-
```sh
188-
git checkout 3.8-customer-replica
189-
git pull
190-
git tag customer-replica-v3.8.1
191-
git push origin customer-replica-v3.8.1
192-
```
193-
194-
Write an entry for https://docs.sourcegraph.com/admin/updates/pure_docker which includes:
195-
196-
- A link to your `upgrade to v3.8.1` commit describing the exact changes needed to be made.
197-
- Any specific manual migrations, including potential `chown` commands that may be needed (if any new service is introduced, etc.)
198-
- Look at https://github.com/sourcegraph/sourcegraph/pulls?q=is%3Apr+is%3Aopen+pure-docker to see if there are any open PRs that might need to be included.
199-
200-
Contact https://app.hubspot.com/contacts/2762526/company/407948923/ over Slack and inform them the update is available, providing a link to the diff and other relevant details like the blog post link.
10+
- Tag examples: `v3.8.2`, `v3.9.2`
11+
- Branch examples: `3.8`, `3.9`

0 commit comments

Comments
 (0)