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

Add cluster provision functionality #2452

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tillrohrmann
Copy link
Contributor

@tillrohrmann tillrohrmann commented Dec 20, 2024

After starting the metdata store service and the grpc server, the node will try to initialize itself by joining an existing cluster or provisioning a new cluster. Either of the two actions will return the NodeId of the node. Moreover, the initialization procedure makes sure that the latest metadata is fetched from the metadata store.

The cluster provisioning will ensure that all relevant metadata has been written to the metadata store. This includes the initial NodesConfiguration, a PartitionTable that includes the number of partitions and an empty Logs that contains the default log provider configuration.

To use the cluster provisioning feature, one needs to disable allow-bootstrap. Otherwise the cluster will try to auto provision itself. You can use restatectl to provision the cluster via:

restatectl cluster provision --address http://localhost:5122 --num-partitions 42 --bifrost-provider replicated --replication-property 13

This fixes #2409.

crates/core/protobuf/node_ctl_svc.proto Show resolved Hide resolved
crates/core/protobuf/node_ctl_svc.proto Show resolved Hide resolved
crates/core/protobuf/node_ctl_svc.proto Show resolved Hide resolved
crates/core/protobuf/node_ctl_svc.proto Show resolved Hide resolved
crates/local-cluster-runner/src/node/mod.rs Show resolved Hide resolved
crates/node/src/init.rs Outdated Show resolved Hide resolved
crates/node/src/init.rs Outdated Show resolved Hide resolved
crates/node/src/init.rs Outdated Show resolved Hide resolved
crates/node/src/init.rs Outdated Show resolved Hide resolved
crates/types/src/node_id.rs Show resolved Hide resolved
After starting the metdata store service and the grpc server, the node will
try to initialize itself by joining an existing cluster or provisioning the
a new cluster. Either of the two actions will return the NodeId of the node.
Moreover, the initialization procedure makes sure that the latest metadata
is fetched from the metadata store.

The cluster provisioning will ensure that all relevant metadata has been written
to the metadata store. This includes the initial NodesConfiguration, a PartitionTable
that includes the number of partitions and an empty Logs that contains the default
log provider configuration.

This fixes restatedev#2409.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add provision command to bootstrap metadata store and write initial NodesConfiguration
2 participants