From 03ae9357567091b093d90830df8f0abbf474ade1 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 23 May 2022 11:39:59 +0800 Subject: [PATCH] k8s deploy --- deploy_k8s/k8s_openim_deploy.md | 4 ++++ deploy_k8s/kubectl_start_all.sh | 2 ++ deploy_k8s/kubectl_stop_all.sh | 2 ++ deploy_k8s/msg_transfer/msg_transfer.Dockerfile | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/deploy_k8s/k8s_openim_deploy.md b/deploy_k8s/k8s_openim_deploy.md index b96497f93..303ce4289 100644 --- a/deploy_k8s/k8s_openim_deploy.md +++ b/deploy_k8s/k8s_openim_deploy.md @@ -6,6 +6,7 @@ kubectl create namespace openim kubectl -n openim create configmap config --from-file=config/config.yaml openim 为im项目的namespace, 可选 +kubectl -n openim get configmap ### 3(可选). 修改每个deployment.yml kubectl get nodes @@ -15,8 +16,10 @@ nodeSelector: node: kube-Node 创建资源清单时添加上nodeSelector属性对应即可 修改每种服务数量,建议至少每种2个rpc。 +如果修改了config/config.yaml某些配置比如端口,同时需要修改对应deployment端口 ### 4. 修改ingress.yaml配置文件 +域名修改等操作 ### 5. 执行./kubectl_start.sh脚本 kubectl 启动所有deployment,services,ingress @@ -25,3 +28,4 @@ kubectl 启动所有deployment,services,ingress kubectl -n openim get services kubectl -n openim get deployment kubectl -n openim get ingress +kubectl -n openim get pods \ No newline at end of file diff --git a/deploy_k8s/kubectl_start_all.sh b/deploy_k8s/kubectl_start_all.sh index bb1fb0a9c..6fc90af7c 100644 --- a/deploy_k8s/kubectl_start_all.sh +++ b/deploy_k8s/kubectl_start_all.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + source ./path_info.cfg for i in ${service[*]} diff --git a/deploy_k8s/kubectl_stop_all.sh b/deploy_k8s/kubectl_stop_all.sh index b20ca24b3..47f87eeb6 100644 --- a/deploy_k8s/kubectl_stop_all.sh +++ b/deploy_k8s/kubectl_stop_all.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + service=( #api service file api diff --git a/deploy_k8s/msg_transfer/msg_transfer.Dockerfile b/deploy_k8s/msg_transfer/msg_transfer.Dockerfile index 2db727066..9ff56c71a 100644 --- a/deploy_k8s/msg_transfer/msg_transfer.Dockerfile +++ b/deploy_k8s/msg_transfer/msg_transfer.Dockerfile @@ -5,7 +5,7 @@ ENV WORKDIR /Open-IM-Server ENV CONFIG_NAME $WORKDIR/config/config.yaml # 将可执行文件复制到目标目录 -ADD ./open_im_transfer $WORKDIR/main +ADD ./open_im_msg_transfer $WORKDIR/main # 创建用于挂载的几个目录,添加可执行权限 RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/db && \