Skip to content

Commit 9bb5535

Browse files
as51340antejavor
andauthored
Upgrade HA network configuration (memgraph#80)
Update HA network configuration --------- Co-authored-by: Ante Javor <ante.javor@memgraph.io>
1 parent 57a5934 commit 9bb5535

11 files changed

+100
-132
lines changed

charts/memgraph-high-availability/README.md

+35-32
Original file line numberDiff line numberDiff line change
@@ -38,43 +38,46 @@ The affinity is disabled either by running the command above, or by modifying th
3838

3939
The following table lists the configurable parameters of the Memgraph chart and their default values.
4040

41-
| Parameter | Description | Default |
42-
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -------------------------- |
43-
| `memgraph.image.repository` | Memgraph Docker image repository | `memgraph/memgraph` |
44-
| `memgraph.image.tag` | Specific tag for the Memgraph Docker image. Overrides the image tag whose default is chart version. | `2.17.0` |
45-
| `memgraph.image.pullPolicy` | Image pull policy | `IfNotPresent` |
46-
| `memgraph.env.MEMGRAPH_ENTERPRISE_LICENSE` | Memgraph enterprise license | `<your-license>` |
47-
| `memgraph.env.MEMGRAPH_ORGANIZATION_NAME` | Organization name | `<your-organization-name>` |
48-
| `memgraph.probes.startup.failureThreshold` | Startup probe failure threshold | `30` |
49-
| `memgraph.probes.startup.periodSeconds` | Startup probe period in seconds | `10` |
50-
| `memgraph.probes.readiness.initialDelaySeconds` | Readiness probe initial delay in seconds | `5` |
51-
| `memgraph.probes.readiness.periodSeconds` | Readiness probe period in seconds | `5` |
52-
| `memgraph.probes.liveness.initialDelaySeconds` | Liveness probe initial delay in seconds | `30` |
53-
| `memgraph.probes.liveness.periodSeconds` | Liveness probe period in seconds | `10` |
54-
| `memgraph.data.volumeClaim.storagePVC` | Enable storage PVC | `true` |
55-
| `memgraph.data.volumeClaim.storagePVCSize` | Size of the storage PVC | `1Gi` |
56-
| `memgraph.data.volumeClaim.logPVC` | Enable log PVC | `false` |
57-
| `memgraph.data.volumeClaim.logPVCSize` | Size of the log PVC | `256Mi` |
58-
| `memgraph.coordinators.volumeClaim.storagePVC` | Enable storage PVC for coordinators | `true` |
59-
| `memgraph.coordinators.volumeClaim.storagePVCSize` | Size of the storage PVC for coordinators | `1Gi` |
60-
| `memgraph.coordinators.volumeClaim.logPVC` | Enable log PVC for coordinators | `false` |
61-
| `memgraph.coordinators.volumeClaim.logPVCSize` | Size of the log PVC for coordinators | `256Mi` |
62-
| `memgraph.affinity.enabled` | Enables affinity so each instance is deployed to unique node | `true` |
63-
| `data` | Configuration for data instances | See `data` section |
64-
| `coordinators` | Configuration for coordinator instances | See `coordinators` section |
41+
42+
| Parameter | Description | Default |
43+
|---------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------|
44+
| `memgraph.image.repository` | Memgraph Docker image repository | `memgraph/memgraph` |
45+
| `memgraph.image.tag` | Specific tag for the Memgraph Docker image. Overrides the image tag whose default is chart version. | `2.22.0` |
46+
| `memgraph.image.pullPolicy` | Image pull policy | `IfNotPresent` |
47+
| `memgraph.env.MEMGRAPH_ENTERPRISE_LICENSE` | Memgraph enterprise license | `<your-license>` |
48+
| `memgraph.env.MEMGRAPH_ORGANIZATION_NAME` | Organization name | `<your-organization-name>` |
49+
| `memgraph.probes.startup.failureThreshold` | Startup probe failure threshold | `30` |
50+
| `memgraph.probes.startup.periodSeconds` | Startup probe period in seconds | `10` |
51+
| `memgraph.probes.readiness.initialDelaySeconds` | Readiness probe initial delay in seconds | `5` |
52+
| `memgraph.probes.readiness.periodSeconds` | Readiness probe period in seconds | `5` |
53+
| `memgraph.probes.liveness.initialDelaySeconds` | Liveness probe initial delay in seconds | `30` |
54+
| `memgraph.probes.liveness.periodSeconds` | Liveness probe period in seconds | `10` |
55+
| `memgraph.data.volumeClaim.storagePVC` | Enable storage PVC | `true` |
56+
| `memgraph.data.volumeClaim.storagePVCSize` | Size of the storage PVC | `1Gi` |
57+
| `memgraph.data.volumeClaim.logPVC` | Enable log PVC | `false` |
58+
| `memgraph.data.volumeClaim.logPVCSize` | Size of the log PVC | `256Mi` |
59+
| `memgraph.coordinators.volumeClaim.storagePVC` | Enable storage PVC for coordinators | `true` |
60+
| `memgraph.coordinators.volumeClaim.storagePVCSize` | Size of the storage PVC for coordinators | `1Gi` |
61+
| `memgraph.coordinators.volumeClaim.logPVC` | Enable log PVC for coordinators | `false` |
62+
| `memgraph.coordinators.volumeClaim.logPVCSize` | Size of the log PVC for coordinators | `256Mi` |
63+
| `memgraph.affinity.enabled` | Enables affinity so each instance is deployed to unique node | `true` |
64+
| `memgraph.externalAccess.serviceType` | NodePort or LoadBalancer. Use LoadBalancer for Cloud production deployment and NodePort for local testing | `LoadBalancer` |
65+
| `memgraph.ports.boltPort` | Bolt port used on coordinator and data instances. | `7687` |
66+
| `memgraph.ports.managementPort` | Management port used on coordinator and data instances. | `10000` |
67+
| `memgraph.ports.replicationPort` | Replication port used on data instances. | `20000` |
68+
| `memgraph.ports.coordinatorPort` | Coordinator port used on coordinators. | `12000` |
69+
| `data` | Configuration for data instances | See `data` section |
70+
| `coordinators` | Configuration for coordinator instances | See `coordinators` section |
6571
| `sysctlInitContainer.enabled` | Enable the init container to set sysctl parameters | `true` |
6672
| `sysctlInitContainer.maxMapCount` | Value for `vm.max_map_count` to be set by the init container | `262144` |
6773

6874
For the `data` and `coordinators` sections, each item in the list has the following parameters:
6975

70-
| Parameter | Description | Default |
71-
| ------------------------------------- | -------------------------------------------- | ---------------------------------- |
72-
| `id` | ID of the instance | `0` for data, `1` for coordinators |
73-
| `boltPort` | Bolt port of the instance | `7687` |
74-
| `managementPort` | Management port of the data instance | `10000` |
75-
| `replicationPort` (data only) | Replication port of the data instance | `20000` |
76-
| `coordinatorPort` (coordinators only) | Coordinator port of the coordinator instance | `12000` |
77-
| `args` | List of arguments for the instance | See `args` section |
76+
| Parameter | Description | Default |
77+
|---------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------|
78+
| `id` | ID of the instance | `0` for data, `1` for coordinators |
79+
| `args` | List of arguments for the instance | See `args` section |
80+
7881

7982
The `args` section contains a list of arguments for the instance. The default values are the same for all instances:
8083

charts/memgraph-high-availability/aws/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ eksctl create cluster -f cluster.yaml`
2626
```
2727

2828
should be sufficient. Make sure to change the path to the public SSH key if you want to have SSH access to EC2 instances. After creating the cluster, `kubectl` should pick up
29-
the AWS context and you can verify this by running `kubectl context current-context`. My is pointing to `andi.skrgat@test-cluster-ha.eu-west-1.eksctl.io`.
29+
the AWS context and you can verify this by running `kubectl config current-context`. My is pointing to `andi.skrgat@test-cluster-ha.eu-west-1.eksctl.io`.
3030

3131
## Add Helm Charts repository
3232

@@ -57,7 +57,8 @@ aws eks describe-nodegroup --cluster-name test-cluster-ha --nodegroup-name stand
5757
and then provide full access to it:
5858

5959
```
60-
aws iam list-attached-role-policies --role-name eksctl-test-cluster-ha-nodegroup-s-NodeInstanceRole-<ROLE_ID_FROM_PREVIOUS_OUTPUT>
60+
aws iam attach-role-policy --role-name eksctl-test-cluster-ha-nodegroup-s-NodeInstanceRole-<ROLE-ID> --policy-arn arn:aws:iam::aws:policy/AmazonEC2FullAccess
61+
aws iam list-attached-role-policies --role-name eksctl-test-cluster-ha-nodegroup-s-NodeInstanceRole-<ROLE-ID>
6162
```
6263

6364
It is also important to create Inbound Rule in the Security Group attached to the eksctl cluster which will allow TCP traffic

charts/memgraph-high-availability/aws/cluster.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ managedNodeGroups:
3737
instanceSelector: {}
3838
instanceType: t3.small
3939
labels:
40-
alpha.eksctl.io/cluster-name: test-cluster-ha
40+
alpha.eksctl.io/cluster-name: mg-ha
4141
alpha.eksctl.io/nodegroup-name: standard-workers
4242
maxSize: 5
4343
minSize: 5
@@ -58,7 +58,7 @@ managedNodeGroups:
5858
volumeThroughput: 125
5959
volumeType: gp3
6060
metadata:
61-
name: test-cluster-ha
61+
name: mg-ha
6262
region: eu-west-1
6363
version: "1.30"
6464
privateCluster:

charts/memgraph-high-availability/templates/NOTES.txt

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ The cluster setup requires the proper enterprise license to work since HA is an
88
You can connect to Memgraph instances via Lab, mgconsole, or any other client. By default, all Memgraph instances (coordinators and data instances) listen on port 7687 for a bolt connection.
99
Make sure your are connecting to the correct ip address and port. For details check the configuration on your cloud provider(aws, gcp, azure, etc.)
1010

11-
If you are connecting via mgconsole, you can use the following command:
11+
To start, you should add coordinators and register data instances in order to completely setup cluster. In both cases you only need to modify 'bolt_server' part and set it to the DNS
12+
of the node on which instance is being started. Node ports are fixed. Example:
1213

13-
mgconsole --host <your-instance-ip> --port <your-instance-port>
14+
ADD COORDINATOR 2 WITH CONFIG {"bolt_server": "<NODE-2-IP>:32002", "management_server": "memgraph-coordinator-2.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-2.default.svc.cluster.local:12000"};
15+
ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "<NODE-3-IP>:32003", "management_server": "memgraph-coordinator-3.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-3.default.svc.cluster.local:12000"};
16+
REGISTER INSTANCE instance_1 WITH CONFIG {"bolt_server": "<NODE-4-IP>:32010", "management_server": "memgraph-data-0.default.svc.cluster.local:10000", "replication_server": "memgraph-data-0.default.svc.cluster.local:20000"};
17+
REGISTER INSTANCE instance_2 WITH CONFIG {"bolt_server": "<NODE-5-IP>:32011", "management_server": "memgraph-data-1.default.svc.cluster.local:10000", "replication_server": "memgraph-data-1.default.svc.cluster.local:20000"};
1418

15-
If you are connecting via Lab, specify your instance IP address and port in Memgraph Lab GUI.
19+
If you are connecting via Lab, specify your coordinator instance IP address and port in Memgraph Lab GUI and select Memgraph HA cluster type of connection.
1620

17-
If you are using minikube, you can find out your instance ip using `minikube ip`.
21+
If you are using minikube, you can find out your node ip using `minikube ip`.
22+
23+
ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "34.251.38.32:32003", "management_server": "memgraph-coordinator-3.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-3.default.svc.cluster.local:12000"};
24+
REGISTER INSTANCE instance_1 WITH CONFIG {"bolt_server": "52.50.209.155:32010", "management_server": "memgraph-data-0.default.svc.cluster.local:10000", "replication_server": "memgraph-data-0.default.svc.cluster.local:20000"};
25+
REGISTER INSTANCE instance_2 WITH CONFIG {"bolt_server": "34.24.10.69:32011", "management_server": "memgraph-data-1.default.svc.cluster.local:10000", "replication_server": "memgraph-data-1.default.svc.cluster.local:20000"};

0 commit comments

Comments
 (0)