Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceControl 6 documentation #6862

Merged
merged 6 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
61 changes: 0 additions & 61 deletions Snippets/ServiceControl/ServiceControl_5/compose.yml

This file was deleted.

Empty file.
4 changes: 3 additions & 1 deletion menu/menu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
- Url: nservicebus/throughput-tool/sql-transport
Title: using SQL Transport
- Url: nservicebus/throughput-tool/postgresql-transport
Title: using PostgreSQL Transport
Title: using PostgreSQL Transport
- Url: nservicebus/throughput-tool/service-control
Title: using ServiceControl
- Url: nservicebus/throughput-tool/determine-transport
Expand Down Expand Up @@ -1445,6 +1445,8 @@
Articles:
- Title: Upgrade tips
Url: servicecontrol/upgrades
- Title: Version 5 to 6
Url: servicecontrol/upgrades/5to6
- Title: Version 5.1 to 5.2
Url: servicecontrol/upgrades/5.1to5.2
- Title: Version 4 to 5
Expand Down
25 changes: 23 additions & 2 deletions servicecontrol/ravendb/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Managing ServiceControl RavenDB instances via Containers
reviewed: 2024-06-11
component: ServiceControl
versions: '[5,)'
redirects:
- servciecontrol/ravendb/deployment/containers
---
Expand All @@ -17,25 +18,45 @@ The database container extends the [official RavenDB container](https://hub.dock

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

#if-version [5, 6)
```shell
docker run -d --name servicecontrol-db \
-v <DATA_DIRECTORY>:/opt/RavenDB/Server/RavenData \
-v <VOLUME_NAME>:/opt/RavenDB/Server/RavenData \
particular/servicecontrol-ravendb:latest
```
#end-if
#if-version [6, )
```shell
docker run -d --name servicecontrol-db \
-v <VOLUME_NAME>:/var/lib/ravendb/data \
particular/servicecontrol-ravendb:latest
```
#end-if

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).

## Required settings

#if-version [5, 6)
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.
#end-if
#if-version [6,7)
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.
#end-if

> [!NOTE]
> 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.
>
> 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.

## Additional settings

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:

| ServiceControl Versions | RavenDB Version | Container Documentation |
|:-:|:-:|:-:|
| 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) |
| 6.x | 6.2 | [RavenDB 6.2 container docs](https://ravendb.net/docs/article-page/6.2/csharp/start/installation/running-in-docker-container)
| 5.4 to 5.x | 5.4 | [RavenDB 5.4 container docs](https://ravendb.net/docs/article-page/5.4/csharp/start/installation/running-in-docker-container) |

> [!NOTE]
> 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.
37 changes: 37 additions & 0 deletions servicecontrol/upgrades/5to6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Upgrade ServiceControl from Version 5 to Version 6
summary: Instructions on how to upgrade ServiceControl from version 5 to 6
reviewed: 2023-11-30
isUpgradeGuide: true
component: ServiceControl
---

ServiceControl version 6 updates the underlying data storage from RavenDB 5 to RavenDB 6. Once upgraded, the database cannot be downgraded.

Users hosting ServiceControl in containerized infrastructure must also make changes to ensure data is accessible in the new version.

## Prerequisites

Before upgrading to ServiceControl version 6, ensure all ServiceControl instances have first been upgraded to version 5.11.0.

## Container changes

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:

1. The [required volume mount location](/servicecontrol/ravendb/containers.md#required-settings) must be changed:
* Version 5: `/opt/RavenDB/Server/RavenData`
* Version 6: `/var/lib/ravendb/data`
* If the container mount path is not changed, the container will refuse to start.
2. On Linux hosts, the permissions for the data volume must be changed to user id 999.
* With access to the volume, this can be accomplished using the following command:
```bash
chown -R 999:999 /path/to/data/volume
```
* This is due to RavenDB version 6 running as a non-root user.
* Users running containers via Docker Desktop do not need to do this as Docker Desktop abstracts away group/owner permissions.
bording marked this conversation as resolved.
Show resolved Hide resolved

Keep in mind that the tag version of `servicecontrol-ravendb` must match the version of the other ServiceControl container images.

## Support for version 5

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).