This repository contains a collection of public scripts designed to help clients interact with and manage their Macrometa environment. Each script addresses a common need—from migrating accounts and cloning collections to handling large document queries and ensuring regional acknowledgments.
Macrometa's global data mesh platform enables high-performance, real-time data management across regions. This repository provides a set of scripts that simplify common tasks when working with Macrometa, such as account migrations, cloning collections or geo fabrics, exporting query workers, backing up configurations, and managing acknowledgments across regions.
- Purpose: Migrates an account from one feed to another.
- Details: Use this script to seamlessly transfer account data without manual intervention.
- Purpose: Clones collections from one account/fabric to another.
- Details: Ideal for replicating collection configurations across different environments.
- Purpose: Clones a geo fabric.
- Details: Simplifies the process of duplicating geo fabric setups in various locations.
- Purpose: Exports all query workers from your Macrometa account.
- Details: Generates an export file containing query worker configurations for backup or migration.
- Purpose: Returns documents in batches to work around Macrometa's 10k document limit.
- Details: Use this script when querying large datasets to avoid hitting the limit.
- Purpose: Exports all data and configurations as JSON.
- Details: A temporary backup solution to capture your current Macrometa setup.
- Purpose: Ensures that you receive acknowledgments (ACK) from all regions before continuing.
- Details: Helps maintain data consistency and regional synchronization.
- Purpose: Similar to waitForACK, but specifically tailored for stream worker processes.
- Details: Waits for ACKs in stream worker operations to ensure reliable processing.
- Macrometa Account: You must have an active Macrometa account. Sign up here if needed.
- Environment Setup: Depending on the script:
- Node.js Scripts: Install Node.js.
- Dependencies: Check each script for any additional dependency requirements and install them accordingly (e.g., using
npm).
-
Clone the Repository:
git clone https://github.com/yourusername/accountMigration.git cd accountMigration -
Configure the Scripts:
Modify configuration settings or environment variables as needed.
For scripts that require environment variables (e.g., API keys, fabric names), create a
.envfile in the script directory with the appropriate values. -
Run the Scripts:
- Node.js Scripts:
node app.js
Refer to the inline comments and documentation within each script for more detailed usage instructions.
- Node.js Scripts:
- Testing: Some scripts may include tests or sample usage. Refer to any test files or inline comments for guidance.
- Contributing: Contributions are welcome! Please fork the repository and submit a pull request with your enhancements.
- Pre-commit Hooks: If applicable, set up pre-commit hooks to maintain code quality. Instructions for installing pre-commit can be added here if used.
If you run into issues or have any questions about these scripts, please reach out to Macrometa support at support@macrometa.com.
This project is distributed under the Apache License 2.0. See the LICENSE file for more details.
By contributing to this repository, you agree to abide by our Code of Conduct. Please report any unacceptable behavior to product@macrometa.com.