File tree Expand file tree Collapse file tree 7 files changed +44
-4
lines changed
kubernetes/linera-validator Expand file tree Collapse file tree 7 files changed +44
-4
lines changed Original file line number Diff line number Diff 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
7474RUN mv \
7575 target/"$target" /"$build_folder" /linera \
Original file line number Diff line number Diff line change 44ORDINAL=" ${HOSTNAME##* -} "
55
66exec ./linera-server run \
7- --storage scylladb :tcp:scylla-client.scylla.svc.cluster.local:9042 \
7+ --storage dualrocksdbscylladb:/mnt/stateful_partition/kube-ephemeral-ssd/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
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33while true ; do
4- ./linera storage check-existence --storage " scylladb :tcp:scylla-client.scylla.svc.cluster.local:9042"
4+ ./linera storage check-existence --storage " dualrocksdbscylladb:/mnt/stateful_partition/kube-ephemeral-ssd/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:/mnt/stateful_partition/kube-ephemeral-ssd/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
Original file line number Diff line number Diff line change @@ -15,3 +15,24 @@ racks:
1515 requests :
1616 cpu : 1
1717 memory : 2Gi
18+ initContainers :
19+ - name : prepare-ssd
20+ image : busybox
21+ command : ["/bin/sh", "-c"]
22+ args :
23+ - |
24+ mkdir -p /mnt/stateful_partition/kube-ephemeral-ssd/scylla/data
25+ mkdir -p /mnt/stateful_partition/kube-ephemeral-ssd/scylla/commitlog
26+ mkdir -p /mnt/stateful_partition/kube-ephemeral-ssd/scylla/saved_caches
27+ chown -R 999:999 /mnt/stateful_partition/kube-ephemeral-ssd/scylla
28+ volumeMounts :
29+ - name : local-ssd
30+ mountPath : /mnt/stateful_partition/kube-ephemeral-ssd
31+ volumeMounts :
32+ - name : local-ssd
33+ mountPath : /mnt/stateful_partition/kube-ephemeral-ssd/scylla
34+ volumes :
35+ - name : local-ssd
36+ hostPath :
37+ path : /mnt/stateful_partition/kube-ephemeral-ssd/scylla
38+ type : DirectoryOrCreate
Original file line number Diff line number Diff line change @@ -6,3 +6,9 @@ metadata:
66data :
77 scylla.yaml : |
88 query_tombstone_page_limit: 200000
9+
10+ # Add storage locations pointing to local SSD
11+ data_file_directories:
12+ - /mnt/stateful_partition/kube-ephemeral-ssd/scylla/data
13+ commitlog_directory: /mnt/stateful_partition/kube-ephemeral-ssd/scylla/commitlog
14+ saved_caches_directory: /mnt/stateful_partition/kube-ephemeral-ssd/scylla/saved_caches
Original file line number Diff line number Diff line change 4545 - name : config
4646 mountPath : " /config"
4747 readOnly : true
48+ - name : linera-db
49+ mountPath : " /mnt/stateful_partition/kube-ephemeral-ssd/linera.db"
4850 containers :
4951 - name : linera-server
5052 image : {{ .Values.lineraImage }}
5759 - name : config
5860 mountPath : " /config"
5961 readOnly : true
62+ - name : linera-db
63+ mountPath : " /mnt/stateful_partition/kube-ephemeral-ssd/linera.db"
6064 volumes :
6165 - name : config
6266 configMap :
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 }}
Original file line number Diff line number Diff line change 44lineraImage: {{ env "LINERA_HELMFILE_LINERA_IMAGE" | default "linera:latest" }}
55lineraImagePullPolicy: Never
66logLevel: "debug"
7+ rocksdbStorageSize: 2Gi
78proxyPort: 19100
89metricsPort: 21100
910numShards: {{ env "LINERA_HELMFILE_SET_NUM_SHARDS" | default 10 }}
You can’t perform that action at this time.
0 commit comments