Skip to content

Commit 7dde56b

Browse files
authored
Add TiDB and AlloyDB to ScalarDB core and ScalarDB Cluster samples (#86)
* Add TiDB and AlloyDB to ScalarDB core and ScalarDB Cluster sample * Apply AI agent comments
1 parent 717b295 commit 7dde56b

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

scalardb-cluster-standalone-mode/docker-compose.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ services:
6767
command: >
6868
/bin/sh -c "az storage container create --name 'test-container' --connection-string 'DefaultEndpointsProtocol=http;AccountName=test;AccountKey=test;BlobEndpoint=http://blobstorage-1:10000/test;'"
6969
70+
alloydb:
71+
image: google/alloydbomni:16
72+
container_name: "alloydb-1"
73+
ports:
74+
- "5433:5432"
75+
environment:
76+
POSTGRES_USER: postgres
77+
POSTGRES_PASSWORD: postgres
78+
POSTGRES_INITDB_ARGS: "--icu-locale=en-US-u-va-posix"
79+
7080
scalardb-cluster-node:
7181
image: ghcr.io/scalar-labs/scalardb-cluster-node-byol-premium:3.17.0
7282
container_name: "scalardb-cluster-node"

scalardb-cluster-standalone-mode/scalardb-cluster-node.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@
5252
# scalar.db.username=test
5353
# scalar.db.password=test
5454

55+
# For TiDB
56+
# scalar.db.storage=jdbc
57+
# scalar.db.contact_points=jdbc:mysql://host.docker.internal:4000/
58+
# scalar.db.username=root
59+
# scalar.db.password=
60+
61+
# For AlloyDB
62+
# scalar.db.storage=jdbc
63+
# scalar.db.contact_points=jdbc:postgresql://alloydb-1:5432/
64+
# scalar.db.username=postgres
65+
# scalar.db.password=postgres
66+
5567
# Standalone mode
5668
scalar.db.cluster.node.standalone_mode.enabled=true
5769

scalardb-sample/database.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,15 @@
4545
# scalar.db.contact_points=jdbc:db2://localhost:50000/sample
4646
# scalar.db.username=db2inst1
4747
# scalar.db.password=db2inst1
48+
49+
# For TiDB
50+
# scalar.db.storage=jdbc
51+
# scalar.db.contact_points=jdbc:mysql://localhost:4000/
52+
# scalar.db.username=root
53+
# scalar.db.password=
54+
55+
# For AlloyDB
56+
# scalar.db.storage=jdbc
57+
# scalar.db.contact_points=jdbc:postgresql://localhost:5432/
58+
# scalar.db.username=postgres
59+
# scalar.db.password=postgres

scalardb-sample/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,12 @@ services:
5151
ports:
5252
- "50000:50000"
5353
privileged: true
54+
alloydb:
55+
image: google/alloydbomni:16
56+
container_name: "alloydb-1"
57+
ports:
58+
- "5433:5432"
59+
environment:
60+
POSTGRES_USER: postgres
61+
POSTGRES_PASSWORD: postgres
62+
POSTGRES_INITDB_ARGS: "--icu-locale=en-US-u-va-posix"

0 commit comments

Comments
 (0)