From a672096194b6a689b5880a1fafa92a824417e7b2 Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Tue, 9 Dec 2025 20:11:10 -0600 Subject: [PATCH] DOC-6083 RS: Add user-defined modules during bootstrapping --- .../stack-with-enterprise/install/_index.md | 2 +- .../install/add-module-to-cluster.md | 247 +++++++++++++++++- .../rest-api/objects/bootstrap/_index.md | 2 + .../objects/bootstrap/user_defined_module.md | 40 +++ .../rs-8-0-releases/rs-8-0-6-tba.md | 6 +- 5 files changed, 294 insertions(+), 3 deletions(-) create mode 100644 content/operate/rs/references/rest-api/objects/bootstrap/user_defined_module.md diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md index 19b3e97d6d..85927dfe33 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md @@ -11,7 +11,7 @@ linkTitle: Install and upgrade modules weight: 4 --- -Several modules that provide additional Redis capabilities, such as search and query, JSON, time series, and probabilistic data structures, come packaged with [Redis Enterprise Software]({{< relref "/operate/rs" >}}). As of version 8.0, Redis Enterprise Software includes four feature sets, compatible with different Redis database versions. +Several modules that provide additional Redis capabilities, such as search and query, JSON, time series, and probabilistic data structures, come packaged with [Redis Enterprise Software]({{< relref "/operate/rs" >}}). As of version 8.0, Redis Enterprise Software includes multiple feature sets, compatible with different Redis database versions. However, if you want to use additional modules or upgrade a module to a more recent version, you need to: diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md index d41d8e9913..93159f641b 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster.md @@ -10,7 +10,7 @@ linkTitle: Install on a cluster weight: 10 --- -[Redis Enterprise Software]({{< relref "/operate/rs" >}}) comes packaged with several modules that provide additional Redis capabilities such as [search and query]({{}}), [JSON]({{}}), [time series]({{}}), and [probabilistic data structures]({{}}). As of version 8.0, Redis Enterprise Software includes four feature sets, compatible with different Redis database versions. You can view the installed modules, their versions, and their minimum compatible Redis database versions from **Cluster > Modules** in the Cluster Manager UI. +[Redis Enterprise Software]({{< relref "/operate/rs" >}}) comes packaged with several modules that provide additional Redis capabilities such as [search and query]({{}}), [JSON]({{}}), [time series]({{}}), and [probabilistic data structures]({{}}). As of version 8.0, Redis Enterprise Software includes multiple feature sets, compatible with different Redis database versions. You can view the installed modules, their versions, and their minimum compatible Redis database versions from **Cluster > Modules** in the Cluster Manager UI. To use other modules or upgrade an existing module to a more recent version, you need to install the new module package on your cluster. @@ -18,6 +18,20 @@ To use other modules or upgrade an existing module to a more recent version, you Some module versions are not supported or recommended for use with Redis Enterprise Software. {{}} +## Module package requirements + +The module must be packaged as a `.zip` file containing: + +- **module.json**: A metadata file with module information including: + - `module_name`: The actual module name + - `version`: Numeric version + - `semantic_version`: Semantic version string (for example, "1.0.0") + - `min_redis_version`: Minimum compatible Redis version + - `commands`: List of commands the module provides + - `capabilities`: List of module capabilities + +- **Module binary**: The compiled `.so` file for the target platform + ## Get packaged modules To install or upgrade a module on a [Redis Enterprise Software]({{< relref "/operate/rs" >}}) cluster, you need a module package. @@ -26,6 +40,237 @@ To install or upgrade a module on a [Redis Enterprise Software]({{< relref "/ope - For custom-packaged modules, download a [custom-packaged module](https://redislabs.com/community/redis-modules-hub/) from the developer. +- User-defined modules are downloaded automatically if you [add them during bootstrapping](#bootstrap-user-defined-module). + +## Add user-defined modules during bootstrapping (Redis Software v8.0.6 and later) {#bootstrap-user-defined-module} + +As of Redis Enterprise Software version 8.0.6, you can include `user_defined_modules` in REST API requests to [initiate boostrap operations]({{}}) such as `create_cluster`, `join_cluster`, or `recover_cluster`. Each node in the cluster independently downloads and installs the specified modules during its bootstrap process. + +`user_defined_modules` has the following JSON schema: + +```json +{ + "user_defined_modules": [ + { + "name": "string (required)", + "location": { + "location_type": "http | https (required)", + "url": "string (required)", + "credentials": { + "username": "string (optional)", + "password": "string (optional)" + } + } + } + ] +} +``` + +### Best practices + +- Use `https` instead of `http` for secure module downloads. + +- Include version numbers in module URLs. + +- Use the same `user_defined_modules` configuration for all nodes in a cluster. + +- If using authenticated downloads, ensure credentials are properly secured. + +- Ensure modules are compatible with the Redis database version running on your cluster. + +- Verify modules work correctly before deploying to production environments. + +### Example requests + +{{< multitabs id="bootstrap-modules" + tab1="Create cluster" + tab2="Join cluster" + tab3="Recover cluster" >}} + +The following example creates a cluster with multiple modules: + + +```sh +POST /v1/bootstrap/create_cluster +{ + "action": "create_cluster", + "credentials": { + "username": "admin@example.com", + "password": "your-secure-password" + }, + "cluster": { + "name": "my-cluster.example.com" + }, + "user_defined_modules": [ + { + "name": "ModuleA", + "location": { + "location_type": "https", + "url": "https://private-repo.example.com/enterprise-module-2.0.0.zip", + "credentials": { + "username": "download-user", + "password": "download-password" + } + } + }, + { + "name": "ModuleB", + "location": { + "location_type": "https", + "url": "https://modules.example.com/module-b-2.5.0.zip" + } + }, + { + "name": "ModuleC", + "location": { + "location_type": "http", + "url": "http://internal-server.local/module-c-1.2.0.zip" + } + } + ] +} +``` + +-tab-sep- + +The following example joins a node to a cluster with multiple modules: + +```sh +POST /v1/bootstrap/join_cluster +{ + "action": "join_cluster", + "credentials": { + "username": "admin@example.com", + "password": "your-secure-password" + }, + "cluster": { + "name": "my-cluster.example.com", + "nodes": ["192.168.1.10", "192.168.1.11"] + }, + "user_defined_modules": [ + { + "name": "ModuleA", + "location": { + "location_type": "https", + "url": "https://private-repo.example.com/enterprise-module-2.0.0.zip", + "credentials": { + "username": "download-user", + "password": "download-password" + } + } + }, + { + "name": "ModuleB", + "location": { + "location_type": "https", + "url": "https://modules.example.com/module-b-2.5.0.zip" + } + }, + { + "name": "ModuleC", + "location": { + "location_type": "http", + "url": "http://internal-server.local/module-c-1.2.0.zip" + } + } + ] +} +``` + +-tab-sep- + +The following example recovers a cluster with multiple modules: + +```sh +POST /v1/bootstrap/recover_cluster +{ + "action": "recover_cluster", + "recovery_filename": "/path/to/backup.rdb", + "credentials": { + "username": "admin@example.com", + "password": "your-secure-password" + }, + "user_defined_modules": [ + { + "name": "ModuleA", + "location": { + "location_type": "https", + "url": "https://private-repo.example.com/enterprise-module-2.0.0.zip", + "credentials": { + "username": "download-user", + "password": "download-password" + } + } + }, + { + "name": "ModuleB", + "location": { + "location_type": "https", + "url": "https://modules.example.com/module-b-2.5.0.zip" + } + }, + { + "name": "ModuleC", + "location": { + "location_type": "http", + "url": "http://internal-server.local/module-c-1.2.0.zip" + } + } + ] +} +``` + +{{< /multitabs >}} + +### Troubleshooting + +#### Error handling + +Download failures do not fail the bootstrap process. If a module fails to download or install, a warning is logged and the bootstrap process continues with the remaining modules. + +Warnings are recorded in the bootstrap status with: +- `warning_type`: `"module_download_failed"` +- `message`: Error description +- `details`: `{"module_name": ""}` + +#### Module download failed + +Check the bootstrap logs for detailed error messages: + +``` +Failed to download and install custom module '': +``` + +Common causes: +- Invalid URL +- Network connectivity issues +- Authentication failures +- Module package format issues + +#### Module compatibility errors + +After processing user-defined modules, the system validates that all custom modules are compatible with existing databases in the cluster. This validation: + +1. Checks which custom modules are used by existing databases. + +1. Verifies that compatible module versions are available on the node. + +1. Fails the bootstrap process if incompatible modules are detected. + +If the bootstrap process fails with an `incompatible_modules` error: + +1. Verify the module version is compatible with existing databases. + +1. Ensure the module binary exists and is accessible. + +#### Missing module.json + +If you see `"module.json missing"` errors: + +1. Verify the zip file contains a valid `module.json` at the root level. + +1. Verify the JSON is properly formatted. + ## Add a user-defined module to a cluster (Redis Software v8.0.x and later) {#add-user-defined-module-to-cluster} To add a custom module to a cluster running Redis Enterprise Software version 8.0.x or later, use the following REST API requests: diff --git a/content/operate/rs/references/rest-api/objects/bootstrap/_index.md b/content/operate/rs/references/rest-api/objects/bootstrap/_index.md index df3331d459..8123bc2c93 100644 --- a/content/operate/rs/references/rest-api/objects/bootstrap/_index.md +++ b/content/operate/rs/references/rest-api/objects/bootstrap/_index.md @@ -39,5 +39,7 @@ A bootstrap configuration object. | recovery_filename | string | Name of backup file to recover from | | required_version | string | This node can only join the cluster if all nodes in the cluster have a version greater than the required_version (deprecated as of Redis Enterprise Software v7.8.6) | | retry_time | integer | Max waiting time between retries (in seconds) | +| user_defined_modules | array of [user_defined_module]({{< relref "/operate/rs/references/rest-api/objects/bootstrap/user_defined_module" >}}) objects | List of custom modules to download and install during bootstrap. Each node downloads and installs the modules independently. | +| witness_disk | object | An API object that represents the Witness Disk bootstrap configuration | diff --git a/content/operate/rs/references/rest-api/objects/bootstrap/user_defined_module.md b/content/operate/rs/references/rest-api/objects/bootstrap/user_defined_module.md new file mode 100644 index 0000000000..0fc38d6cfb --- /dev/null +++ b/content/operate/rs/references/rest-api/objects/bootstrap/user_defined_module.md @@ -0,0 +1,40 @@ +--- +Title: user_defined_module object +alwaysopen: false +categories: +- docs +- operate +- rs +description: An object for user-defined module configuration during bootstrap +hideListLinks: true +linkTitle: user_defined_module +weight: $weight +--- + +A user-defined module configuration object for bootstrap operations. + +| Name | Type/Value | Description | +|------|------------|-------------| +| name | string | Module name for presentation and logging purposes (required) | +| location | object | Information on where to download the module from (required)
{{}}{ + "location_type": "http | https", + "url": "string", + "credentials": { + "username": "string", + "password": "string" + } +}{{}}
**location_type**: The type of location, either `http` or `https` (required)
**url**: The URL to download the module zip file from (required)
**credentials**: Optional credentials for downloads that require basic authentication | + +## Module package requirements + +The module must be packaged as a `.zip` file containing: + +- **module.json**: A metadata file with module information including: + - `module_name`: The actual module name + - `version`: Numeric version + - `semantic_version`: Semantic version string (for example, "1.0.0") + - `min_redis_version`: Minimum compatible Redis version + - `commands`: List of commands the module provides + - `capabilities`: List of module capabilities + +- **Module binary**: The compiled `.so` file for the target platform diff --git a/content/operate/rs/release-notes/rs-8-0-releases/rs-8-0-6-tba.md b/content/operate/rs/release-notes/rs-8-0-releases/rs-8-0-6-tba.md index 04d8d1319d..14ac29cb17 100644 --- a/content/operate/rs/release-notes/rs-8-0-releases/rs-8-0-6-tba.md +++ b/content/operate/rs/release-notes/rs-8-0-releases/rs-8-0-6-tba.md @@ -6,7 +6,7 @@ categories: - operate - rs compatibleOSSVersion: Redis 8.2.1, 8.0.2, 7.4.3, 7.2.7, 6.2.13 -description: Single sign-on for the Cluster Manager UI. Slot migration API. Error reports for Replica Of migration status. +description: Single sign-on for the Cluster Manager UI. Slot migration API. Error reports for Replica Of migration status. Automatically download and install user-defined modules during bootstrapping. linkTitle: 8.0.6-tba (December 2025) weight: 88 --- @@ -23,6 +23,8 @@ This version offers: - Error reports for Replica Of migration status +- Automatically download and install user-defined modules during bootstrapping + ## New in this release ### New features @@ -51,6 +53,8 @@ New database actions allow you to migrate and cancel slot migrations between Red - Added error report to Replica Of [migration status]({{}}) REST API responses. +- Added support for automatically downloading and installing user-defined modules during bootstrap operations. You can now specify `user_defined_modules` in [bootstrap requests]({{}}) for `create_cluster`, `join_cluster`, and `recover_cluster` actions. See [Add user-defined modules during bootstrapping]({{}}) for details. + ### Redis database versions Redis Enterprise Software version 8.0.6 includes five Redis database versions: 8.2.1, 8.0.2, 7.4.3, 7.2.7, and 6.2.13.