From 33f1087b99a07584382065314afd6bb31270d974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chrz=C4=85szcz?= Date: Fri, 8 Dec 2023 11:48:56 +0100 Subject: [PATCH 1/2] Document migrations for 6.2.0: SQL and Riak --- doc/migrations/6.1.0_6.2.0.md | 10 +++++++++- priv/migrations/mssql_6.1.0_6.2.0.sql | 10 ++++++++++ priv/migrations/mysql_6.1.0_6.2.0.sql | 10 ++++++++++ priv/migrations/pgsql_6.1.0_6.2.0.sql | 10 ++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 priv/migrations/mssql_6.1.0_6.2.0.sql create mode 100644 priv/migrations/mysql_6.1.0_6.2.0.sql create mode 100644 priv/migrations/pgsql_6.1.0_6.2.0.sql diff --git a/doc/migrations/6.1.0_6.2.0.md b/doc/migrations/6.1.0_6.2.0.md index 996f03c6ee8..b1b2aa2c97a 100644 --- a/doc/migrations/6.1.0_6.2.0.md +++ b/doc/migrations/6.1.0_6.2.0.md @@ -3,7 +3,11 @@ So far MongooseIM has been using the internal Mnesia database to replicate the in-memory data between cluster nodes. Now there is an option to use [CETS](https://github.com/esl/cets/) instead. Mnesia is still used by default, so you don't need to change your configuration file. -If you want to switch to CETS, see [`internal_databases`](../configuration/internal-databases.md). +If you want to switch to CETS, see the [tutorial](../tutorials/CETS-configure.md) and the reference for [`internal_databases`](../configuration/internal-databases.md). + +## Database migration + +There is a new table `discovery_nodes` in the database, which is used by CETS for dynamic discovery of cluster nodes. See the migrations for Postgres, MySQL and MSSQL in the [`priv/migrations`](https://github.com/esl/MongooseIM/tree/master/priv/migrations) directory. Although the new table is only needed by CETS, we recommend applying the migration anyway to keep the database in sync with the latest schema. ## Validation of TLS options @@ -22,3 +26,7 @@ For each of the affected sections, if there is any `tls` option present, **make ## Transition to New CLI Commands Legacy CLI commands previously marked as deprecated have now been removed. The users are encouraged to explore the new GraphQL-based CLI. It is recommended to transition to the new CLI commands **prior to the next system upgrade**. The configuration options `general.mongooseimctl_access_commands` and `services.service_admin_extra` related to the legacy CLI were also removed. **You need to remove them** from your configuration file unless you have already done so. + +## Removed support for Riak + +The deprecated and obsolete Riak database is not supported anymore, and you cannot configure it in the [`outgoing_pools`](../configuration/outgoing-connections.md) section. diff --git a/priv/migrations/mssql_6.1.0_6.2.0.sql b/priv/migrations/mssql_6.1.0_6.2.0.sql new file mode 100644 index 00000000000..cc70041415f --- /dev/null +++ b/priv/migrations/mssql_6.1.0_6.2.0.sql @@ -0,0 +1,10 @@ +-- Cluster node discovery used by CETS +CREATE TABLE discovery_nodes ( + cluster_name varchar(250) NOT NULL, + node_name varchar(250) NOT NULL, + node_num INT NOT NULL, + address varchar(250) NOT NULL DEFAULT '', -- empty means we should ask DNS + updated_timestamp BIGINT NOT NULL, -- in seconds + PRIMARY KEY (cluster_name, node_name) +); +CREATE UNIQUE INDEX i_discovery_nodes_node_num ON discovery_nodes(cluster_name, node_num); diff --git a/priv/migrations/mysql_6.1.0_6.2.0.sql b/priv/migrations/mysql_6.1.0_6.2.0.sql new file mode 100644 index 00000000000..71184eecd27 --- /dev/null +++ b/priv/migrations/mysql_6.1.0_6.2.0.sql @@ -0,0 +1,10 @@ +-- Cluster node discovery used by CETS +CREATE TABLE discovery_nodes ( + cluster_name varchar(250) NOT NULL, + node_name varchar(250) NOT NULL, + node_num INT UNSIGNED NOT NULL, + address varchar(250) NOT NULL DEFAULT '', -- empty means we should ask DNS + updated_timestamp BIGINT NOT NULL, -- in seconds + PRIMARY KEY (cluster_name, node_name) +); +CREATE UNIQUE INDEX i_discovery_nodes_node_num USING BTREE ON discovery_nodes(cluster_name, node_num); diff --git a/priv/migrations/pgsql_6.1.0_6.2.0.sql b/priv/migrations/pgsql_6.1.0_6.2.0.sql new file mode 100644 index 00000000000..03bdb981d2b --- /dev/null +++ b/priv/migrations/pgsql_6.1.0_6.2.0.sql @@ -0,0 +1,10 @@ +-- Cluster node discovery used by CETS +CREATE TABLE discovery_nodes ( + cluster_name varchar(250) NOT NULL, + node_name varchar(250) NOT NULL, + node_num INT NOT NULL, + address varchar(250) NOT NULL DEFAULT '', -- empty means we should ask DNS + updated_timestamp BIGINT NOT NULL, -- in seconds + PRIMARY KEY (cluster_name, node_name) +); +CREATE UNIQUE INDEX i_discovery_nodes_node_num ON discovery_nodes USING BTREE(cluster_name, node_num); From 988058ca2132f6f8abf6599a2d78fab29ff36713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chrz=C4=85szcz?= Date: Fri, 8 Dec 2023 11:49:59 +0100 Subject: [PATCH 2/2] Add links to trymongoose.im --- README.md | 1 + doc/index.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 0d83537796c..00f22c436ad 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ * [Packages](https://www.erlang-solutions.com/resources/download.html) * Product page: [https://www.erlang-solutions.com/products/mongooseim.html](https://www.erlang-solutions.com/products/mongooseim.html) * Documentation: [https://esl.github.io/MongooseDocs/](https://esl.github.io/MongooseDocs/latest/) +* Try it now: [https://trymongoose.im](https://trymongoose.im) ## Get to know MongooseIM MongooseIM is a robust, scalable and efficient XMPP server at the core of an Instant Messaging platform aimed at large installations. diff --git a/doc/index.md b/doc/index.md index 0cdf823b66c..8af222accb4 100644 --- a/doc/index.md +++ b/doc/index.md @@ -9,6 +9,7 @@ * Home: [https://github.com/esl/MongooseIM](https://github.com/esl/MongooseIM) * Product page: [https://www.erlang-solutions.com/products/mongooseim.html](https://www.erlang-solutions.com/products/mongooseim.html) * Documentation: [https://esl.github.io/MongooseDocs/](https://esl.github.io/MongooseDocs/) +* Try it now: [https://trymongoose.im](https://trymongoose.im) ## Get to know MongooseIM