Skip to content

Commit 79e0b12

Browse files
committed
[test] Use dual store in deployment
1 parent 5e7a71d commit 79e0b12

File tree

7 files changed

+20
-7
lines changed

7 files changed

+20
-7
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ RUN cargo build ${build_flag:+"$build_flag"} \
6969
--bin linera \
7070
--bin linera-proxy \
7171
--bin linera-server \
72-
--features scylladb,metrics
72+
--features scylladb,rocksdb,metrics
7373

7474
RUN mv \
7575
target/"$target"/"$build_folder"/linera \

docker/server-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ storage_replication_factor=$1
66
ORDINAL="${HOSTNAME##*-}"
77

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

docker/server-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
storage_replication_factor=$1
44
while true; do
5-
./linera storage check-existence --storage "scylladb:tcp:scylla-client.scylla.svc.cluster.local:9042"
5+
./linera storage check-existence --storage "dualrocksdbscylladb:/rocksdb/linera.db:spawn_blocking:tcp:scylla-client.scylla.svc.cluster.local:9042"
66
status=$?
77

88
if [ $status -eq 0 ]; then
@@ -11,7 +11,7 @@ while true; do
1111
elif [ $status -eq 1 ]; then
1212
echo "Database does not exist, attempting to initialize..."
1313
if ./linera-server initialize \
14-
--storage scylladb:tcp:scylla-client.scylla.svc.cluster.local:9042 \
14+
--storage dualrocksdbscylladb:/rocksdb/linera.db:spawn_blocking:tcp:scylla-client.scylla.svc.cluster.local:9042 \
1515
--genesis /config/genesis.json \
1616
--storage-replication-factor $storage_replication_factor; then
1717
echo "Initialization successful."

kubernetes/linera-validator/helmfile.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ releases:
6969
set:
7070
- name: crds.enabled
7171
value: "true"
72-

kubernetes/linera-validator/scylla-manager.values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ controllerResources:
99
memory: 200Mi
1010

1111
scylla:
12-
developerMode: true
1312
scyllaImage:
1413
tag: 5.4.3
1514
agentImage:
1615
tag: 3.2.8
17-
datacenter: manager-dc
16+
datacenter: validator
1817
racks:
1918
- name: manager-rack
2019
members: 1
2120
storage:
21+
storageClassName: nvme-ssd-block
2222
capacity: 5Gi
2323
resources:
2424
limits:

kubernetes/linera-validator/templates/shards.yaml

Lines changed: 13 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: "/rocksdb/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: "/rocksdb/linera.db"
6064
volumes:
6165
- name: config
6266
configMap:
@@ -66,3 +70,12 @@ 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+
storageClassName: nvme-ssd-block
79+
resources:
80+
requests:
81+
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)