Skip to content

Commit

Permalink
Merge pull request #128 from scalar-labs/add-updated-docs
Browse files Browse the repository at this point in the history
Add updated docs for ScalarDB Cluster
  • Loading branch information
josh-wong authored Jan 19, 2024
2 parents 64c5dc0 + fa402e1 commit f0f01fb
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ This tutorial describes how to use ScalarDB Cluster GraphQL.

## Prerequisites

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster).
This repository is available only to users with a commercial license and permission.
To get a license and permission, please [contact us](https://www.scalar-labs.com/contact/).
To get a license and permission, please [contact us](https://scalar-labs.com/contact_us/).

## Sample application

Expand Down Expand Up @@ -101,11 +100,11 @@ For details about the client modes, see [Developer Guide for ScalarDB Cluster wi

To load a schema via ScalarDB Cluster, you need to use the dedicated Schema Loader for ScalarDB Cluster (Schema Loader for Cluster).
Using the Schema Loader for Cluster is basically the same as using the [Schema Loader for ScalarDB](https://github.com/scalar-labs/scalardb/blob/master/docs/schema-loader.md) except the name of the JAR file is different.
You can download the Schema Loader for Cluster at [Releases](https://github.com/scalar-labs/scalardb-cluster/releases/tag/v3.10.1).
You can download the Schema Loader for Cluster at [Releases](https://github.com/scalar-labs/scalardb-cluster/releases/tag/v3.10.2).
After downloading the JAR file, you can run the Schema Loader for Cluster with the following command:

```shell
$ java -jar scalardb-cluster-schema-loader-3.10.1-all.jar --config database.properties -f schema.json --coordinator
$ java -jar scalardb-cluster-schema-loader-3.10.2-all.jar --config database.properties -f schema.json --coordinator
```

## Step 4. Run operations from GraphiQL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ You'll be using the same sample application as found in the [ScalarDB SQL (JDBC)
- Java (OpenJDK 8 or higher)
- Gradle

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster), [packages in the ScalarDB Cluster repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-cluster), and [packages in the ScalarDB SQL repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-sql).
These repositories are available only to users with a commercial license and permission.
To get a license and permission, please [contact us](https://www.scalar-labs.com/contact/).
To get a license and permission, please [contact us](https://scalar-labs.com/contact_us/).

You also need to set the `gpr.user` property to your GitHub username and the `gpr.key` property to your personal access token.
To do so, you must either add these properties in `~/.gradle/gradle.properties` or specify the properties by using the `-P` option when running the `./gradlew` command as follows:
Expand Down Expand Up @@ -90,13 +89,13 @@ repositories {
}
```

Then, delete the existing dependency for `com.scalar-labs:scalardb-sql-direct-mode:3.10.1` from the `dependencies` section, and add the following dependency to the `dependencies` section:
Then, delete the existing dependency for `com.scalar-labs:scalardb-sql-direct-mode:3.10.2` from the `dependencies` section, and add the following dependency to the `dependencies` section:

```gradle
dependencies {
...
implementation 'com.scalar-labs:scalardb-cluster-client:3.10.1'
implementation 'com.scalar-labs:scalardb-cluster-client:3.10.2'
}
```

Expand Down Expand Up @@ -134,11 +133,11 @@ For details about the client modes, see [Developer Guide for ScalarDB Cluster wi

To load a schema via ScalarDB Cluster SQL, you need to use the dedicated SQL CLI for ScalarDB Cluster (SQL CLI for Cluster).
Using the SQL CLI for Cluster is basically the same as using the [ScalarDB SQL Command Line Interface](https://github.com/scalar-labs/scalardb-sql/blob/main/docs/command-line-interface.md) except the name of the JAR file is different.
You can download the SQL CLI for Cluster from [Releases](https://github.com/scalar-labs/scalardb-cluster/releases/tag/v3.10.1).
You can download the SQL CLI for Cluster from [Releases](https://github.com/scalar-labs/scalardb-cluster/releases/tag/v3.10.2).
After downloading the JAR file, you can use SQL CLI for Cluster by running the following command:

```shell
$ java -jar scalardb-cluster-sql-cli-3.10.1-all.jar --config scalardb-sql.properties --file schema.sql
$ java -jar scalardb-cluster-sql-cli-3.10.2-all.jar --config scalardb-sql.properties --file schema.sql
```

## Step 5. Load the initial data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ You'll be using the same sample application as found in the [Sample application
- Java (OpenJDK 8 or higher)
- Gradle

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster), [packages in the ScalarDB Cluster repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-cluster), and [packages in the ScalarDB SQL repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-sql).
These repositories are available only to users with a commercial license and permission.
To get a license and permission, please [contact us](https://www.scalar-labs.com/contact/).
To get a license and permission, please [contact us](https://scalar-labs.com/contact_us/).

You also need to set the `gpr.user` property to your GitHub username and the `gpr.key` property to your personal access token.
To do so, you must either add these properties in `~/.gradle/gradle.properties` or specify the properties by using the `-P` option when running the `./gradlew` command as follows:
Expand Down Expand Up @@ -90,13 +89,13 @@ repositories {
}
```

Then, delete the existing dependency for `com.scalar-labs:scalardb-sql-direct-mode:3.10.1` from the `dependencies` section, and add the following dependency to the `dependencies` section:
Then, delete the existing dependency for `com.scalar-labs:scalardb-sql-direct-mode:3.10.2` from the `dependencies` section, and add the following dependency to the `dependencies` section:

```gradle
dependencies {
...
implementation 'com.scalar-labs:scalardb-cluster-client:3.10.1'
implementation 'com.scalar-labs:scalardb-cluster-client:3.10.2'
}
```

Expand Down Expand Up @@ -134,11 +133,11 @@ For details about the client modes, see [Developer Guide for ScalarDB Cluster wi

To load a schema via ScalarDB Cluster SQL, you need to use the dedicated SQL CLI for ScalarDB Cluster (SQL CLI for Cluster).
Using the SQL CLI for Cluster is basically the same as using the [ScalarDB SQL Command Line Interface](https://github.com/scalar-labs/scalardb-sql/blob/main/docs/command-line-interface.md) except the name of the JAR file is different.
You can download the SQL CLI for Cluster from [Releases](https://github.com/scalar-labs/scalardb-cluster/releases/tag/v3.10.1).
You can download the SQL CLI for Cluster from [Releases](https://github.com/scalar-labs/scalardb-cluster/releases/tag/v3.10.2).
After downloading the JAR file, you can run SQL CLI for Cluster with the following command:

```shell
$ java -jar scalardb-cluster-sql-cli-3.10.1-all.jar --config scalardb-sql.properties --file schema.sql
$ java -jar scalardb-cluster-sql-cli-3.10.2-all.jar --config scalardb-sql.properties --file schema.sql
```

## Step 5. Modify `application.properties`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ This document explains how to write gRPC client code for ScalarDB Cluster by usi
- ScalarDB Cluster 3.9.0 or later
- Go: any one of the three latest major releases

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster).
This repository is available only to users with a commercial license and permission.
To get a license and permission, please [contact us](https://www.scalar-labs.com/contact/).
To get a license and permission, please [contact us](https://scalar-labs.com/contact_us/).

## Sample application

Expand Down Expand Up @@ -71,7 +70,7 @@ For details about the client modes, see [Developer Guide for ScalarDB Cluster wi
To load a schema via ScalarDB Cluster, you need to use the dedicated Schema Loader for ScalarDB Cluster (Schema Loader for Cluster). Using the Schema Loader for Cluster is basically the same as using the [Schema Loader for ScalarDB](https://github.com/scalar-labs/scalardb/blob/master/docs/schema-loader.md) except the name of the JAR file is different. You can download the Schema Loader for Cluster at [Releases](https://github.com/scalar-labs/scalardb-cluster/releases). After downloading the JAR file, you can run the Schema Loader for Cluster with the following command:

```shell
$ java -jar scalardb-cluster-schema-loader-3.10.1-all.jar --config database.properties -f schema.json --coordinator
$ java -jar scalardb-cluster-schema-loader-3.10.2-all.jar --config database.properties -f schema.json --coordinator
```

## Step 4. Set up a Go environment
Expand All @@ -92,7 +91,7 @@ First, in a new working directory, create a directory named `scalardb-cluster`,
$ mkdir scalardb-cluster
```

Then, download the [`scalardb-cluster.proto`](https://github.com/scalar-labs/scalardb-cluster/blob/v3.10.1/rpc/src/main/proto/scalardb-cluster.proto) file and save it in the directory that you created.
Then, download the [`scalardb-cluster.proto`](https://github.com/scalar-labs/scalardb-cluster/blob/v3.10.2/rpc/src/main/proto/scalardb-cluster.proto) file and save it in the directory that you created.

Generate the gRPC code by running the following command:

Expand All @@ -110,7 +109,6 @@ After running the command, you should see two files in the `scalardb-cluster` su

The following is the program that uses the gRPC code. Save it as `main.go` in the working directory. This program does the same thing as the `ElectronicMoney.java` program in [Getting Started with ScalarDB](https://scalardb.scalar-labs.com/docs/latest/getting-started-with-scalardb/). Note that you have to update the value of `SERVER_ADDRESS` based on the `EXTERNAL-IP` value of the ScalarDB Cluster `LoadBalancer` service in your environment.

{% raw %}
```go
package main

Expand Down Expand Up @@ -360,7 +358,6 @@ func printUsageAndExit() {
os.Exit(1)
}
```
{% endraw %}

After creating the `main.go` file, you need to create the `go.mod` file by running the following commands:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ This document explains how to write gRPC client code for ScalarDB Cluster by usi
- ScalarDB Cluster 3.9.0 or later
- Python 3.7 or later

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster).
This repository is available only to users with a commercial license and permission.
To get a license and permission, please [contact us](https://www.scalar-labs.com/contact/).
To get a license and permission, please [contact us](https://scalar-labs.com/contact_us/).

## Sample application

Expand Down Expand Up @@ -71,7 +70,7 @@ For details about the client modes, see [Developer Guide for ScalarDB Cluster wi
To load a schema via ScalarDB Cluster, you need to use the dedicated Schema Loader for ScalarDB Cluster (Schema Loader for Cluster). Using the Schema Loader for Cluster is basically the same as using the [Schema Loader for ScalarDB](https://github.com/scalar-labs/scalardb/blob/master/docs/schema-loader.md) except the name of the JAR file is different. You can download the Schema Loader for Cluster at [Releases](https://github.com/scalar-labs/scalardb-cluster/releases). After downloading the JAR file, you can run the Schema Loader for Cluster with the following command:

```shell
$ java -jar scalardb-cluster-schema-loader-3.10.1-all.jar --config database.properties -f schema.json --coordinator
$ java -jar scalardb-cluster-schema-loader-3.10.2-all.jar --config database.properties -f schema.json --coordinator
```

## Step 4. Set up a Python environment
Expand All @@ -95,7 +94,7 @@ $ pip install grpcio grpcio-tools

To communicate with the gRPC server for ScalarDB Cluster, you will need to generate the stub code from the proto file.

First, download the [`scalardb-cluster.proto`](https://github.com/scalar-labs/scalardb-cluster/blob/v3.10.1/rpc/src/main/proto/scalardb-cluster.proto) file, then save it in the working directory.
First, download the [`scalardb-cluster.proto`](https://github.com/scalar-labs/scalardb-cluster/blob/v3.10.2/rpc/src/main/proto/scalardb-cluster.proto) file, then save it in the working directory.

You can generate the stub code by running the following command:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ This tutorial describes how to use ScalarDB Cluster GraphQL.

## Prerequisites

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster).
This repository is available only to users with a commercial license and permission.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ You'll be using the same sample application as found in the [ScalarDB SQL (JDBC)
- Java (OpenJDK 8 or higher)
- Gradle

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster), [packages in the ScalarDB Cluster repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-cluster), and [packages in the ScalarDB SQL repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-sql).
These repositories are available only to users with a commercial license and permission.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ You'll be using the same sample application as found in the [Sample application
- Java (OpenJDK 8 or higher)
- Gradle

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster), [packages in the ScalarDB Cluster repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-cluster), and [packages in the ScalarDB SQL repository](https://github.com/orgs/scalar-labs/packages?repo_name=scalardb-sql).
These repositories are available only to users with a commercial license and permission.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ This document explains how to write gRPC client code for ScalarDB Cluster by usi
- ScalarDB Cluster 3.9.0 or later
- Go: any one of the three latest major releases

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster).
This repository is available only to users with a commercial license and permission.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ This document explains how to write gRPC client code for ScalarDB Cluster by usi
- ScalarDB Cluster 3.9.0 or later
- Python 3.7 or later

In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster.
If you don't have ScalarDB Cluster set up, please follow the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).
In this tutorial, we assume that you have a ScalarDB Cluster running on a Kubernetes cluster that you deployed by following the instructions in [Set Up ScalarDB Cluster on Kubernetes by Using a Helm Chart](setup-scalardb-cluster-on-kubernetes-by-using-helm-chart.md).

In addition, you need access to the [ScalarDB Cluster GitHub repository](https://github.com/scalar-labs/scalardb-cluster).
This repository is available only to users with a commercial license and permission.
Expand Down
Loading

0 comments on commit f0f01fb

Please sign in to comment.