Giter Club home page Giter Club logo

deploy-openim's Introduction

openim开源项目k8s集群部署

当前server版本2.0.6
当前core版本2.0.5
历史版本请查看 git tag

需要的环境

MacOS OR Linux

需要安装的软件

  • wget
  • docker
  • kubectl

k8s配置

编辑 setting.env
#docker镜像tag前缀
DOCKER_REGISTRY_ADDR="k3d-registry.local:5001/"
#nodePort暴露端口号 api
NODE_PORT_API="10100"
#nodePort暴露端口号 msg_gateway
NODE_PORT_MSG_GATEWAY="10101"
#nodePort暴露端口号 sdk_server
NODE_PORT_SDK_SERVER="10102"
#nodePort暴露端口号 demo
NODE_PORT_DEMO="10103"
#部署在哪个命名空间
K8S_NAMESPACE="openim"

单个服务部署

cd $服务路径 && \
bash build.sh

全部部署

go run .

Ingress 负载均衡

这里只说一下msg_gateway和sdk_server的Ingress配置
nginx-ingress-controller支持websocket
#增加ingress注解
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"

yaml示例

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
  name: sdk-server.xxx.com
spec:
  rules:
  - host: sdk-server.xxx.com
    http:
      paths:
      - backend:
          service:
            name: sdk-server
            port:
              number: 30000
        path: /
        pathType: Prefix

deploy-openim's People

Contributors

showurl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.