❤️💕💕新时代拥抱云原生,云原生具有环境统一、按需付费、即开即用、稳定性强特点。Myblog:http://nsddd.top
[TOC]
OpenIM Helm Charts 用于在 Kubernetes 集群上轻松部署和管理 OpenIM 即时消息通信平台及其相关中间件。
- 已安装并配置好的 Kubernetes(K8s)环境。
- 至少有两个可用的域名:一个用于 MinIO API 访问,另一个用于 OpenIM Server API 访问。
- 已配置的 StorageClass(此示例使用 NFS-Client)。
- (可选)如果您的 K8s 系统的 Ingress Controller 节点配置了 LoadBalancer,所有
-config.yaml
文件中的域名信息无需配置 TLS 项。
注意:下个版本将推出基于单一域名访问和基于 IP 的 URL 访问功能。
要使用这些 Helm Charts,您需要先安装 Helm。请参考 Helm 的 文档 来开始使用 Helm。
一旦 Helm 安装完毕,请按如下方式添加 Helm 仓库:
helm repo add openim https://openim.github.io/helm-charts
接下来,您可以运行 helm search repo openim
来查看可用的 Charts。
helm install [RELEASE_NAME] openim/openim-server
查看下面的配置信息。
有关命令文档,请参考 helm install。
helm uninstall [RELEASE_NAME]
这将删除与 Chart 相关的所有 Kubernetes 组件并卸载发布。
有关命令文档,请参考 helm uninstall。
helm upgrade [RELEASE_NAME] [CHART] --install
有关命令文档,请参考 helm upgrade。
helm list
这个目录包含了 "adminfront" 服务的 Helm Chart。
Chart.yaml
: 包含了 Chart 的基本信息和版本。templates/
: 包含了 Kubernetes 模板文件。values.yaml
: 默认配置文件。
包含了 "adminfront" 服务的自定义配置信息。
这个目录包含了 "chat-server" 服务的 Helm Chart。
Chart.yaml
: 包含了 Chart 的基本信息和版本。charts/
: (可选) 如果 Chart 依赖其他 Chart,可以将它们放在这个目录下。templates/
: 包含了 Kubernetes 模板文件。values.yaml
: 默认配置文件。
这个目录包含了 OpenIM 所依赖的所有中间件的 Helm Charts 或相关配置。
ingress-nginx
,kafka
,minio
,mongodb
,mysql
,nfs-subdir-external-provisioner
,redis
: 这些目录可能包含了对应中间件的 Helm Charts。kafka-config.yaml
,minio-config.yaml
,mongodb-config.yaml
,mysql-config.yaml
,redis-config.yaml
: 这些文件包含了对应中间件的自定义配置。
- 已安装并配置好的 Kubernetes(K8s)环境。
- 至少有两个可用的域名:一个用于 MinIO API 访问,另一个用于 OpenIM Server API 访问。
- 已配置的 StorageClass(此示例使用 NFS-Client)。
- (可选)如果您的 K8s 系统的 Ingress Controller 节点配置了 LoadBalancer,所有
-config.yaml
文件中的域名信息无需配置 TLS 项。
注意:下个版本将推出基于单一域名访问和基于 IP 的 URL 访问功能。
在部署 OpenIM 服务之前,我们需要部署一些依赖的中间件服务。
为了方便部署和管理,我们为这些中间件提供了一套 Helm Charts,它们位于 infra 目录下。
以下命令将分别安装 MySQL、Kafka、MinIO、MongoDB 和 Redis 中间件:
helm repo add openim-infra https://xxxxx.xxx
helm install im-mysql im-infra/mysql -f mysql-config.yaml
helm install im-kafka im-infra/kafka -f kafka-config.yaml
helm install im-minio im-infra/minio -f minio-config.yaml
helm install im-mongodb im-infra/mongodb -f mongodb-config.yaml
helm install im-redis im-infra/redis -f redis-config.yaml
注意
如果 OpenIM 集群部署在
openim
命名空间中,则需要使用-n
参数指定命名空间。如果命名空间不存在,可以使用--create-namespace
创建一个新的命名空间。
这些配置文件包括账户信息,例如 minio-config.yaml
还包括域名信息。
helm install openim-server -f open-im-server-config.yaml -f notification.yaml ./openim/open-im-server/
请确保在 open-im-server-config.yaml
中配置域名信息。账户信息默认与中间件(infra/)的 -config.yaml
文件同步。如果在安装中间件时修改了 config.yaml
,请同步修改 open-im-server-config.yaml
。
bashCopy code
helm install openim-chat -f chat-server-config.yaml ./openim/openim-chat
请确保在 chat-server-config.yaml
中配置域名信息。账户信息默认与中间件的 -config.yaml
文件同步。如果在安装中间件时修改了 config.yaml
,请同步修改 chat-server-config.yaml
。
helm install imwebfront -f webfront-config.yaml ./webfront/
请确保在 webfront-config.yaml
中配置了域名信息。
helm install imadminfront -f adminfront-config.yaml ./adminfront/
请确保在 adminfront-config.yaml
中配置了域名信息。
如果您需要卸载 OpenIM 及其相关组件,可以使用以下 Helm 命令:
helm uninstall [RELEASE_NAME]
其中 [RELEASE_NAME]
是您在安装时指定的名称,例如 openimserver
。
如果您需要调试 Helm Charts,可以使用以下命令:
helm install [RELEASE_NAME] [CHART] --dry-run --debug
或者使用 helm template
命令:
helm template [CHART] --name [RELEASE_NAME] --debug
要了解有关 OpenIM 和各个组件的配置和使用的详细信息,请访问OpenIM官方文档。
OpenIM Helm Charts are utilized for easy deployment and management of the OpenIM instant messaging platform and its related middleware on Kubernetes clusters.
- Installed and configured Kubernetes (K8s) environment.
- At least two available domain names: one for MinIO API access, and another for OpenIM Server API access.
- Configured StorageClass (this example uses NFS-Client).
- (Optional) If your K8s system’s Ingress Controller nodes are configured with LoadBalancer, all domain information in
-config.yaml
files do not need to configure TLS items.
Note: The next version will introduce single domain access and IP-based URL access features.
To use these Helm Charts, you first need to install Helm. Please refer to Helm's documentation to get started with Helm.
Once Helm is installed, add the Helm repository as follows:
helm repo add openim https://openim.github.io/helm-charts
Next, you can run helm search repo openim
to view the available Charts.
helm install [RELEASE_NAME] openim/openim-server
See the configuration information below.
For command documentation, refer to helm install.
helm uninstall [RELEASE_NAME]
This will delete all Kubernetes components related to the Chart and uninstall the release.
For command documentation, refer to helm uninstall.
helm upgrade [RELEASE_NAME] [CHART] --install
For command documentation, refer to helm upgrade.
helm list
This directory contains the Helm Chart for the "adminfront" service.
Chart.yaml
: Contains basic information and version of the Chart.templates/
: Contains Kubernetes template files.values.yaml
: Default configuration file.
Contains custom configuration information for the "adminfront" service.
This directory contains the Helm Chart for the "chat-server" service.
Chart.yaml
: Contains basic information and version of the Chart.charts/
: (Optional) If the Chart depends on other Charts, they can be placed in this directory.templates/
: Contains Kubernetes template files.values.yaml
: Default configuration file.
This directory contains all Helm Charts or related configurations for the middleware that OpenIM depends on.
ingress-nginx
,kafka
,minio
,mongodb
,mysql
,nfs-subdir-external-provisioner
,redis
: These directories may contain Helm Charts for the corresponding middleware.kafka-config.yaml
,minio-config.yaml
,mongodb-config.yaml
,mysql-config.yaml
,redis-config.yaml
: These files contain custom configurations for the corresponding middleware.
- Installed and configured Kubernetes (K8s) environment.
- At least two available domain names: one for MinIO API access, and another for OpenIM Server API access.
- Configured StorageClass (this example uses NFS-Client).
- (Optional) If your K8s system’s Ingress Controller nodes are configured with LoadBalancer, all domain information in
-config.yaml
files do not need to configure TLS items.
Note: The next version will introduce single domain access and IP-based URL access features.
Before deploying the OpenIM services, we need to deploy some dependent middleware services.
For easy deployment and management, we provide a set of Helm Charts for these middleware, located in the infra directory.
The following commands will respectively install MySQL, Kafka, MinIO, MongoDB, and Redis middleware:
helm repo add openim-infra https://xxxxx.xxx
helm install im-mysql im-infra/mysql -f mysql-config.yaml
helm install im-kafka im-infra/kafka -f kafka-config.yaml
helm install im-minio im-infra/minio -f minio-config.yaml
helm install im-mongodb im-infra/mongodb -f mongodb-config.yaml
helm install im-redis im-infra/redis -f redis-config.yaml
Note
If the OpenIM cluster is deployed in the
openim
namespace, use the-n
argument to specify the namespace. If the namespace does not exist, you can use--create-namespace
to create a new namespace.
These configuration files include account information, for example, minio-config.yaml
also includes domain information.
helm install openim-server -f open-im-server-config.yaml -f notification.yaml ./openim/open-im-server/
Ensure that the domain information is configured in open-im-server-config.yaml
. Account information defaults to sync with the middleware (infra/
) -config.yaml
files. If config.yaml
was modified when installing the middleware, please sync modify open-im-server-config.yaml
.
helm install openim-chat -f chat-server-config.yaml ./openim/openim-chat
Ensure that the domain information is configured in chat-server-config.yaml
. Account information defaults to sync with the middleware -config.yaml
files. If config.yaml
was modified when installing the middleware, please sync modify chat-server-config.yaml
.
-
✴️版权声明 © :本书所有内容遵循CC-BY-SA 3.0协议(署名-相同方式共享)©