Skip to content

Commit fcc3354

Browse files
DavidBoikebording
andauthored
ServiceControl 6 documentation (#6862)
* Add SC version 6 snippets, but … and remove stuff we weren't using * Upgrade guide * Raven container page updates * Volume map instead of bind mount * external raven * Revisions --------- Co-authored-by: Brandon Ording <[email protected]>
1 parent 4a59460 commit fcc3354

File tree

6 files changed

+84
-66
lines changed

6 files changed

+84
-66
lines changed

Snippets/ServiceControl/ServiceControl_5/compose.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.
File renamed without changes.

Snippets/ServiceControl/ServiceControl_6/placeholder.txt

Whitespace-only changes.

menu/menu.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@
804804
- Url: nservicebus/throughput-tool/sql-transport
805805
Title: using SQL Transport
806806
- Url: nservicebus/throughput-tool/postgresql-transport
807-
Title: using PostgreSQL Transport
807+
Title: using PostgreSQL Transport
808808
- Url: nservicebus/throughput-tool/service-control
809809
Title: using ServiceControl
810810
- Url: nservicebus/throughput-tool/determine-transport
@@ -1453,6 +1453,8 @@
14531453
Articles:
14541454
- Title: Upgrade tips
14551455
Url: servicecontrol/upgrades
1456+
- Title: Version 5 to 6
1457+
Url: servicecontrol/upgrades/5to6
14561458
- Title: Version 5.1 to 5.2
14571459
Url: servicecontrol/upgrades/5.1to5.2
14581460
- Title: Version 4 to 5

servicecontrol/ravendb/containers.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
title: Managing ServiceControl RavenDB instances via Containers
33
reviewed: 2024-06-11
44
component: ServiceControl
5+
versions: '[5,)'
56
redirects:
67
- servciecontrol/ravendb/deployment/containers
78
---
89

910
When ServiceControl is hosted in containers, the [`particular/servicecontrol-ravendb` image](https://hub.docker.com/r/particular/servicecontrol-ravendb) provides the database storage to the Error and Audit instances.
1011

11-
The database container extends the [official RavenDB container](https://hub.docker.com/r/ravendb/ravendb) and is provided to easy version parity with ServiceControl instances. In other words, for any version `x.y.z` version of ServiceControl, the same version `x.y.z` of the database container should be used to ensure data storage compatibility.
12+
The database container extends the [official RavenDB container](https://hub.docker.com/r/ravendb/ravendb) and is provided to ensure compatibility with ServiceControl instances. In other words, for any version `x.y.z` version of ServiceControl, the same version `x.y.z` of the database container should be used to ensure data storage compatibility.
1213

1314
> [!WARNING]
1415
> A single database container should not be shared between multiple ServiceControl instances in production scenarios.
@@ -17,25 +18,47 @@ The database container extends the [official RavenDB container](https://hub.dock
1718

1819
This minimal example creates a database container using `docker run`:
1920

21+
#if-version [5, 6)
2022
```shell
2123
docker run -d --name servicecontrol-db \
22-
-v <DATA_DIRECTORY>:/opt/RavenDB/Server/RavenData \
24+
-v db-config:/opt/RavenDB/config \
25+
-v db-data:/opt/RavenDB/Server/RavenData \
2326
particular/servicecontrol-ravendb:latest
2427
```
28+
#end-if
29+
#if-version [6, )
30+
```shell
31+
docker run -d --name servicecontrol-db \
32+
-v db-config:/etc/ravendb \
33+
-v db-data:/var/lib/ravendb/data \
34+
particular/servicecontrol-ravendb:latest
35+
```
36+
#end-if
2537

2638
Once the database container is running, the connection string `http://servicecontrol-db:8080` can be used for the `RAVENDB_CONNECTIONSTRING` value for an [Error instance](/servicecontrol/servicecontrol-instances/deployment/containers.md) or [Audit instance](/servicecontrol/audit-instances/deployment/containers.md).
2739

2840
## Required settings
2941

42+
#if-version [5, 6)
3043
A volume must be mounted to `/opt/RavenDB/Server/RavenData` to provide persistent storage for database contents between container updates. Failure to specify a path for the volume will result in loss of all data when the container is removed.
44+
#end-if
45+
#if-version [6,7)
46+
A volume must be mounted to `/var/lib/ravendb/data` to provide persistent storage for database contents between container updates. Failure to specify a path for the volume will result in loss of all data when the container is removed.
47+
#end-if
48+
49+
> [!NOTE]
50+
> RavenDB has specific requirements about the types of storage it supports. See the [RavenDB container requirements documentation](https://ravendb.net/docs/article-page/6.2/csharp/start/installation/running-in-docker-container#requirements) for more information.
51+
>
52+
> If providing these storage requirements is not possible, it is also possible to connect to an external, separately-licensed RavenDB server. The external server must be using the same Major and Minor version noted in the version map below.
3153
3254
## Additional settings
3355

3456
As the ServiceControl RavenDB container extends the official RavenDB container, additional configuration details can be found in the RavenDB Docker container documentation, according to this version map:
3557

3658
| ServiceControl Versions | RavenDB Version | Container Documentation |
3759
|:-:|:-:|:-:|
38-
| 5.4 and higher | 5.4 | [RavenDB 5.4 container docs](https://ravendb.net/docs/article-page/5.4/csharp/start/installation/running-in-docker-container) |
60+
| 6.x | 6.2 | [RavenDB 6.2 container docs](https://ravendb.net/docs/article-page/6.2/csharp/start/installation/running-in-docker-container)
61+
| 5.4 to 5.11 | 5.4 | [RavenDB 5.4 container docs](https://ravendb.net/docs/article-page/5.4/csharp/start/installation/running-in-docker-container) |
3962

4063
> [!NOTE]
41-
> The [RavenDB container overview on DockerHub](https://hub.docker.com/r/ravendb/ravendb) is specific to the most recent version of RavenDB which may not match the version used by ServiceControl.
64+
> The [RavenDB container overview on Docker Hub](https://hub.docker.com/r/ravendb/ravendb) is specific to the most recent version of RavenDB which may not match the version used by ServiceControl.

servicecontrol/upgrades/5to6.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Upgrade ServiceControl from Version 5 to Version 6
3+
summary: Instructions on how to upgrade ServiceControl from version 5 to 6
4+
reviewed: 2023-11-30
5+
isUpgradeGuide: true
6+
component: ServiceControl
7+
---
8+
9+
ServiceControl version 6 updates the underlying data storage from RavenDB 5.4 to RavenDB 6.2. Once upgraded, the database cannot be downgraded.
10+
11+
Users hosting ServiceControl in containerized infrastructure must also make changes to ensure data is accessible in the new version.
12+
13+
## Prerequisites
14+
15+
Before upgrading to ServiceControl version 6, ensure all ServiceControl instances have first been upgraded to version 5.11.0.
16+
17+
## Container changes
18+
19+
When using the [`servicecontrol-ravendb` container image](https://hub.docker.com/r/particular/servicecontrol-ravendb), the following changes must be made when upgrading to ServiceControl version 6:
20+
21+
### Data volume mount location
22+
23+
The internal structure of the container image that the `servicecontrol-ravendb` container image is based on has changed, so the [required data volume](/servicecontrol/ravendb/containers.md#required-settings) must be mounted to the new location inside the container.
24+
25+
- Old path: `/opt/RavenDB/Server/RavenData`
26+
- New path `/var/lib/ravendb/data`
27+
28+
If the volume mount mapping is not updated, the container will refuse to start.
29+
30+
### Data volume permissions
31+
32+
The previous container ran as `root`, but the new container now runs as a non-root `ravendb` user with user id 999.
33+
34+
Because of this change, the files created in the data volume by the previous version of the container need to have their owner changed to user id and group id 999.
35+
36+
The exact way to do this depends on the type of mount used (volume vs. bind mount) and container hosting environment.
37+
38+
For example, one way this could be achieved:
39+
40+
```bash
41+
docker stop <insert sc ravendb container name here>
42+
docker remove <insert sc ravendb container name here>
43+
docker run --rm \
44+
-v <ravendb volume name or bind mount path>:/opt/RavenDB/Server/RavenData \
45+
--entrypoint /bin/bash \
46+
particular/servicecontrol-ravendb:5.11.0 \
47+
-c "chown -R 999:999 /opt/RavenDB/Server/RavenData"
48+
```
49+
50+
If the permissions have not been updated, the container will refuse to start.
51+
52+
## Support for version 5
53+
54+
Version 5 is supported for one year after version 6 is released as defined by the [ServiceControl support policy](/servicecontrol/upgrades/support-policy.md). The ServiceControl support end date is available at [ServiceControl supported versions](/servicecontrol/upgrades/supported-versions.md).

0 commit comments

Comments
 (0)