Skip to content

Commit

Permalink
AUTO: Sync Kubernetes docs to ScalarDB Enterprise docs site repo (#579)
Browse files Browse the repository at this point in the history
Co-authored-by: josh-wong <[email protected]>
  • Loading branch information
github-actions[bot] and josh-wong authored Sep 17, 2024
1 parent cdd0bea commit 00256eb
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# How to Upgrade ScalarDB

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

This guide explains how to upgrade to a newer version of ScalarDB.

## Before you begin

Before you upgrade ScalarDB Cluster to a newer version, check the following rules to ensure compatibility between ScalarDB Cluster and the client SDKs.

:::note

Versions are expressed as `x.y.z`, where `x` represents the major version, `y` represents the minor version, and `z` represents the patch version. This format follows [Semantic Versioning](https://semver.org/).

:::

- If the **major** versions are different between ScalarDB Cluster and a client SDK, they are **not** compatible and are **not** supported.
- If the **major** versions are the same and the **minor** versions are different between ScalarDB Cluster and a client SDK, the version of ScalarDB Cluster must be greater than or equal to the client SDK version. For example:
- **Supported:** Combination of ScalarDB Cluster 3.13 and client SDK 3.11
- **Not supported:** Combination of ScalarDB Cluster 3.11 and client SDK 3.13
- If the **major** versions and the **minor** versions are the same, you can use different **patch** versions between ScalarDB Cluster and a client SDK. For example:
- **Supported:** Combination of ScalarDB Cluster 3.13.2 and client SDK 3.13.0
- **Supported:** Combination of ScalarDB Cluster 3.13.0 and client SDK 3.13.2

## Upgrade versions

To learn about upgrading your version of ScalarDB, select the type of upgrade you want to do.

<Tabs groupId="versions" queryString>
<TabItem value="upgrade-major-version" label="Upgrade to a major version" default>
Major versions do **not** keep backward compatibility. So, you might need to do special operations when you upgrade from one major version to another major version. For example:

- Update the database schema on the backend database side.
- Update the API in your application.

For details on what you need when you upgrade to a major version, please refer to the release notes for the major version that you want to upgrade to.
</TabItem>
<TabItem value="upgrade-minor-version" label="Upgrade to a minor version">
Minor versions keep backward compatibility. So, you can upgrade ScalarDB from one minor version to another minor version in the same major version without doing any special operations. For example, you don't need to update the database schema on the backend database side or update the API in your application.

<Tabs groupId="minor-versions" queryString>
<TabItem value="scalardb-cluster" label="ScalarDB Cluster (Enterprise Edition)" default>
If you use [Scalar Helm Chart](https://github.com/scalar-labs/helm-charts) to deploy ScalarDB Cluster, you can upgrade your ScalarDB Cluster deployment as follows:

1. Set the ScalarDB Cluster Helm Chart version as an environment variable. You can do this by running the following command to put the chart version into the environment variable `SCALAR_DB_CLUSTER_CHART_VERSION`:

```console
SCALAR_DB_CLUSTER_CHART_VERSION=1.5.0
```

:::tip

You can search for the chart version that corresponds to the ScalarDB Cluster version, run the following command:

```console
helm search repo scalar-labs/scalardb-cluster -l
```

The following command might be helpful, but please make sure to replace the contents in the angle brackets with your version of ScalarDB Cluster:

```console
SCALAR_DB_CLUSTER_VERSION=<MAJOR>.<MINOR>.<PATCH>; SCALAR_DB_CLUSTER_CHART_VERSION=$(helm search repo scalar-labs/scalardb-cluster -l | grep -F "${SCALAR_DB_CLUSTER_VERSION}" | awk '{print $2}' | sort --version-sort -r | head -n 1)
```

:::

1. Upgrade your ScalarDB Cluster deployment by replacing the contents in the angle brackets as described:

```console
helm upgrade <RELEASE_NAME> scalar-labs/scalardb-cluster -n <NAMESPACE> -f /<PATH_TO_YOUR_CUSTOM_VALUES_FILE_FOR_SCALARDB_CLUSTER> --version ${SCALAR_DB_CLUSTER_CHART_VERSION}
```

After you upgrade the ScalarDB Cluster deployment, you should consider upgrading the version of the [ScalarDB Cluster Java Client SDK](https://mvnrepository.com/artifact/com.scalar-labs/scalardb-cluster-java-client-sdk) or the [ScalarDB Cluster .NET Client SDK](https://www.nuget.org/packages/ScalarDB.Net.Client) on your application side.
</TabItem>
<TabItem value="scalardb-core" label="ScalarDB Core library (Community edition)">
ScalarDB Core is provided as a Java library. So, you can update the dependencies of your Java project and rebuild your application to upgrade ScalarDB versions.
</TabItem>
</Tabs>
</TabItem>
<TabItem value="upgrade-patch-version" label="Upgrade to a patch version">
Patch versions keep backward compatibility. So, you can upgrade ScalarDB from one patch version to another patch version in the same major version and minor version without doing any special operations. For example, you don't need to update the database schema on the backend database side or update the API in your application.

The method for upgrading to a patch version is the same as for upgrading to a minor version. For details on how to upgrade, see the [Upgrade to a minor version](?versions=upgrade-minor-version) tab.
</TabItem>
</Tabs>

:::warning

ScalarDB does **not** support downgrading to a previous version (major, minor, or patch). You can only upgrade to a newer version.

:::
108 changes: 108 additions & 0 deletions versioned_docs/version-3.10/scalar-kubernetes/HowToUpgradeScalarDL.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# How to Upgrade ScalarDL

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

This guide explains how to upgrade to a newer version of ScalarDL.

## Before you begin

Before you upgrade to a new version, check the [ScalarDL Compatibility Matrix](https://scalardl.scalar-labs.com/docs/latest/compatibility/) to ensure compatibility between ScalarDL and the client SDKs.

## Upgrade versions

To learn about upgrading your version of ScalarDL, select the type of upgrade you want to do.

<Tabs groupId="versions" queryString>
<TabItem value="upgrade-major-version" label="Upgrade to a major version" default>
Major versions do **not** keep backward compatibility. So, you might need to do special operations when you upgrade from one major version to another major version. For example:

- Update the database schema on the backend database side.
- Update the API in your application.

For details on what you need when you upgrade to a major version, please refer to the release notes for the major version that you want to upgrade to.
</TabItem>
<TabItem value="upgrade-minor-version" label="Upgrade to a minor version">
Minor versions keep backward compatibility. So, you can upgrade ScalarDL from one minor version to another minor version in the same major version without doing any special operations. For example, you don't need to update the database schema on the backend database side or update the API in your application.

<Tabs groupId="minor-versions" queryString>
<TabItem value="ScalarDL_Ledger" label="ScalarDL Ledger" default>
If you use [Scalar Helm Chart](https://github.com/scalar-labs/helm-charts) to deploy ScalarDL Ledger, you can upgrade your ScalarDL Ledger deployment as follows:

1. Set the ScalarDL Ledger Helm Chart version as an environment variable. You can do this by running the following command to put the chart version into the environment variable `SCALAR_DL_LEDGER_CHART_VERSION`:

```console
SCALAR_DL_LEDGER_CHART_VERSION=4.8.0
```

:::tip

You can search for the chart version that corresponds to the ScalarDL Ledger version as follows:

```console
helm search repo scalar-labs/scalardl -l
```

The following command might be helpful, but please make sure to replace the contents in the angle brackets with your version of ScalarDL Ledger:

```console
SCALAR_DL_VERSION=<MAJOR>.<MINOR>.<PATCH>; SCALAR_DL_LEDGER_CHART_VERSION=$(helm search repo scalar-labs/scalardl -l | grep -v -e "scalar-labs/scalardl-audit" | grep -F "${SCALAR_DL_VERSION}" | awk '{print $2}' | sort --version-sort -r | head -n 1)
```

:::

1. Upgrade your ScalarDL Ledger deployment by replacing the contents in the angle brackets as described:

```console
helm upgrade <RELEASE_NAME> scalar-labs/scalardl -n <NAMESPACE> -f /<PATH_TO_YOUR_CUSTOM_VALUES_FILE_FOR_SCALARDL_LEDGER> --version ${SCALAR_DL_LEDGER_CHART_VERSION}
```

After you upgrade the ScalarDL Ledger deployment (and the ScalarDL Auditor deployment if you use Auditor mode), you should consider upgrading the version of the [ScalarDL Java Client SDK](https://mvnrepository.com/artifact/com.scalar-labs/scalardl-java-client-sdk) on your application side.
</TabItem>
<TabItem value="ScalarDL_Auditor" label="ScalarDL Auditor">
If you use [Scalar Helm Chart](https://github.com/scalar-labs/helm-charts) to deploy ScalarDL Auditor, you can upgrade your ScalarDL Auditor deployment as follows:

1. Set the ScalarDL Auditor Helm Chart version as an environment variable. You can do this by running the following command to put the chart version into the environment variable `SCALAR_DL_AUDITOR_CHART_VERSION`:

```console
SCALAR_DL_AUDITOR_CHART_VERSION=2.8.0
```

:::tip

You can search for the chart version that corresponds to the ScalarDL Auditor version as follows:

```console
helm search repo scalar-labs/scalardl-audit -l
```

The following command might be helpful, but please make sure to replace the contents in the angle brackets with your version of ScalarDL Auditor:

```console
SCALAR_DL_VERSION=<MAJOR>.<MINOR>.<PATCH>; SCALAR_DL_AUDITOR_CHART_VERSION=$(helm search repo scalar-labs/scalardl-audit -l | grep -F "${SCALAR_DL_VERSION}" | awk '{print $2}' | sort --version-sort -r | head -n 1)
```

:::

1. Upgrade your ScalarDL Auditor deployment by replacing the contents in the angle brackets as described:

```console
helm upgrade <RELEASE_NAME> scalar-labs/scalardl-audit -n <NAMESPACE> -f /<PATH_TO_YOUR_CUSTOM_VALUES_FILE_FOR_SCALARDL_AUDITOR> --version ${SCALAR_DL_AUDITOR_CHART_VERSION}
```

After you upgrade the ScalarDL Auditor deployment and the ScalarDL Ledger deployment, you should consider upgrading the version of the [ScalarDL Java Client SDK](https://mvnrepository.com/artifact/com.scalar-labs/scalardl-java-client-sdk) on your application side.
</TabItem>
</Tabs>
</TabItem>
<TabItem value="upgrade-patch-version" label="Upgrade to a patch version">
Patch versions keep backward compatibility. So, you can upgrade ScalarDL from one patch version to another patch version in the same major version and minor version without doing any special operations. For example, you don't need to update the database schema on the backend database side or update the API in your application.

The method for upgrading to a patch version is the same as for upgrading to a minor version. For details on how to upgrade, see the [Upgrade to a minor version](?versions=upgrade-minor-version) tab.
</TabItem>
</Tabs>

:::warning

ScalarDL does **not** support downgrading to a previous version (major, minor, or patch). You can only upgrade to a newer version.

:::

0 comments on commit 00256eb

Please sign in to comment.