Skip to content

Commit dbf7d61

Browse files
committed
Merge branch 'main' into add-language-dropdown-for-3.13-and-later
2 parents bffa148 + 5681dc8 commit dbf7d61

File tree

165 files changed

+1988
-1134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+1988
-1134
lines changed

docs/configurations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Select a database to see the configurations available for each storage.
101101
If you're using SQLite3 as a JDBC database, you must set `scalar.db.contact_points` as follows:
102102

103103
```properties
104-
scalar.db.contact_points=jdbc:sqlite:<YOUR_DB>.sqlite3?busy_timeout=10000
104+
scalar.db.contact_points=jdbc:sqlite:<SQLITE_DB_FILE_PATH>?busy_timeout=10000
105105
```
106106

107107
Unlike other JDBC databases, [SQLite3 doesn't fully support concurrent access](https://www.sqlite.org/lang_transaction.html). To avoid frequent errors caused internally by [`SQLITE_BUSY`](https://www.sqlite.org/rescode.html#busy), setting a [`busy_timeout`](https://www.sqlite.org/c3ref/busy_timeout.html) parameter is recommended.

docs/design.mdx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,35 @@ tags:
55
- Enterprise Premium
66
---
77

8-
# ScalarDB Design Document
8+
# ScalarDB Design
99

10-
For details about the design and implementation of ScalarDB, please see the following documents, which we presented at the VLDB 2023 conference:
10+
This document briefly explains the design and implementation of ScalarDB. For what ScalarDB is and its use cases, see [ScalarDB Overview](./overview.mdx).
11+
12+
## Overall architecture
13+
14+
ScalarDB is hybrid transaction/analytical processing (HTAP) middleware that sits in between applications and databases. As shown in the following figure, ScalarDB consists of three components: Core, Cluster, and Analytics. ScalarDB basically employs a layered architecture, so the Cluster and Analytics components use the Core component to interact with underlying databases but sometimes bypass the Core component for performance optimization without sacrificing correctness. Likewise, each component also consists of several layers.
15+
16+
![ScalarDB architecture](images/scalardb-architecture.png)
17+
18+
## Components
19+
20+
The following subsections explain each component one by one.
21+
22+
### Core
23+
24+
ScalarDB Core, which is provided as open-source software under the Apache 2 License, is an integral part of ScalarDB. Core provides a database manager that has an abstraction layer that abstracts underlying databases and adapters (or shims) that implement the abstraction for each database. In addition, it provides a transaction manager on top of the database abstraction that achieves database-agnostic transaction management based on Scalar's novel distributed transaction protocol called Consensus Commit. Core is provided as a library that offers a simple CRUD interface.
25+
26+
### Cluster
27+
28+
ScalarDB Cluster, which is licensed under a commercial license, is a component that provides a clustering solution for the Core component to work as a clustered server. Cluster is mainly designed for OLTP workloads, which have many small, transactional and non-transactional reads and writes. In addition, it provides several enterprise features such as authentication, authorization, encryption at rest, and fine-grained access control (still under development). Not only does Cluster offer the same CRUD interface as the Core component, but it also offers SQL and GraphQL interfaces. Since Cluster is provided as a container in a Kubernetes Pod, you can increase performance and availability by having more containers.
29+
30+
### Analytics
31+
32+
ScalarDB Analytics, which is licensed under a commercial license, is a component that provides scalable analytical processing for the data managed by the Core component or managed by applications that don’t use ScalarDB. Analytics is mainly designed for OLAP workloads, which have a small number of large, analytical read queries. In addition, it offers a SQL and DataSet API through Spark. Since the Analytics component is provided as a Java package that can be installed on Apache Spark engines, you can increase performance by having more Spark worker nodes.
33+
34+
## See also
35+
36+
For details about the design and implementation of ScalarDB, see the following documents, which were presented at the VLDB 2023 conference:
1137

1238
- **Speakerdeck presentation:** [ScalarDB: Universal Transaction Manager for Polystores](https://speakerdeck.com/scalar/scalardb-universal-transaction-manager-for-polystores-vldb23)
1339
- **Detailed paper:** [ScalarDB: Universal Transaction Manager for Polystores](https://www.vldb.org/pvldb/vol16/p3768-yamada.pdf)

docs/getting-started-with-scalardb-by-using-kotlin.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ The electronic money application is simplified for this tutorial and isn't suita
2020

2121
## Prerequisites for this sample application
2222

23-
Because ScalarDB is written in Java, you must have one of the following Java Development Kits (JDKs) installed in your environment:
24-
25-
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) 8
26-
- OpenJDK 8 from [Eclipse Temurin](https://adoptium.net/temurin/releases/), [Amazon Corretto](https://aws.amazon.com/corretto/), or [Microsoft](https://learn.microsoft.com/en-us/java/openjdk/download)
23+
- OpenJDK LTS version (8, 11, 17, or 21) from [Eclipse Temurin](https://adoptium.net/temurin/releases/)
24+
- [Docker](https://www.docker.com/get-started/) 20.10 or later with [Docker Compose](https://docs.docker.com/compose/install/) V2 or later
2725

2826
:::note
2927

30-
This sample application only works with Java 8. However, ScalarDB itself works with Java LTS versions, which means that you can use Java LTS versions for your application that uses ScalarDB. For details on the requirements of ScalarDB, such as which Java versions can be used, see [Requirements](./requirements.mdx).
28+
This sample application has been tested with OpenJDK from Eclipse Temurin. ScalarDB itself, however, has been tested with JDK distributions from various vendors. For details about the requirements for ScalarDB, including compatible JDK distributions, please see [Requirements](./requirements.mdx).
3129

3230
:::
3331

34-
In addition, since you'll be using Docker Compose to run the databases, you must have [Docker](https://www.docker.com/get-started/) 20.10 or later with [Docker Compose](https://docs.docker.com/compose/install/) V2 or later installed.
35-
3632
## Clone the ScalarDB samples repository
3733

3834
Open **Terminal**, then clone the ScalarDB samples repository by running the following command:

docs/getting-started-with-scalardb.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ Since the focus of the sample application is to demonstrate using ScalarDB, appl
2020

2121
## Prerequisites for this sample application
2222

23-
Because ScalarDB is written in Java, you must have one of the following Java Development Kits (JDKs) installed in your environment:
24-
25-
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) 8
26-
- OpenJDK 8 from [Eclipse Temurin](https://adoptium.net/temurin/releases/), [Amazon Corretto](https://aws.amazon.com/corretto/), or [Microsoft](https://learn.microsoft.com/en-us/java/openjdk/download)
23+
- OpenJDK LTS version (8, 11, 17, or 21) from [Eclipse Temurin](https://adoptium.net/temurin/releases/)
24+
- [Docker](https://www.docker.com/get-started/) 20.10 or later with [Docker Compose](https://docs.docker.com/compose/install/) V2 or later
2725

2826
:::note
2927

30-
This sample application only works with Java 8. However, ScalarDB itself works with Java LTS versions, which means that you can use Java LTS versions for your application that uses ScalarDB. For details on the requirements of ScalarDB, such as which Java versions can be used, see [Requirements](./requirements.mdx).
28+
This sample application has been tested with OpenJDK from Eclipse Temurin. ScalarDB itself, however, has been tested with JDK distributions from various vendors. For details about the requirements for ScalarDB, including compatible JDK distributions, please see [Requirements](./requirements.mdx).
3129

3230
:::
3331

34-
In addition, since you'll be using Docker Compose to run the databases, you must have [Docker](https://www.docker.com/get-started/) 20.10 or later with [Docker Compose](https://docs.docker.com/compose/install/) V2 or later installed.
35-
3632
## Clone the ScalarDB samples repository
3733

3834
Open **Terminal**, then clone the ScalarDB samples repository by running the following command:

docs/helm-charts/configure-custom-values-scalardb-cluster.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,3 +373,46 @@ scalardbCluster:
373373
operator: Equal
374374
value: scalardb-cluster
375375
```
376+
377+
### Encryption configurations (optional based on your environment)
378+
379+
You can enable [encryption at rest](https://scalardb.scalar-labs.com/docs/latest/scalardb-cluster/encrypt-data-at-rest/) to protect the data in the backend databases. When you use the encryption feature, you have the following two deployment options:
380+
381+
1. Use HashiCorp Vault (HashiCorp Cloud Platform (HCP) Vault Dedicated) to manage and store the DEKs.
382+
1. Use ScalarDB Cluster to manage the DEK, and store it in Kubernetes Secrets.
383+
384+
#### Use HashiCorp Vault
385+
386+
You can use HashiCorp Vault (HCP Vault Dedicated) to encrypt data as follows, replacing the contents in the angle brackets as described:
387+
388+
```yaml
389+
scalardbCluster:
390+
scalardbClusterNodeProperties: |
391+
...(omit)...
392+
scalar.db.cluster.encryption.enabled=true
393+
scalar.db.cluster.encryption.type=vault
394+
scalar.db.cluster.encryption.vault.address=https://<FQDN_OR_IP_OF_VAULT_SERVER>:<PORT_OF_VAULT_SERVER>
395+
scalar.db.cluster.encryption.vault.token=<TOKEN_OF_VAULT>
396+
scalar.db.cluster.encryption.vault.transit_secrets_engine_path=<PATH_TO_TRANSIT_OF_VAULT>
397+
encryption:
398+
enabled: true
399+
type: "vault"
400+
```
401+
402+
#### Use ScalarDB Cluster and Kubernetes Secrets
403+
404+
You can use ScalarDB Cluster and Kubernetes Secrets to encrypt data as follows, replacing the contents in the angle brackets as described:
405+
406+
```yaml
407+
scalardbCluster:
408+
scalardbClusterNodeProperties: |
409+
...(omit)...
410+
scalar.db.cluster.encryption.enabled=true
411+
scalar.db.cluster.encryption.type=self
412+
scalar.db.cluster.encryption.self.kubernetes.secret.namespace_name=${env:SCALAR_DB_CLUSTER_ENCRYPTION_SELF_KUBERNETES_SECRET_NAMESPACE_NAME}
413+
encryption:
414+
enabled: true
415+
type: "self"
416+
```
417+
418+
In this case, you don't need to replace `${env:SCALAR_DB_CLUSTER_ENCRYPTION_SELF_KUBERNETES_SECRET_NAMESPACE_NAME}` since the Helm Chart for ScalarDB Cluster automatically sets the namespace information as an environment variable. Because of this, you can keep the value `${env:SCALAR_DB_CLUSTER_ENCRYPTION_SELF_KUBERNETES_SECRET_NAMESPACE_NAME}` as is.

docs/helm-charts/getting-started-scalar-manager.mdx

Lines changed: 107 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@ tags:
33
- Enterprise Option
44
---
55

6-
# Getting Started with Helm Charts (Scalar Manager)
6+
# Deploy Scalar Manager
77

8-
Scalar Manager is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to:
8+
import Tabs from '@theme/Tabs';
9+
import TabItem from '@theme/TabItem';
910

10-
* Check the availability of ScalarDB or ScalarDL.
11-
* Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL.
12-
* Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards.
11+
[Scalar Manager](../scalar-manager/overview.mdx) is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to:
1312

14-
For more details, refer to [Scalar Manager Overview](../scalar-manager/overview.mdx).
13+
- Check the availability of ScalarDB or ScalarDL.
14+
- Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL.
15+
- Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards.
1516

16-
This guide will show you how to deploy and access Scalar Manager on a Kubernetes cluster.
17+
This guide explains how to deploy and access Scalar Manager on a Kubernetes cluster by using Scalar Helm Charts.
1718

18-
## Assumption
19+
## Prerequisites
1920

20-
This guide assumes that you are aware of how to deploy ScalarDB or ScalarDL with the [monitoring](getting-started-monitoring.mdx) and [logging](getting-started-logging.mdx) tools to a Kubernetes cluster.
21+
Before you deploy Scalar Manager, you must do the following:
2122

22-
## Requirement
23+
- Install the tools mentioned in [Getting Started with Scalar Helm Charts](getting-started-scalar-helm-charts.mdx).
24+
- Deploy `kube-prometheus-stack` according to the instructions in [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx).
25+
- Deploy `loki-stack` according to the instructions in [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx).
2326

24-
* You must deploy `kube-prometheus-stack` according to the instructions in [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx).
25-
* You must deploy `loki-stack` according to the instructions in [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx).
27+
## Deployment architecture diagram
2628

27-
## What we create
28-
29-
We will deploy the following components on a Kubernetes cluster as follows.
29+
The following is an architecture diagram for the components deployed in a Kubernetes cluster.
3030

3131
```
3232
+--------------------------------------------------------------------------------------------------+
@@ -60,94 +60,129 @@ We will deploy the following components on a Kubernetes cluster as follows.
6060
| | | Kubernetes |
6161
+----+-----------------------+---------------------------------------------------------------------+
6262
| |
63-
expose to localhost (127.0.0.1) or use load balancer etc to access
63+
Expose the environment to localhost (127.0.0.1) or use a load balancer to access it
6464
| |
65-
(Access Dashboard through HTTP)
65+
(Access the dashboard through HTTP)
6666
| |
6767
+----+----+ +----+----+
6868
| Browser | <-(Embed)-- + Browser |
6969
+---------+ +---------+
7070
```
7171

72-
## Step 1. Upgrade the `kube-prometheus-stack` to allow Grafana to be embedded
72+
## Step 1. Start minikube
73+
74+
Open **Terminal**, and start minikube by running the following command:
75+
76+
```console
77+
minikube start
78+
```
79+
80+
## Step 2. Upgrade the `kube-prometheus-stack` to allow Grafana to be embedded
81+
82+
In your custom values file for `kube-prometheus-stack` (for example, `scalar-prometheus-custom-values.yaml`), add the following configurations or revise them if they already exist:
83+
84+
```yaml
85+
kubeStateMetrics:
86+
enabled: true
87+
88+
nodeExporter:
89+
enabled: true
90+
91+
kubelet:
92+
enabled: true
93+
94+
grafana:
95+
grafana.ini:
96+
users:
97+
default_theme: light
98+
security:
99+
allow_embedding: true
100+
auth.anonymous:
101+
enabled: true
102+
org_name: "Main Org."
103+
org_role: Editor
104+
```
105+
106+
Then, upgrade the Helm installation by running the following command:
107+
108+
```console
109+
helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml
110+
```
111+
112+
## Step 3. Set environment variables
73113

74-
1. Add or revise this value to the custom values file (e.g. scalar-prometheus-custom-values.yaml) of the `kube-prometheus-stack`
75-
```yaml
76-
kubeStateMetrics:
77-
enabled: true
78-
nodeExporter:
79-
enabled: true
80-
kubelet:
81-
enabled: true
82-
grafana:
83-
grafana.ini:
84-
users:
85-
default_theme: light
86-
security:
87-
allow_embedding: true
88-
auth.anonymous:
89-
enabled: true
90-
org_name: "Main Org."
91-
org_role: Editor
92-
```
114+
Set environment variables for Scalar Manager by running the following commands, replacing the contents in angle brackets as described:
93115

94-
1. Upgrade the Helm installation
95-
```console
96-
helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml
97-
```
116+
```console
117+
SCALAR_MANAGER_RELEASE_NAME=<ADD_RELEASE_NAME>
118+
SCALAR_MANAGER_NAMESPACE=<ADD_NAMESPACE>
119+
SCALAR_MANAGER_CUSTOM_VALUES_FILE=<ADD_PATH_TO_CUSTOM_VALUES_FILE>
120+
SCALAR_MANAGER_CHART_VERSION=<ADD_CHART_VERSION>
121+
```
98122

99-
## Step 2. Prepare a custom values file for Scalar Manager
123+
## Step 4. Prepare a custom values file for Scalar Manager
100124

101-
1. Create an empty .yaml file named `scalar-manager-custom-values.yaml` for `scalar-manager`.
125+
Prepare a custom values file for Scalar Manager by doing the following:
102126

103-
1. Set the service type to access Scalar Manager. The default value is `ClusterIP`, but if we access using the `minikube tunnel` command or some load balancer, we can set it as `LoadBalancer`.
104-
```yaml
105-
service:
106-
type: LoadBalancer
107-
port: 8000
108-
```
127+
1. Create an empty file named `scalar-manager-custom-values.yaml`.
128+
1. Follow the instructions in [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx).
109129

110-
## Step 3. Deploy `scalar-manager`
130+
## Step 5. Install and deploy `scalar-manager`
111131

112-
1. Deploy the `scalar-manager` Helm Chart.
113-
```console
114-
helm install scalar-manager scalar-labs/scalar-manager -f scalar-manager-custom-values.yaml
115-
```
132+
Install and deploy the `scalar-manager` Helm Chart by running the following command:
116133

117-
## Step 4. Access Scalar Manager
134+
```console
135+
helm install ${SCALAR_MANAGER_RELEASE_NAME} scalar-labs/scalar-manager -n ${SCALAR_MANAGER_NAMESPACE} -f ${SCALAR_MANAGER_CUSTOM_VALUES_FILE} --version ${SCALAR_MANAGER_CHART_VERSION}
136+
```
118137

119-
### If you use minikube
138+
## Step 6. Access Scalar Manager
120139

121-
1. To expose Scalar Manager's service resource as your `localhost (127.0.0.1)`, open another terminal, and run the `minikube tunnel` command.
122-
```console
123-
minikube tunnel
124-
```
140+
How you access Scalar Manager depends on the tool that you're using for Kubernetes clusters.
125141

126-
1. Open the browser with URL `http://localhost:8000`
142+
<Tabs groupId="kubernetes-tools" queryString>
143+
<TabItem value="minikube" label="minikube" default>
144+
To expose Scalar Manager's service resource as your localhost (127.0.0.1), open another terminal, and run the `minikube tunnel` command.
127145

128-
### If you use other Kubernetes than minikube
146+
```console
147+
minikube tunnel
148+
```
129149

130-
If you're using a Kubernetes cluster other than minikube, you'll need to access the `LoadBalancer` service according to the manner of each Kubernetes cluster. For example, you'll need to use a load balancer provided by your cloud services provider or use the `kubectl port-forward` command.
150+
Then, access Scalar Manager by going to http://localhost:8000.
151+
</TabItem>
152+
<TabItem value="other-kubernetes-clustering-tools" label="Other Kubernetes clustering tools">
153+
If you're using a Kubernetes cluster other than minikube, you'll need to access the `LoadBalancer` service according to the manner of each Kubernetes cluster. For example, you'll need to use a load balancer provided by your cloud services provider or use the `kubectl port-forward` command.
131154

132155
:::note
133156

134-
Scalar Manager will try to detect the external IP of Grafana and then embed Grafana based on the IP. Therefore, you must configure the Grafana service type as `LoadBalancer`, and the external IP must be accessible from your browser.
157+
Scalar Manager will try to detect the external IP address for Grafana and then embed Grafana based on that IP address. Therefore, you must configure the Grafana service type as `LoadBalancer`, and the external IP address must be accessible from your browser.
135158

136159
:::
137-
138-
## Step 5. Delete Scalar Manager
139-
1. Uninstall `scalar-manager`
140-
```console
141-
helm uninstall scalar-manager
142-
```
160+
</TabItem>
161+
</Tabs>
143162

144163
## Additional details
145164

146165
This section provides additional details related to configurations and resource discovery.
147166

148-
### Configurations
167+
### Upgrade the Scalar Manager deployment
168+
169+
To upgrade the deployment of Scalar Manager, run the following command:
170+
171+
```console
172+
helm upgrade ${SCALAR_MANAGER_RELEASE_NAME} scalar-labs/scalar-manager -n ${SCALAR_MANAGER_NAMESPACE} -f ${SCALAR_MANAGER_CUSTOM_VALUES_FILE} --version ${SCALAR_MANAGER_CHART_VERSION}
173+
```
174+
175+
### Uninstall Scalar Manager
176+
177+
To uninstall Scalar Manager, run the following command:
178+
179+
```console
180+
helm uninstall ${SCALAR_MANAGER_RELEASE_NAME} -n ${SCALAR_MANAGER_NAMESPACE}
181+
```
182+
183+
### Optional Scalar Manager configurations
149184

150-
You can see configurations for Scalar Manager in [Configure a custom values file for Scalar Manager](./configure-custom-values-scalar-manager.mdx)
185+
For optional configurations that you can set for Scalar Manager, see [Optional configurations](./configure-custom-values-scalar-manager.mdx#optional-configurations)
151186

152187
### Resource discovery
153188

0 commit comments

Comments
 (0)