Skip to content

Commit 7a34c6b

Browse files
committed
[test] Use dual store in deployment
1 parent 89db7bd commit 7a34c6b

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN cargo build --release \
6363
--bin linera \
6464
--bin linera-proxy \
6565
--bin linera-server \
66-
--features scylladb,metrics
66+
--features scylladb,rocksdb,metrics
6767

6868
RUN mv \
6969
target/"$target"/release/linera \

docker/server-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ORDINAL="${HOSTNAME##*-}"
55

66
exec ./linera-server run \
7-
--storage scylladb:tcp:scylla-client.scylla.svc.cluster.local:9042 \
7+
--storage dualrocksdbscylladb:linera.db:spawn_blocking:tcp:scylla-client.scylla.svc.cluster.local:9042 \
88
--server /config/server.json \
99
--shard $ORDINAL \
1010
--genesis /config/genesis.json

docker/server-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
while true; do
4-
./linera storage check_existence --storage "scylladb:tcp:scylla-client.scylla.svc.cluster.local:9042"
4+
./linera storage check_existence --storage "dualrocksdbscylladb:linera.db:spawn_blocking:tcp:scylla-client.scylla.svc.cluster.local:9042"
55
status=$?
66

77
if [ $status -eq 0 ]; then
@@ -10,7 +10,7 @@ while true; do
1010
elif [ $status -eq 1 ]; then
1111
echo "Database does not exist, attempting to initialize..."
1212
if ./linera-server initialize \
13-
--storage scylladb:tcp:scylla-client.scylla.svc.cluster.local:9042 \
13+
--storage dualrocksdbscylladb:linera.db:spawn_blocking:tcp:scylla-client.scylla.svc.cluster.local:9042 \
1414
--genesis /config/genesis.json; then
1515
echo "Initialization successful."
1616
exit 0

kubernetes/linera-validator/templates/shards.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ spec:
4545
- name: config
4646
mountPath: "/config"
4747
readOnly: true
48+
- name: linera-db
49+
mountPath: "/linera.db"
4850
containers:
4951
- name: linera-server
5052
image: {{ .Values.lineraImage }}
@@ -57,6 +59,8 @@ spec:
5759
- name: config
5860
mountPath: "/config"
5961
readOnly: true
62+
- name: linera-db
63+
mountPath: "/linera.db"
6064
volumes:
6165
- name: config
6266
configMap:
@@ -66,3 +70,11 @@ spec:
6670
path: server.json
6771
- key: genesisConfig
6872
path: genesis.json
73+
volumeClaimTemplates:
74+
- metadata:
75+
name: linera-db
76+
spec:
77+
accessModes: ["ReadWriteOnce"]
78+
resources:
79+
requests:
80+
storage: {{ .Values.rocksdbStorageSize }}

kubernetes/linera-validator/values-local.yaml.gotmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
lineraImage: {{ env "LINERA_HELMFILE_LINERA_IMAGE" | default "linera:latest" }}
55
lineraImagePullPolicy: Never
66
logLevel: "debug"
7+
rocksdbStorageSize: 2Gi
78
proxyPort: 19100
89
metricsPort: 21100
910
numShards: {{ env "LINERA_HELMFILE_SET_NUM_SHARDS" | default 10 }}

0 commit comments

Comments
 (0)