Skip to content

Commit

Permalink
Add nuraft log, persist logs, remove NodePort Service for coordinator…
Browse files Browse the repository at this point in the history
… mgmt server
  • Loading branch information
as51340 committed Jul 17, 2024
1 parent d85c5e2 commit 9d307a1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
# Run the mgconsole commands
echo "Running mgconsole commands..."
echo 'ADD COORDINATOR 2 WITH CONFIG {"bolt_server": "memgraph-coordinator-2.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-2.default.svc.cluster.local:30000", "coordinator_server": "memgraph-coordinator-2.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "memgraph-coordinator-3.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-3.default.svc.cluster.local:30000", "coordinator_server": "memgraph-coordinator-3.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'ADD COORDINATOR 2 WITH CONFIG {"bolt_server": "memgraph-coordinator-2.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-2.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-2.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "memgraph-coordinator-3.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-3.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-3.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'REGISTER INSTANCE instance_1 WITH CONFIG {"bolt_server": "memgraph-data-0.default.svc.cluster.local:7687", "management_server": "memgraph-data-0.default.svc.cluster.local:10000", "replication_server": "memgraph-data-0.default.svc.cluster.local:20000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'REGISTER INSTANCE instance_2 WITH CONFIG {"bolt_server": "memgraph-data-1.default.svc.cluster.local:7687", "management_server": "memgraph-data-1.default.svc.cluster.local:10000", "replication_server": "memgraph-data-1.default.svc.cluster.local:20000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'SET INSTANCE instance_1 TO MAIN;' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ spec:
requests:
storage: {{ $.Values.memgraph.coordinators.volumeClaim.storagePVCSize }}
{{- end }}

{{- if $.Values.memgraph.coordinators.volumeClaim.logPVC }}
- metadata:
name: memgraph-coordinator-{{ $coordinator.id }}-log-storage
Expand All @@ -111,7 +112,7 @@ spec:
{{- end }}
resources:
requests:
storage: {{ $.Values.memgraph.coordinators.volumeClaim.storagePVC.logPVCSize }}
storage: {{ $.Values.memgraph.coordinators.volumeClaim.logPVCSize }}
{{- end }}
---
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,4 @@ spec:
name: bolt
port: {{ .boltPort }}
targetPort: {{ .boltPort }}
- protocol: TCP
name: management
port: {{ .managementPort }}
targetPort: {{ .managementPort }}
{{- end }}
28 changes: 18 additions & 10 deletions charts/memgraph-high-availability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ memgraph:
storagePVC: true
storagePVCSize: "1Gi"
logPVCClassName: ""
logPVC: false
logPVC: true
logPVCSize: "256Mi"
coordinators:
volumeClaim:
storagePVCClassName: ""
storagePVC: true
storagePVCSize: "1Gi"
logPVCClassName: ""
logPVC: false
logPVC: true
logPVCSize: "256Mi"


Expand All @@ -49,7 +49,7 @@ data:
- "--bolt-port=7687"
- "--also-log-to-stderr"
- "--log-level=TRACE"
- "--replication-restore-state-on-startup=true"
- "--log-file=/var/log/memgraph/memgraph.log"

- id: "1"
boltPort: 7687
Expand All @@ -61,45 +61,53 @@ data:
- "--bolt-port=7687"
- "--also-log-to-stderr"
- "--log-level=TRACE"
- "--replication-restore-state-on-startup=true"
- "--log-file=/var/log/memgraph/memgraph.log"

coordinators:
- id: "1"
boltPort: 7687
managementPort: 30000
managementPort: 10000
coordinatorPort: 12000
args:
- "--experimental-enabled=high-availability"
- "--coordinator-id=1"
- "--coordinator-port=12000"
- "--management-port=30000"
- "--management-port=10000"
- "--bolt-port=7687"
- "--also-log-to-stderr"
- "--log-level=TRACE"
- "--coordinator-hostname=memgraph-coordinator-1.default.svc.cluster.local"
- "--log-file=/var/log/memgraph/memgraph.log"
- "--nuraft-log-file=/var/log/memgraph/memgraph.log"

- id: "2"
boltPort: 7687
managementPort: 30000
managementPort: 10000
coordinatorPort: 12000
args:
- "--experimental-enabled=high-availability"
- "--coordinator-id=2"
- "--coordinator-port=12000"
- "--management-port=30000"
- "--management-port=10000"
- "--bolt-port=7687"
- "--also-log-to-stderr"
- "--log-level=TRACE"
- "--coordinator-hostname=memgraph-coordinator-2.default.svc.cluster.local"
- "--log-file=/var/log/memgraph/memgraph.log"
- "--nuraft-log-file=/var/log/memgraph/memgraph.log"

- id: "3"
boltPort: 7687
managementPort: 30000
managementPort: 10000
coordinatorPort: 12000
args:
- "--experimental-enabled=high-availability"
- "--coordinator-id=3"
- "--coordinator-port=12000"
- "--management-port=30000"
- "--management-port=10000"
- "--bolt-port=7687"
- "--also-log-to-stderr"
- "--log-level=TRACE"
- "--coordinator-hostname=memgraph-coordinator-3.default.svc.cluster.local"
- "--log-file=/var/log/memgraph/memgraph.log"
- "--nuraft-log-file=/var/log/memgraph/memgraph.log"

0 comments on commit 9d307a1

Please sign in to comment.