Local cluster setup#23
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new cluster orchestration script and adds support for a Raft advertise address in the metadata node configuration. The main goal is to make it easier to spin up local development clusters using Docker Compose and to improve Raft networking flexibility. The changes include a new script for generating and running a cluster, updates to the metadata node configuration to support a separate advertise address, and improved validation for Raft directories.
Cluster orchestration and local development:
scripts/run-cluster.shthat generates adocker-compose.ymlfile for running a configurable number of metadata and storage nodes, with options for image prefixes, client config generation, and environment variable setup. This script simplifies local cluster setup for development and testing.Metadata node configuration improvements:
METADATA_RAFT_ADVERTISE/RaftAdvertiseto allow specifying a separate Raft advertise address, improving support for containerized deployments and multi-host networking. [1] [2] [3]metadata/raft.goto use the advertise address if specified, both for binding and for cluster bootstrap, ensuring correct peer communication in Docker or multi-host setups. [1] [2]Validation and build process:
NodeConfig.Validate()to ensure the Raft data directory exists, creating it if necessary and failing early if not possible.Makefileto add abuild-clienttarget and include it inbuild-all, ensuring the client binary is built alongside other components.