diff --git a/content/embeds/rs-8-enabled-modules.md b/content/embeds/rs-8-enabled-modules.md new file mode 100644 index 0000000000..ce9b3bf973 --- /dev/null +++ b/content/embeds/rs-8-enabled-modules.md @@ -0,0 +1,5 @@ +| Database type | Automatically enabled capabilities | +|---------------|------------------------------------| +| RAM-only | [Search and query]({{}})
[JSON]({{}})
[Time series]({{}})
[Probabilistic]({{}}) | +| Flash-enabled ([Auto Tiering]({{}})) | [JSON]({{}})
[Probabilistic]({{}}) | +| [Active-Active]({{}}) | [Search and query]({{}})
[JSON]({{}}) | \ No newline at end of file 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 7f68824fed..19b3e97d6d 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,15 @@ linkTitle: Install and upgrade modules weight: 4 --- -Several modules, which provide Redis Stack features, come packaged with [Redis Enterprise Software]({{< relref "/operate/rs" >}}). As of version 7.8.2, Redis Enterprise Software includes three 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: +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. + +However, if you want to use additional modules or upgrade a module to a more recent version, you need to: 1. [Install a module package]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) on the cluster. 1. [Enable a module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database" >}}) for a new database or [upgrade a module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) in an existing database. + +## Automatically enabled capabilities in Redis 8 + +Databases created with or upgraded to Redis version 8 or later automatically enable the capabilities (modules) bundled with Redis Enterprise Software as follows: + +{{}} 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 0f089a733c..d41d8e9913 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,14 +10,12 @@ linkTitle: Install on a cluster weight: 10 --- -[Redis Enterprise Software]({{< relref "/operate/rs" >}}) comes packaged with several modules. As of version 7.8.2, Redis Enterprise Software includes three 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 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. 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. {{}} -- Some module versions are not supported or recommended for use with Redis Enterprise. - -- We recommend consulting [Redis support](https://redis.io/support/) before you upgrade a module on the cluster, especially if the cluster is used in production. +Some module versions are not supported or recommended for use with Redis Enterprise Software. {{}} ## Get packaged modules @@ -28,17 +26,61 @@ 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. -## Add a module to a cluster +## 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: + +1. [Upload the custom module configuration]({{< relref "/operate/rs/references/rest-api/requests/modules/user-defined#post-user-defined-module" >}}). Replace the values in the following example with your own. + + ```sh + POST https://:/v2/modules/user-defined + { + "module_name": "TestModule", + "version": 1, + "semantic_version": "0.0.1", + "display_name": "test module", + "commands": [ + { + "command_arity": -1, + "command_name": "module.command", + "first_key": 1, + "flags": ["write"], + "last_key": 1, + "step": 1 + } + ], + "command_line_args": "", + "capabilities": ["list", "of", "capabilities"], + "min_redis_version": "2.1" + } + ``` + +1. For each node in the cluster, [upload the custom module artifact]({{< relref "/operate/rs/references/rest-api/requests/modules/user-defined#post-local-user-defined-artifacts" >}}): + + ```sh + POST https://:/v2/local/modules/user-defined/artifacts + "module=@/tmp/custom-module.so" + ``` + + The *module* parameter specifies the full path of the module artifact and must be submitted as form-data. In addition, the module artifact must be available and accessible to the server processing the request. + +## Add a module to a cluster (Redis Software v7.22.x and earlier) {#add-a-module-to-a-cluster} + +Use one of the following methods to add a module to a cluster running Redis Enterprise Software version 7.22.x or earlier: -Use one of the following methods to add a module to a Redis Enterprise cluster: +{{< multitabs id="install-modules" + tab1="Cluster Manager UI" + tab2="REST API" >}} -- REST API [`POST` request to the `/v2/modules`]({{< relref "/operate/rs/references/rest-api/requests/modules#post-module-v2" >}}) endpoint +To add a module to the cluster using the Cluster Manager UI: -- Redis Enterprise Cluster Manager UI +1. Go to **Cluster > Modules**. -- For RedisGears, follow these [installation instructions]({{< relref "/operate/oss_and_stack/stack-with-enterprise/gears-v1/installing-redisgears" >}}) +1. Select **Upload module**. -### REST API method +1. Use the file browser to add the packaged module. + +-tab-sep- To add a module to the cluster using the REST API: @@ -47,7 +89,7 @@ To add a module to the cluster using the REST API: 1. Add the module to the cluster with a [`POST` request to the `/v2/modules`]({{< relref "/operate/rs/references/rest-api/requests/modules#post-module-v2" >}}) endpoint: ```sh - POST https://[host][:port]/v2/modules + POST https://:/v2/modules "module=@/tmp/redisearch.Linux-ubuntu16.04-x86_64.2.2.6.zip" ``` @@ -55,15 +97,13 @@ To add a module to the cluster using the REST API: 1. If the module installation succeeds, the `POST` request returns a [JSON object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}) that represents the new module. If it fails, it may return a JSON object with an `error_code` and `description` with more details. -### Cluster Manager UI method +{{< /multitabs >}} -To add a module to the cluster using the Cluster Manager UI: +For RedisGears, follow these [installation instructions]({{< relref "/operate/oss_and_stack/stack-with-enterprise/gears-v1/installing-redisgears" >}}) instead. -1. Go to **Cluster > Modules**. - -1. Select **Upload module**. - -1. Use the file browser to add the packaged module. +{{}} +We recommend consulting [Redis support](https://redis.io/support/) before you upgrade a module on the cluster, especially if the cluster is used in production. +{{}} ## Next steps diff --git a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md index 42f90583dd..197ef6571e 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database.md @@ -13,16 +13,22 @@ weight: 30 Modules add additional functionality to Redis databases for specific use cases. You can enable modules when you create a database. -## Prerequisites +## Automatically enabled capabilities in Redis 8 -- [Installed the module on the cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) -- [Upgraded the module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) to the latest version +Databases created with or upgraded to Redis version 8 or later automatically enable the capabilities (modules) bundled with Redis Enterprise Software as follows: + +{{}} ## Create a database with a module -{{}} You can only add modules to a database when you first create it. You cannot add modules to an existing database. -{{}} + +### Prerequisites + +- [Installed the module on the cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) +- [Upgraded the module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) to the latest version + +### Create a database and enable capabilities In the Redis Enterprise Cluster Manager UI, follow these steps to add modules to a database: diff --git a/content/operate/oss_and_stack/stack-with-enterprise/json/active-active.md b/content/operate/oss_and_stack/stack-with-enterprise/json/active-active.md index e7e29289e2..4b0718a774 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/json/active-active.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/json/active-active.md @@ -21,7 +21,7 @@ To use JSON in an Active-Active database, you must enable JSON during database c Active-Active Redis Cloud databases add JSON by default. See [Create an Active-Active database]({{< relref "/operate/rc/databases/create-database/create-active-active-database#select-capabilities" >}}) in the Redis Cloud documentation for details. -In Redis Enterprise Software, JSON is not enabled by default for Active-Active databases. To create an Active-Active JSON database in Redis Enterprise Software: +In Redis Enterprise Software, Active-Active databases created with or upgraded to Redis version 8 or later automatically enable JSON. For earlier Redis versions, you can enable JSON during database creation: 1. See [Create an Active-Active geo-replicated database]({{< relref "/operate/rs/databases/active-active/create" >}}) in the Redis Enterprise Software documentation for prerequisites and detailed steps. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/search/search-active-active.md b/content/operate/oss_and_stack/stack-with-enterprise/search/search-active-active.md index 86499de445..74078f4744 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/search/search-active-active.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/search/search-active-active.md @@ -15,7 +15,7 @@ You can run search operations on any instance of an Active-Active database. ## How it works -1. Create an Active-Active database with RediSearch 2.x enabled. +1. Create an Active-Active database with RediSearch 2.x enabled. Active-Active databases created with or upgraded to Redis version 8 or later automatically enable search and query. 1. [Create the index]({{< relref "commands/ft.create" >}}) on each instance of the database. 1. If you are using [synonyms]({{< relref "/develop/ai/search-and-query/advanced-concepts/synonyms" >}}), you need to add them to each replica. 1. The index is maintained by each instance outside of the database keyspace, so only updates to the hashes in the databases are synchronized. diff --git a/content/operate/rs/databases/active-active/create.md b/content/operate/rs/databases/active-active/create.md index c2bc8d1247..2fdda48049 100644 --- a/content/operate/rs/databases/active-active/create.md +++ b/content/operate/rs/databases/active-active/create.md @@ -134,14 +134,13 @@ for this database. Minimum RAM is 10%. Maximum RAM is 50%. - **Memory eviction** - The default [eviction policy]({{}}) for Active-Active databases is `noeviction`. Redis Enterprise versions 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{}}) is enabled. -- [**Capabilities**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) (previously **Modules**) - When you create a new in-memory database, you can enable multiple Redis Stack capabilities in the database. For Auto Tiering databases, you can enable capabilities that support Auto Tiering. See [Redis Enterprise and Redis Stack feature compatibility +- [**Capabilities**]({{< relref "/operate/oss_and_stack/stack-with-enterprise" >}}) (previously **Modules**) - When you create a new in-memory database, you can enable additional capabilities in the database. You cannot enable them after database creation. + + Active-Active databases created with or upgraded to Redis version 8 or later automatically enable [search and query]({{}}) and [JSON]({{}}), which allows you to index, query, and perform full-text searches of nested JSON documents. + + For Auto Tiering databases, you can enable capabilities that support Auto Tiering. See [Redis Enterprise and Redis Stack feature compatibility ]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) for compatibility details. - - {{}} -To use Redis Stack capabilities, enable them when you create a new database. -You cannot enable them after database creation. - {{}} - + To add capabilities to the database: 1. In the **Capabilities** section, select one or more capabilities. diff --git a/content/operate/rs/databases/active-active/develop/data-types/json.md b/content/operate/rs/databases/active-active/develop/data-types/json.md index 5aad07742c..9503ef840d 100644 --- a/content/operate/rs/databases/active-active/develop/data-types/json.md +++ b/content/operate/rs/databases/active-active/develop/data-types/json.md @@ -21,7 +21,7 @@ To use JSON in an Active-Active database, you must enable JSON during database c Active-Active Redis Cloud databases add JSON by default. See [Create an Active-Active subscription]({{< relref "/operate/rc/databases/create-database/create-active-active-database#select-capabilities" >}}) in the Redis Cloud documentation for details. -In Redis Enterprise Software, JSON is not enabled by default for Active-Active databases. See [Create an Active-Active JSON database]({{< relref "/operate/oss_and_stack/stack-with-enterprise/json/active-active#create-an-active-active-json-database" >}}) in the Redis Stack and Redis Enterprise documentation for instructions. +In Redis Enterprise Software, Active-Active databases created with or upgraded to Redis version 8 or later automatically enable JSON. For earlier Redis versions, see [Create an Active-Active JSON database]({{< relref "/operate/oss_and_stack/stack-with-enterprise/json/active-active#create-an-active-active-json-database" >}}) in the Redis Stack and Redis Enterprise documentation for instructions. {{}} diff --git a/content/operate/rs/databases/active-active/planning.md b/content/operate/rs/databases/active-active/planning.md index ed033ddba2..54c2d4f825 100644 --- a/content/operate/rs/databases/active-active/planning.md +++ b/content/operate/rs/databases/active-active/planning.md @@ -72,9 +72,9 @@ See [Synchronizing cluster node clocks]({{< relref "/operate/rs/clusters/configu ## Redis modules {#redis-modules} Several Redis modules are compatible with Active-Active databases. Find the list of [compatible Redis modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}). -{{< note >}} -Starting with v6.2.18, you can index, query, and perform full-text searches of nested JSON documents in Active-Active databases by combining RedisJSON and RediSearch. -{{< /note >}} + +Active-Active databases created with or upgraded to Redis version 8 or later automatically enable [search and query]({{}}) and [JSON]({{}}), which allows you to index, query, and perform full-text searches of nested JSON documents. + ## Limitations diff --git a/content/operate/rs/databases/configure/_index.md b/content/operate/rs/databases/configure/_index.md index 8d8683fd86..7f63120a74 100644 --- a/content/operate/rs/databases/configure/_index.md +++ b/content/operate/rs/databases/configure/_index.md @@ -83,6 +83,10 @@ after the database is created. When you create a new in-memory database, you can enable multiple Redis Stack [**Capabilities**]({{}}). +Databases created with or upgraded to Redis version 8 or later automatically enable the capabilities (modules) bundled with Redis Enterprise Software as follows: + +{{}} + For Auto Tiering databases, you can enable capabilities that support Auto Tiering. See [Redis Enterprise and Redis Stack feature compatibility ]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) for compatibility details. diff --git a/content/operate/rs/databases/create.md b/content/operate/rs/databases/create.md index ac2e84a3e4..35203f5bd9 100644 --- a/content/operate/rs/databases/create.md +++ b/content/operate/rs/databases/create.md @@ -55,6 +55,10 @@ To quickly create a database and skip additional configuration options during in - Capabilities (previously modules) to enable + Databases created with Redis version 8 or later automatically enable the capabilities (modules) bundled with Redis Enterprise Software as follows: + + {{}} + 1. Optionally select **Full options** to configure [additional settings]({{< relref "/operate/rs/databases/configure#config-settings" >}}). 1. Select **Create**. diff --git a/content/operate/rs/databases/recover.md b/content/operate/rs/databases/recover.md index 83e223fb87..9537fbac5b 100644 --- a/content/operate/rs/databases/recover.md +++ b/content/operate/rs/databases/recover.md @@ -23,7 +23,6 @@ The database recovery process includes: 1. If the cluster failed, [recover the cluster]({{< relref "/operate/rs/clusters/cluster-recovery.md" >}}). 1. Identify recoverable databases. -1. Verify the module versions used by any databases are installed on the cluster. 1. Restore the database data. 1. Verify that the databases are active. @@ -71,76 +70,6 @@ of the configuration and persistence files on each of the nodes. If you cannot resolve the issues, contact [Redis support](https://redis.com/company/support/). -1. Verify the module versions used by any recoverable databases are installed on the cluster: - - 1. Check which module versions are currently installed on the cluster using one of the following methods: - - {{< multitabs id="get-module-versions" - tab1="Cluster Manager UI" - tab2="rladmin" - tab3="REST API" >}} - -In the Cluster Manager UI, go to **Cluster > Modules**. - --tab-sep- - -Run [`rladmin status modules`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-modules" >}}): - -```sh -rladmin status modules -``` - --tab-sep- - -Send a [`GET /v1/modules`]({{< relref "/operate/rs/references/rest-api/requests/modules#list-modules" >}}) request: - -```sh -GET https://:/v1/modules -``` - - {{< /multitabs >}} - - 1. Identify the module versions required by the recoverable databases. To do so, run [`rladmin status modules`]({{< relref "/operate/rs/references/cli-utilities/rladmin/status#status-modules" >}}) and check the `DATABASE MODULES` section for the module versions listed for the recoverable databases: - - ```sh - rladmin status modules extra all - ``` - - 1. Download any missing modules versions from the [Redis download center](https://redis.io/downloads/#tools). - - 1. [Install the downloaded modules on the cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) using one of the following methods: - - {{< multitabs id="install-modules" - tab1="Cluster Manager UI" - tab2="REST API" >}} - -To add a module to the cluster using the Cluster Manager UI: - -1. Go to **Cluster > Modules**. - -1. Select **Upload module**. - -1. Use the file browser to add the packaged module. - --tab-sep- - -To add a module to the cluster using the REST API: - -1. Copy the module package to a node in the cluster. - -1. Add the module to the cluster with a [`POST` request to the `/v2/modules`]({{< relref "/operate/rs/references/rest-api/requests/modules#post-module-v2" >}}) endpoint: - - ```sh - POST https://[host][:port]/v2/modules - "module=@/tmp/redisearch.Linux-ubuntu16.04-x86_64.2.2.6.zip" - ``` - - Here, the *module* parameter specifies the full path of the module package and must be submitted as form-data. In addition, the package must be available and accessible to the server processing the request. - -1. If the module installation succeeds, the `POST` request returns a [JSON object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}) that represents the new module. If it fails, it may return a JSON object with an `error_code` and `description` with more details. - - {{< /multitabs >}} - 1. Recover the database using one of the following [`rladmin recover`]({{< relref "/operate/rs/references/cli-utilities/rladmin/recover" >}}) commands: - Recover all databases from the persistence files located in the persistent storage drives: diff --git a/content/operate/rs/installing-upgrading/upgrading/upgrade-os.md b/content/operate/rs/installing-upgrading/upgrading/upgrade-os.md index 8813c20b99..16965fc7cd 100644 --- a/content/operate/rs/installing-upgrading/upgrading/upgrade-os.md +++ b/content/operate/rs/installing-upgrading/upgrading/upgrade-os.md @@ -22,43 +22,6 @@ Before you upgrade a cluster's operating system: To learn which versions of Redis Enterprise Software support specific OS versions, see [Supported platforms]({{< relref "/operate/rs/references/supported-platforms#supported-platforms" >}}). -1. If the cluster contains any databases that use modules: - - 1. Update all nodes in the cluster to [Redis Enterprise Software version 7.2.4-52]({{< relref "/operate/rs/release-notes/rs-7-2-4-releases" >}}) or later before you upgrade the OS. - - 1. Check the status of modules using [`rladmin`]({{< relref "/operate/rs/references/cli-utilities/rladmin" >}}): - - ```sh - rladmin status modules - ``` - - The output lists the module versions installed on the cluster and the module versions used by existing databases: - - ```sh - CLUSTER MODULES: - MODULE VERSION - RedisBloom 2.6.3 - RediSearch 2 2.8.4 - RedisGears 2.0.12 - RedisGraph 2.10.12 - RedisJSON 2.6.6 - RedisTimeSeries 1.10.6 - - DATABASE MODULES: - DB:ID NAME MODULE VERSION ARGS STATUS - db:1 db1 RediSearch 2 2.6.9 PARTITIONS AUTO OK, OLD MODULE VERSION - db:1 db1 RedisJSON 2.4.7 OK, OLD MODULE VERSION - ``` - - 1. Upload module packages for the target OS version to a node in the existing cluster. See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) for instructions. - - {{}} -The uploaded module packages have the following requirements: - -- The module is compiled for the target OS version. - -- The module version matches the version currently used by databases. - {{}} 1. If the cluster uses custom directories, make sure the OS upgrade version also supports custom directories, and specify the same custom directories during installation for all nodes. See [Customize installation directories]({{< relref "/operate/rs/installing-upgrading/install/customize-install-directories" >}}) for details. diff --git a/content/operate/rs/references/rest-api/objects/module.md b/content/operate/rs/references/rest-api/objects/module.md index 5137031d6e..27edf313da 100644 --- a/content/operate/rs/references/rest-api/objects/module.md +++ b/content/operate/rs/references/rest-api/objects/module.md @@ -30,11 +30,9 @@ Represents a [Redis module]({{< relref "/operate/oss_and_stack/stack-with-enterp | homepage | string | Module's homepage | | is_bundled | boolean | Whether module came bundled with a version of Redis Enterprise | | license | string | Module is distributed under this license | -| min_redis_pack_version | string | Minimum Redis Enterprise Software cluster version required by this module | | min_redis_version | string | Minimum Redis database version required by this module. Only relevant for Redis databases earlier than v7.4. | | module_file | string | Module filename | | module_name | string | Module's name
Values:
`search`
`ReJSON`
`timeseries`
`bf` | -| platforms | platforms object | Mapping operating system and architecture to module information (read-only) | | semantic_version | string | Module's semantic version | | sha256 | string | SHA256 of module binary (deprecated) | | version | integer | Module's version | diff --git a/content/operate/rs/references/rest-api/objects/module_metadata.md b/content/operate/rs/references/rest-api/objects/module_metadata.md index df4026bb2b..728ea00605 100644 --- a/content/operate/rs/references/rest-api/objects/module_metadata.md +++ b/content/operate/rs/references/rest-api/objects/module_metadata.md @@ -15,7 +15,6 @@ Represents a [Redis module]({{< relref "/operate/oss_and_stack/stack-with-enterp | Name | Type/Value | Description | |------|------------|-------------| | uid | string | Cluster unique ID of module | -| architecture | string | Module was compiled under this architecture | | author | string | Module creator | | bigstore_version_2_support | boolean (default: false) | Whether the module supports bigstore_version_2 capability, bypassing capability validation (optional) | | capabilities | array of strings | List of capabilities supported by this module | @@ -30,7 +29,6 @@ Represents a [Redis module]({{< relref "/operate/oss_and_stack/stack-with-enterp | email | string | Author's email address | | homepage | string | Module's homepage | | license | string | Module is distributed under this license | -| min_redis_pack_version | string | Minimum Redis Enterprise Software cluster version required by this module | | min_redis_version | string | Minimum Redis database version required by this module. Only relevant for Redis databases earlier than v7.4. | | module_file | string | Module filename | | module_name | string | Module's name | diff --git a/content/operate/rs/references/rest-api/permissions.md b/content/operate/rs/references/rest-api/permissions.md index eb13ae617c..639a9cba4e 100644 --- a/content/operate/rs/references/rest-api/permissions.md +++ b/content/operate/rs/references/rest-api/permissions.md @@ -34,7 +34,7 @@ Available management roles include: | Role | Permissions | |------|-------------| | none | No permissions | -| admin | [add_cluster_module](#add_cluster_module), [cancel_cluster_action](#cancel_cluster_action), [cancel_node_action](#cancel_node_action), [config_ldap](#config_ldap), [config_ocsp](#config_ocsp), [create_bdb](#create_bdb), [create_crdb](#create_crdb), [create_ldap_mapping](#create_ldap_mapping), [create_new_user](#create_new_user), [create_redis_acl](#create_redis_acl), [create_role](#create_role), [delete_bdb](#delete_bdb), [delete_cluster_module](#delete_cluster_module), [delete_crdb](#delete_crdb), [delete_ldap_mapping](#delete_ldap_mapping), [delete_redis_acl](#delete_redis_acl), [delete_role](#delete_role), [delete_user](#delete_user), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [install_new_license](#install_new_license), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [start_cluster_action](#start_cluster_action), [start_node_action](#start_node_action), [test_ocsp_status](#test_ocsp_status), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_cluster](#update_cluster), [update_crdb](#update_crdb), [update_ldap_mapping](#update_ldap_mapping), [update_node](#update_node), [update_proxy](#update_proxy), [update_redis_acl](#update_redis_acl), [update_role](#update_role), [update_user](#update_user), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_ldap_mappings_info](#view_all_ldap_mappings_info), [view_all_metrics](#view_all_metrics), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_all_users_info](#view_all_users_info), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_ldap_config](#view_ldap_config), [view_ldap_mapping_info](#view_ldap_mapping_info), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_ocsp_config](#view_ocsp_config), [view_ocsp_status](#view_ocsp_status), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action), [view_user_info](#view_user_info) | +| admin | [add_cluster_module](#add_cluster_module), [cancel_cluster_action](#cancel_cluster_action), [cancel_node_action](#cancel_node_action), [config_ldap](#config_ldap), [config_ocsp](#config_ocsp), [create_bdb](#create_bdb), [create_crdb](#create_crdb), [create_ldap_mapping](#create_ldap_mapping), [create_new_user](#create_new_user), [create_redis_acl](#create_redis_acl), [create_role](#create_role), [delete_bdb](#delete_bdb), [delete_cluster_module](#delete_cluster_module), [delete_crdb](#delete_crdb), [delete_ldap_mapping](#delete_ldap_mapping), [delete_redis_acl](#delete_redis_acl), [delete_role](#delete_role), [delete_user](#delete_user), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [install_new_license](#install_new_license), [manage_cluster_modules](#manage_cluster_modules), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [start_cluster_action](#start_cluster_action), [start_node_action](#start_node_action), [test_ocsp_status](#test_ocsp_status), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_cluster](#update_cluster), [update_crdb](#update_crdb), [update_ldap_mapping](#update_ldap_mapping), [update_node](#update_node), [update_proxy](#update_proxy), [update_redis_acl](#update_redis_acl), [update_role](#update_role), [update_user](#update_user), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_ldap_mappings_info](#view_all_ldap_mappings_info), [view_all_metrics](#view_all_metrics), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_all_users_info](#view_all_users_info), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_ldap_config](#view_ldap_config), [view_ldap_mapping_info](#view_ldap_mapping_info), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_ocsp_config](#view_ocsp_config), [view_ocsp_status](#view_ocsp_status), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action), [view_user_info](#view_user_info) | | cluster_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_metrics](#view_all_metrics), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_keys](#view_cluster_keys), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | | cluster_viewer | [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_metrics](#view_all_metrics), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | | db_member | [create_bdb](#create_bdb), [create_crdb](#create_crdb), [delete_bdb](#delete_bdb), [delete_crdb](#delete_crdb), [edit_bdb_module](#edit_bdb_module), [failover_shard](#failover_shard), [flush_crdb](#flush_crdb), [migrate_shard](#migrate_shard), [purge_instance](#purge_instance), [reset_bdb_current_backup_status](#reset_bdb_current_backup_status), [reset_bdb_current_export_status](#reset_bdb_current_export_status), [reset_bdb_current_import_status](#reset_bdb_current_import_status), [start_bdb_export](#start_bdb_export), [start_bdb_import](#start_bdb_import), [start_bdb_recovery](#start_bdb_recovery), [update_bdb](#update_bdb), [update_bdb_alerts](#update_bdb_alerts), [update_bdb_with_action](#update_bdb_with_action), [update_crdb](#update_crdb), [view_all_bdb_stats](#view_all_bdb_stats), [view_all_bdbs_alerts](#view_all_bdbs_alerts), [view_all_bdbs_info](#view_all_bdbs_info), [view_all_nodes_alerts](#view_all_nodes_alerts), [view_all_nodes_checks](#view_all_nodes_checks), [view_all_nodes_info](#view_all_nodes_info), [view_all_nodes_stats](#view_all_nodes_stats), [view_all_proxies_info](#view_all_proxies_info), [view_all_redis_acls_info](#view_all_redis_acls_info), [view_all_roles_info](#view_all_roles_info), [view_all_shard_stats](#view_all_shard_stats), [view_bdb_alerts](#view_bdb_alerts), [view_bdb_info](#view_bdb_info), [view_bdb_recovery_plan](#view_bdb_recovery_plan), [view_bdb_stats](#view_bdb_stats), [view_cluster_alerts](#view_cluster_alerts), [view_cluster_info](#view_cluster_info), [view_cluster_modules](#view_cluster_modules), [view_cluster_stats](#view_cluster_stats), [view_crdb](#view_crdb), [view_crdb_list](#view_crdb_list), [view_crdb_task](#view_crdb_task), [view_crdb_task_list](#view_crdb_task_list), [view_debugging_info](#view_debugging_info), [view_endpoint_stats](#view_endpoint_stats), [view_license](#view_license), [view_logged_events](#view_logged_events), [view_node_alerts](#view_node_alerts), [view_node_check](#view_node_check), [view_node_info](#view_node_info), [view_node_stats](#view_node_stats), [view_proxy_info](#view_proxy_info), [view_redis_acl_info](#view_redis_acl_info), [view_redis_pass](#view_redis_pass), [view_role_info](#view_role_info), [view_shard_stats](#view_shard_stats), [view_status_of_all_node_actions](#view_status_of_all_node_actions), [view_status_of_cluster_action](#view_status_of_cluster_action), [view_status_of_node_action](#view_status_of_node_action) | @@ -68,6 +68,7 @@ Available management roles include: | failover_shard | admin
cluster_member
db_member | | flush_crdb | admin
cluster_member
db_member | | install_new_license | admin
user_manager | +| manage_cluster_modules | admin | | migrate_shard | admin
cluster_member
db_member | | purge_instance | admin
cluster_member
db_member | | reset_bdb_current_backup_status | admin
cluster_member
db_member | diff --git a/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md b/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md index 3761fa5494..18e7db9db9 100644 --- a/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md +++ b/content/operate/rs/references/rest-api/requests/bdbs/upgrade.md @@ -9,6 +9,7 @@ description: Database upgrade requests headerRange: '[1-2]' linkTitle: upgrade weight: $weight +aliases: /operate/rs/references/rest-api/requests/modules/upgrade/ --- | Method | Path | Description | diff --git a/content/operate/rs/references/rest-api/requests/modules/_index.md b/content/operate/rs/references/rest-api/requests/modules/_index.md index a6b7725423..f7de54fb89 100644 --- a/content/operate/rs/references/rest-api/requests/modules/_index.md +++ b/content/operate/rs/references/rest-api/requests/modules/_index.md @@ -16,10 +16,6 @@ weight: $weight |--------|------|-------------| | [GET](#list-modules) | `/v1/modules` | List available modules | | [GET](#get-module) | `/v1/modules/{uid}` | Get a specific module | -| [POST](#post-module) | `/v1/modules` | Upload a new module (deprecated) | -| [POST](#post-module-v2) | `/v2/modules` | Upload a new module | -| [DELETE](#delete-module) | `/v1/modules/{uid}` | Delete a module (deprecated) | -| [DELETE](#delete-module-v2) | `/v2/modules/{uid}` | Delete a module | ## List modules {#list-modules} @@ -105,307 +101,3 @@ Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/mo |------|-------------| | [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error | | [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Module does not exist. | - -## Upload module v1 {#post-module} - -```sh -POST /v1/modules -``` - -{{}} -`POST /v1/modules` is deprecated as of Redis Enterprise Software version 7.2. Use [`POST /v2/modules`](#post-module-v2) instead. -{{}} - -Uploads a new module to the cluster. - -The request must contain a Redis module, bundled using [RedisModule -Packer](https://github.com/RedisLabs/RAMP). For modules in Redis Stack, download the module from the [download center](https://redis.io/downloads/). - -See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster#rest-api-method" >}}) for more information. - -#### Permissions - -| Permission name | Roles | -|-----------------|-------| -| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | - -### Request {#post-request} - -#### Example HTTP request - -```sh -POST /v1/modules -``` - -#### Headers - -| Key | Value | Description | -|-----|-------|-------------| -| Host | string | Domain name | -| Accept | \*/\* | Accepted media type | -| Content-Length | integer | Length of the request body in octets | -| Expect | 100-continue | Requires particular server behaviors | -| Content-Type | multipart/form-data | Media type of request/response body | - -### Response {#post-response} - -Returns a status code. If an error occurs, the response body may include an error code and message with more details. - -#### Error codes {#post-error-codes} - -The server may return a JSON object with `error_code` and `message` fields that provide additional information. The following are possible `error_code` values: - -| Code | Description | -|------|-------------| -| no_module | Module wasn't provided or could not be found | -| invalid_module | Module either corrupted or packaged files are wrong | -| module_exists | Module already in system | -| min_redis_pack_version | Module isn't supported yet in this Redis pack | -| unsupported_module_capabilities | The module does not support required capabilities| -| os_not_supported | This module is not supported for this operating system | -| dependencies_not_supported | This endpoint does not support dependencies, see v2 | - -#### Status codes {#post-status-codes} - -| Code | Description | -|------|-------------| -| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Either missing module file or an invalid module file. | - -### Examples - -#### cURL - -```sh -$ curl -k -u "[username]:[password]" -X POST - -F "module=@/tmp/rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip" - https://[host][:port]/v1/modules -``` - -#### Python - -```python -import requests - -url = "https://[host][:port]/v1/modules" - -files=[ - ('module', - ('rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip', - open('/tmp/rejson.Linux-ubuntu18.04-x86_64.2.0.8.zip','rb'), - 'application/zip') - ) -] -auth=("[username]", "[password]") - -response = requests.request("POST", url, - auth=auth, files=files, verify=False) - -print(response.text) -``` - -## Upload module v2 {#post-module-v2} - -```sh -POST /v2/modules -``` - -Asynchronously uploads a new module to the cluster. - -The request must contain a Redis module bundled using [RedisModule Packer](https://github.com/RedisLabs/RAMP). - -For modules in Redis Stack, download the module from the [download center](https://redis.io/downloads/). See [Install a module on a cluster]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster#rest-api-method" >}}) for more information. - -#### Permissions - -| Permission name | Roles | -|-----------------|-------| -| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | - -### Request {#post-request-v2} - -#### Example HTTP request - -```sh -POST /v2/modules -``` - -#### Headers - -| Key | Value | Description | -|-----|-------|-------------| -| Host | string| Domain name | -| Accept | \*/\* | Accepted media type | -| Content-Length | integer | Length of the request body in octets | -| Expect | 100-continue | Requires particular server behaviors | -| Content-Type | multipart/form-data; | Media type of request/response body | - -### Response {#post-response-v2} - -Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}) with an additional `action_uid` field. - -You can use the `action_uid` to track the progress of the module upload. - -#### Example JSON body - -```json -{ - "action_uid":"dfc0152c-8449-4b1c-9184-480ea7cb526c", - "author":"RedisLabs", - "capabilities":[ - "types", - "crdb", - "failover_migrate", - "persistence_aof", - "persistence_rdb", - "clustering", - "backup_restore" - ], - "command_line_args":"Plugin gears_python CreateVenv 1", - "config_command":"RG.CONFIGSET", - "dependencies":{ - "gears_jvm":{ - "sha256":"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", - "url":"http://example.com/redisgears_plugins/jvm_plugin/gears-jvm.linux-centos7-x64.0.1.0.tgz" - }, - "gears_python":{ - "sha256":"22dca9cd75484cb15b8130db37f5284e22e3759002154361f72f6d2db46ee682", - "url":"http://example.com/redisgears-python.linux-centos7-x64.1.2.1.tgz" - } - }, - "description":"Dynamic execution framework for your Redis data", - "display_name":"RedisGears", - "email":"user@example.com", - "homepage":"http://redisgears.io", - "is_bundled":false, - "license":"Redis Source Available License Agreement", - "min_redis_pack_version":"6.0.0", - "min_redis_version":"6.0.0", - "module_name":"rg", - "semantic_version":"1.2.1", - "sha256":"2935ea53611803c8acf0015253c5ae1cd81391bbacb23e14598841e1edd8d28b", - "uid":"98f255d5d33704c8e4e97897fd92e32d", - "version":10201 -} -``` - -### Error codes {#post-error-codes-v2} - -The server may return a JSON object with `error_code` and `message` fields that provide additional information. - -Possible `error_code` values include [`/v1/modules` error codes](#post-error-codes) and the following: - -| Code | Description | -|------|-------------| -| invalid_dependency_data | Provided dependencies have an unexpected format | - -### Status codes {#post-status-codes-v2} - -| Code | Description | -|------|-------------| -| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, scheduled module upload. | -| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Module name or version does not exist. | -| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Dependency not found. | -| [500 Internal Server Error](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Failed to get dependency. | - -## Delete module v1 {#delete-module} - -```sh -DELETE /v1/modules/{string: uid} -``` - -{{}} -`DELETE /v1/modules` is deprecated as of Redis Enterprise Software version 7.2. Use [`DELETE /v2/modules`](#delete-module-v2) instead. -{{}} - -Delete a module. - -#### Permissions - -| Permission name | Roles | -|-----------------|-------| -| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | - -### Request {#delete-request} - -#### Example HTTP request - -```sh -DELETE /v1/modules/1 -``` - -#### Headers - -| Key | Value | Description | -|-----|-------|-------------| -| Host | cnm.cluster.fqdn | Domain name | -| Accept | application/json | Accepted media type | - -#### URL parameters - -| Field | Type | Description | -|-------|------|-------------| -| uid | integer | The module's unique ID. | - -### Response {#delete-response} - -Returns a status code to indicate module deletion success or failure. - -#### Error codes {#delete-error-codes} - -| Code | Description | -|------|-------------| -| dependencies_not_supported | You can use the following API endpoint to delete this module with its dependencies: [`/v2/modules/`](#delete-module-v2) | - -#### Status codes {#delete-status-codes} - -| Code | Description | -|------|-------------| -| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, the module is deleted. | -| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent module. | -| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The request is not acceptable. | - -## Delete module v2 {#delete-module-v2} - -```sh -DELETE /v2/modules/{string: uid} -``` - -Delete a module. - -#### Permissions - -| Permission name | Roles | -|-----------------|-------| -| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | - -### Request {#delete-request-v2} - -#### Example HTTP request - -```sh -DELETE /v2/modules/1 -``` - -#### Headers - -| Key | Value | Description | -|-----|-------|-------------| -| Host | cnm.cluster.fqdn | Domain name | -| Accept | application/json | Accepted media type | - -#### URL parameters - -| Field | Type | Description | -|-------|------|-------------| -| uid | integer | The module's unique ID. | - -### Response {#delete-response-v2} - -Returns a JSON object with an `action_uid` that allows you to track the progress of module deletion. - -#### Status codes {#delete-status-codes-v2} - -| Code | Description | -|------|-------------| -| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, scheduled module deletion. | -| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Attempting to delete a nonexistent module. | diff --git a/content/operate/rs/references/rest-api/requests/modules/upgrade.md b/content/operate/rs/references/rest-api/requests/modules/upgrade.md deleted file mode 100644 index 39880ac4a5..0000000000 --- a/content/operate/rs/references/rest-api/requests/modules/upgrade.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -Title: Upgrade module requests -alwaysopen: false -categories: -- docs -- operate -- rs -description: Upgrade module requests -headerRange: '[1-2]' -linkTitle: upgrade/bdb -weight: $weight ---- - -| Method | Path | Description | -|--------|------|-------------| -| [POST](#post-modules-upgrade-bdb) | `/v1/modules/upgrade/bdb/{uid}` | Upgrade module | - -## Upgrade module {#post-modules-upgrade-bdb} - - POST /v1/modules/upgrade/bdb/{string: uid} - -Upgrades the module version on a specific database. Deprecated as of Redis Enterprise Software v7.8.2. Use [`POST /v1/bdbs//upgrade`]({{}}) instead. - -#### Required permissions - -| Permission name | -|-----------------| -| [edit_bdb_module]({{< relref "/operate/rs/references/rest-api/permissions#edit_bdb_module" >}}) | - -### Request {#post-request} - -#### Example HTTP request - - POST /v1/modules/upgrade/bdb/1 - -#### Example JSON body - -```json -{ - "modules": [ - {"module_name": "ReJson", - "current_semantic_version": "2.2.1", - "new_module": "aa3648d79bd4082d414587c42ea0b234"} - ], - "// Optional fields to fine-tune restart and failover behavior:", - "preserve_roles": true, - "may_discard_data": false -} -``` - -#### Request headers - -| Key | Value | Description | -|-----|-------|-------------| -| Host | cnm.cluster.fqdn | Domain name | -| Accept | application/json | Accepted media type | - - -#### Request body - -| Field | Type | Description | -|-------|------|-------------| -| modules | list | List of dicts representing the modules that will be upgraded. Each dict must include:

• **current_module**: UID of a module to upgrade

• **new_module**: UID of the module we want to upgrade to

• **new_module_args**: args list for the new module | -| preserve_roles | boolean | Preserve shards’ master/replica roles (optional) | -| may_discard_data | boolean | Discard data in a non-replicated non-persistent database (optional) | - -### Response {#post-response} - -Returns the upgraded [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}). - -#### Example JSON body - -```json -{ - "uid": 1, - "name": "name of database #1", - "module_id": "aa3648d79bd4082d414587c42ea0b234", - "module_name": "ReJson", - "semantic_version": "2.2.2" - "// additional fields..." -} -``` - -### Error codes {#post-error-codes} - -When errors are reported, the server may return a JSON object with `error_code` and `message` field that provide additional information. The following are possible `error_code` values: - -| Code | Description | -|------|-------------| -| missing_module | Module is not present in cluster.| -| module_downgrade_unsupported | Module downgrade is not allowed.| -| redis_incompatible_version | Module min_redis_version is bigger than the current Redis version.| -| redis_pack_incompatible_version | Module min_redis_pack_version is bigger than the current Redis Enterprise version.| -| unsupported_module_capabilities | New version of module does support all the capabilities needed for the database configuration| - -### Status codes {#post-status-codes} - -| Code | Description | -|------|-------------| -| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | Success, module updated on bdb. | -| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | bdb or node not found. | -| [400 Bad Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad or missing configuration parameters. | -| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | The requested configuration is invalid. | diff --git a/content/operate/rs/references/rest-api/requests/modules/user-defined.md b/content/operate/rs/references/rest-api/requests/modules/user-defined.md new file mode 100644 index 0000000000..8994409faf --- /dev/null +++ b/content/operate/rs/references/rest-api/requests/modules/user-defined.md @@ -0,0 +1,303 @@ +--- +Title: User-defined module requests +alwaysopen: false +categories: +- docs +- operate +- rs +description: Custom, user-defined Redis module requests +headerRange: '[1-2]' +linkTitle: user-defined +weight: $weight +--- + +| Method | Path | Description | +|--------|------|-------------| +| [GET](#get-local-user-defined-artifacts) | /v2/local/modules/user-defined/artifacts | List custom module artifacts on a node | +| [POST](#post-user-defined-module) | /v2/modules/user-defined | Upload custom module configuration | +| [POST](#post-local-user-defined-artifacts) | /v2/local/modules/user-defined/artifacts | Upload a custom module artifact to a node | +| [DELETE](#delete-user-defined-module) | /v2/modules/user-defined/ | Delete a custom module configuration | +| [DELETE](#delete-local-user-defined-artifacts) | /v2/local/modules/user-defined/artifacts// | Delete a custom module artifact from a node | + +## List custom module artifacts {#get-local-user-defined-artifacts} + +```sh +GET /v2/local/modules/user-defined/artifacts +``` + +Returns a list of all custom module artifacts on the local node. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [view_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_modules" >}}) | admin
cluster_member
cluster_viewer
db_member
db_viewer
user_manager | + +### Request {#get-local-artifacts-request} + +#### Example HTTP request + +```sh +GET /v2/local/modules/user-defined/artifacts +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | \*/\* | Accepted media type | + +### Response {#get-local-artifacts-response} + +Returns a JSON array of custom module artifacts. + +#### Example JSON body + +```json +[ + { + "module_name": "TestModule", + "version": 123, + "dependencies": [ + "dep_1", + "dep_2" + ] + } +] +``` + +### Status codes {#get-local-artifacts-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, returns list of artifacts | + +## Upload custom module configuration {#post-user-defined-module} + +```sh +POST /v2/modules/user-defined +``` + +Creates a module object in the cluster configuration store (CCS). After calling this endpoint, you still need to upload the module's `.so` file to each node by calling [`POST /v2/local/modules/user-defined/artifacts`](#post-local-user-defined-artifacts) on each node. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [manage_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#manage_cluster_modules" >}}) | admin | + +### Request {#post-user-defined-request} + +#### Example HTTP request + +```sh +POST /v2/modules/user-defined +``` + +#### Example JSON body + +```json +{ + "module_name": "TestModule", + "version": 1, + "semantic_version": "0.0.1", + "display_name": "test module", + "commands": [ + { + "command_arity": -1, + "command_name": "json.arrtrim", + "first_key": 1, + "flags": ["write"], + "last_key": 1, + "step": 1 + } + ], + "command_line_args": "", + "capabilities": ["list", "of", "capabilities"], + "min_redis_version": "2.1" +} +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### Request body + +The request body is a JSON object that must contain the following fields: + +| Field | Type | Description | +|-------|------|-------------| +| module_name | string | Name of the module | +| version | integer | Module version number | +| semantic_version | string | Module's semantic version | +| display_name | string | Display name for the module | +| commands | array of objects | List of commands provided by the module | +| command_line_args | string | Command line arguments for the module | +| capabilities | array of strings | List of capabilities supported by the module | +| min_redis_version | string | Minimum Redis version required | + +### Response {#post-user-defined-response} + +Returns a [module object]({{< relref "/operate/rs/references/rest-api/objects/module" >}}). + +#### Example JSON body + +```json +{ + "author": "author name", + "uid": "1952fcf9a5109fb59e61b1ad4d7e2d88" + // additional fields... +} +``` + +### Status codes {#post-user-defined-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, the module was created in the CCS. | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | There was an issue with the module object, such as missing required fields or invalid values. | + +## Upload custom module artifact to a node {#post-local-user-defined-artifacts} + +```sh +POST /v2/local/modules/user-defined/artifacts +``` + +A local API to upload a custom module's artifact to the current node. You must call this API on each cluster node. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [manage_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#manage_cluster_modules" >}}) | admin | + +### Request {#post-local-artifacts-request} + +#### Example HTTP request + +```sh +POST /v2/local/modules/user-defined/artifacts +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | 127.0.0.1:9443 | Domain name | +| Accept | \*/\* | Accepted media type | +| Content-Length | 865 | Length of the request body in octets | +| Expect | 100-continue | Requires particular server behaviors | +| Content-Type | multipart/form-data; boundary=------------------------4751ac3b332ace13 | Media type of request/response body | + +### Response {#post-local-artifacts-response} + +Returns a status code to indicate upload success or failure. + +### Status codes {#post-local-artifacts-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, module artifact uploaded to local node | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Missing or bad artifact | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | There was an issue with the module object artifact, such as bad metadata | + +## Delete custom module {#delete-user-defined-module} + +```sh +DELETE /v2/modules/user-defined/{string: uid} +``` + +Delete a module object from the cluster configuration store (CCS). This REST API request does not delete the module artifact from the nodes, so you also need to call [`DELETE /v2/local/modules/user-defined/artifacts//`](#delete-local-user-defined-artifacts) on each node. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [manage_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#manage_cluster_modules" >}}) | admin | + +### Request {#delete-user-defined-request} + +#### Example HTTP request + +```sh +DELETE /v2/modules/user-defined/1 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| uid | string | The module's unique ID | + +### Response {#delete-user-defined-response} + +Returns a status code to indicate module deletion success or failure. + +### Status codes {#delete-user-defined-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, the module is deleted. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to delete a non-existing module. | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | The request is not acceptable. | + + +## Delete custom module artifact from a node{#delete-local-user-defined-artifacts} + +```sh +DELETE /v2/local/modules/user-defined/artifacts/{string: module_name}/{int: version} +``` + +A local API to delete a custom module's artifact from the current node. You must call this API on each cluster node. + +#### Permissions + +| Permission name | Roles | +|-----------------|-------| +| [manage_cluster_modules]({{< relref "/operate/rs/references/rest-api/permissions#manage_cluster_modules" >}}) | admin | + +### Request {#delete-local-artifacts-request} + +#### Example HTTP request + +```sh +DELETE /v2/local/modules/user-defined/artifacts/some-custom-module/123 +``` + +#### Headers + +| Key | Value | Description | +|-----|-------|-------------| +| Host | cnm.cluster.fqdn | Domain name | +| Accept | application/json | Accepted media type | + +#### URL parameters + +| Field | Type | Description | +|-------|------|-------------| +| module_name | string | The name of the module artifact to delete | +| version | integer | The version of the module artifact to delete | + +### Response {#delete-local-artifacts-response} + +Returns a status code to indicate deletion success or failure. + +### Status codes {#delete-local-artifacts-status-codes} + +| Code | Description | +|------|-------------| +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success, the module artifact is deleted from the local node. | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to delete a non-existing module. | +| [406 Not Acceptable](https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable) | The request is not acceptable. |