Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID use in partitioner #441

Merged
merged 5 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 35 additions & 17 deletions docs/usage/basic/strong.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,53 @@

# Strong consistency

## Prerequisites
Create an Aerospike cluster with strong consistency

* the node count must be equal or higher to the configured `replication-factor`
* the feature file `features.conf` must support the number of nodes being deployed in the cluster, or the cluster won't form
## Create a cluster

For simple testing, ensure the replication factor is `1` in the custom `aerospike.conf`.

## Create an Aerospike cluster with strong consistency
```
# docker
aerolab config backend -t docker
aerolab cluster create -f features.conf

### Generate a template configuration file with strong consistency enabled
# aws
aerolab config backend -t aws -r us-west-2
aerolab cluster create -I t3a.large -f features.conf

```bash
aerolab conf generate
# gcp
aerolab config backend -t gcp -o aerolab-test-project-1
aerolab cluster create --instance e2-standard-2 --zone us-central1-a -f features.conf
```

Tick the box next to 'strong consistency' and hit CTRL+X to save `aerospike.conf`.
## Apply strong consistency

### Replication factor and test features file limitations
```
aerolab conf sc
```

Optionally edit `aerospike.conf` and set `replication-factor 1` for the namespace, in order to allow 1-node cluster with SC.
## Further options

### Create a cluster, with a custom config and features file
The `aerolab conf sc` command allows for custom namespace names, addition of rack-aware configuration as well as auto-partitioning of devices for a namespace (should the instance type have devices).

```bash
$ ./aerolab cluster create -c 3 -o aerospike.conf -f features.conf
```
$ aerolab conf sc help
[...]
-n, --name= Cluster name (default: mydc)
-m, --namespace= Namespace to change (default: test)
-p, --path= Path to aerospike.conf (default: /etc/aerospike/aerospike.conf)
-f, --force If set, will zero out the devices even if strong-consistency was already configured
-r, --racks= If rack-aware feature is required, set this to the number of racks you want to divide the cluster into
-d, --with-disks If set, will attempt to configure device storage engine for the namespace, using all available devices
-t, --threads= Run on this many nodes in parallel (default: 50)
```

### Apply the roster
Full example:

```bash
$ ./aerolab roster apply -m test
# create the cluster, 9 nodes
aerolab config backend -t aws -r us-west-2
aerolab cluster create -I m5d.large -f features.conf -c 9

# configure SC with 'test' namespace, 3 racks (which results in 3 nodes / rack), and using all available devices
aerolab conf sc -m test -r 3 -d
```
26 changes: 14 additions & 12 deletions src/cmdClusterPartition.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,18 @@ type blockDeviceInformation struct {
}

type blockDevices struct {
Name string `json:"name"`
Path string `json:"path"`
FsType string `json:"fstype"`
FsSize string `json:"fssize"`
MountPoint string `json:"mountpoint"`
Model string `json:"model"` // "Amazon EC2 NVMe Instance Storage" or "Amazon Elastic Block Store"
Size string `json:"size"`
Type string `json:"type"` // loop or disk or part
Children []blockDevices `json:"children"`
diskNo int
partNo int
nodeNo int
Name string `json:"name"`
Path string `json:"path"`
FsType string `json:"fstype"`
FsSize string `json:"fssize"`
MountPoint string `json:"mountpoint"`
Model string `json:"model"` // "Amazon EC2 NVMe Instance Storage" or "Amazon Elastic Block Store"
Size string `json:"size"`
Type string `json:"type"` // loop or disk or part
PartUUID string `json:"partuuid"`
PartUUIDPath string `json:"partuuid_path"`
Children []blockDevices `json:"children"`
diskNo int
partNo int
nodeNo int
}
Loading