- Table of Contents
- Prerequisites
- Quick Start
- Project Structure
- Building the Project
- Running Tests
- Code Style
- Pre-Commit Hooks
- Publishing
- Development Environments
- Java Development Kit (JDK) 17+
- Python3
- Docker/Minikube/K3s/etc (for local deployment)
- Helm
- AWS CLI (for AWS deployment)
- Node.js v22 (downloaded automatically by Gradle)
- AWS Cloud Development Kit (CDK) (for AWS deployment, downloaded automatically by Gradle)
- This Kubernetes Guide shows you how to create a minikube cluster locally and deploy the Migration Assistant to it.
- This AWS EKS Guide shows you how to deploy an EKS cluster and deploy the Migration Assistant to it.
See the project wiki to learn more about how to use the migration console and its workflow commands.
CreateSnapshot: Tools for creating cluster snapshots.DocumentsFromSnapshotMigration: Utilities for migrating documents from snapshots.MetadataMigration: Core functionality for migrating cluster metadata.RFS(Reindex-From-Snapshot):- Migration utilities for document reindexing and metadata migration.
- Includes tracing contexts for both document and metadata migrations.
TrafficCapture(Capture-and-Replay): Projects for proxying, capturing, and replaying HTTP traffic.migrationConsole: A comprehensive CLI tool for executing the migration workflow.lib/console_link: Core library for migration operations.
deployment: AWS deployment scripts and configurations.dev-tools: Development utilities and API request templates.docs: Project documentation and architecture diagrams.libraries: Shared libraries used across the project.test: End-to-end testing scripts and configurations.transformation: Data transformation utilities for migration processes.dashboardsSanitizer: CLI tool for sanitizing dashboard configurations.testHelperFixtures: Test utilities including HTTP client for testing.
The migration console CLI provides users with a centralized interface to execute and manage the entire migration workflow, including:
- Configuring source and target clusters
- Managing backfill operations
- Controlling traffic replay
- Monitoring migration progress through metrics
- Handling snapshots and metadata
- Integrating with various deployment environments (Docker locally, AWS ECS, EKS, K8s)
Users can interact with the migration process through the CLI, which orchestrates the different components of the migration toolkit to perform a seamless migration between Elasticsearch and OpenSearch clusters.
./gradlew build./gradlew testBuild images with buildkit and jib. See buildImages for instructions to set that up.
./gradlew :buildImages:buildImagesToRegistry- Running the project in Kubernetes
- Running the legacy solution with Docker Compose
We use Spotless for code formatting. To check and apply the code style:
./gradlew spotlessCheck
./gradlew spotlessApplyInstall the pre-commit hooks:
./install_githooks.shThis project can be published to a local Maven repository with:
./gradlew publishToMavenLocalAnd subsequently imported into a separate Gradle project with (replacing name with any subProject name):
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
implementation group: "org.opensearch.migrations.trafficcapture", name: "captureKafkaOffloader", version: "0.1.0-SNAPSHOT"
//... other dependencies
}The entire list of published subprojects can be viewed as follows:
./gradlew listPublishedArtifactsTo include a test Fixture dependency, define the import similar to the following:
testImplementation testFixtures('org.opensearch.migrations.trafficcapture:trafficReplayer:0.1.0-SNAPSHOT')Settings.json files are already set up in the project, make sure that venv environments are created in all folders with pipfile. Bootstrap your environment by running the following command that creates all the environments.
find . -name Pipfile -not -path "*/cdk.out/*" | while read pipfile; do
dir=$(dirname "$pipfile")
echo "Setting up .venv in $dir"
(cd "$dir" && PIPENV_IGNORE_VIRTUALENVS=1 PIPENV_VENV_IN_PROJECT=1 pipenv install)
done