🎯 Optimize the deployment scheme to provide kubernetes deployment strategy (#1050)

* fix: fix openim web port

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* fix: fix openim web port

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* fix: github gh images

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* fix: github gh images

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

* feat: go mod package

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>

---------

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/1047/head
Xinwei Xiong 1 year ago committed by GitHub
parent 72e5c4a0bf
commit 2628874a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,7 @@ MINIO_ENDPOINT=http://172.28.0.1:10005
# Base URL for the application programming interface (API).
# Default: API_URL=http://172.28.0.1:10002
API_URL=http://172.28.0.1:10002
API_URL=http://127.0.0.1:10002
# Directory path for storing data files or related information.
# Default: DATA_DIR=./

@ -16,6 +16,7 @@
<a href="https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q"><img src="https://img.shields.io/badge/Slack-300%2B-blueviolet?logo=slack&amp;logoColor=white"></a>
<a href="https://github.com/openimsdk/open-im-server/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
<a href="https://golang.org/"><img src="https://img.shields.io/badge/Language-Go-blue.svg"></a>
<a href="https://pkg.go.dev/github.com/openimsdk/open-im-server/v3"><img src="https://pkg.go.dev/badge/github.com/openimsdk/open-im-server/v3.svg" alt="Go Reference"></a>
</p>
</p>
@ -81,7 +82,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
5. **Open Source :open_hands:**
✅ The code of OpenIM is open source, self-controlled data, aimed at building a globally leading IM open source community, including client SDK and server
✅ The code of OpenIM is open source, self-controlled data, aimed at building a globally leading [IM open source community](https://github.com/OpenIMSDK), including [client SDK](https://github.com/openimsdk/openim-sdk-core) and server
✅ Based on open source Server, many excellent open source projects have been developed, such as [OpenKF](https://github.com/OpenIMSDK/OpenKF) (Open source AI customer service system)
@ -111,7 +112,7 @@ Further enhancing your experience, we also provide an SDK client, wherein most c
## :rocket: Quick Start
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
You can quickly learn OpenIM engineering solutions, all it takes is one simple command:
```bash
$ make demo
@ -119,64 +120,18 @@ $ make demo
🤲 In order to facilitate the user experience, we have provided a variety of deployment solutions, you can choose your own deployment method according to the list below:
<details> <summary>Deploying with Docker Compose</summary>
<details> <summary>Deploying with Docker Compose</summary>
It is recommended to use Docker Compose for deployment, which can easily and quickly deploy the entire OpenIM service on a single node
> docker compose will not be maintained in future versions, but it is still the easiest and most convenient way to organize docker compose deployments into a separate project https://github.com/openim-sigs/openim-docker to maintain.
+ [https://github.com/openimsdk/openim-docker](https://github.com/openimsdk/openim-docker)
**1. Clone the project**
```bash
git clone -b main https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker && ./scripts/init-config.sh && docker-compose up -d
```
> **Note**
>
> If you don't know OpenIM's versioning policy, 📚Read our release policy: https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md
**2. Configure the config file**
If you tried to get started quickly with `make demo`, then you know that our config file is generated by automation.
You can use `make init` to quickly initialize a configuration file
Modify the automation script:
```bash
cat scripts/install/environment.sh
```
1. Recommended using environment variables:
```bash
export PASSWORD="openIM123" # Set password
export USER="root" # Set username
# Choose chat version and server version https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md, eg: main, release-v*.*
export CHAT_BRANCH="main"
export SERVER_BRANCH="main"
#... Other environment variables
# MONGO_USERNAME: This sets the MongoDB username
# MONGO_PASSWORD: Set the MongoDB password
# MONGO_DATABASE: Sets the MongoDB database name
# MINIO_ENDPOINT: set the MinIO service address
# DOCKER_BRIDGE_SUBNET: set the docker bridge network address
export DOCKER_BRIDGE_SUBNET="172.28.0.0/16"
# API_URL: under network environment, set OpenIM Server API address
export API_URL="http://127.0.0.1:10002"
```
If you wish to use more custom features, read our [config documentation](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md).
Next, update the configuration using make init:
```bash
$ make init
$ git diff
```
</details>
<details> <summary>Compile from Source</summary>
@ -211,16 +166,11 @@ Deploy basic components at the click of a command:
```bash
# install openim dependency
$ git clone https://github.com/openimsdk/open-im-server openim/openim-server && export openim=$(pwd)/openim/openim-server && cd $openim/openim-server && git checkout $OPENIM_VERSION
$ curl https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml -o basic-openim-server-dependency.yml && make init && docker compose -f basic-openim-server-dependency.yml up -d && make start
$ make init && docker compose -f basic-openim-server-dependency.yml up -d && make start && make check
```
> `make help` to help you see the instructions supported by OpenIM.
Use `make check` to check all component starts
```bash
$ make check
```
You can use the `make help-all` see OpenIM in action.
@ -240,8 +190,9 @@ Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.m
</details>
<details> <summary>Open IM Ports</summary>
<details> <summary>Open IM and Chat Ports</summary>
+ oepnim-server warehouse: https://github.com/openimsdk/open-im-server
| TCP Port | Description | Operation |
| --------- | ------------------------------------------------------------ | ----------------------------------------------------- |
@ -249,10 +200,6 @@ Read: https://github.com/openimsdk/open-im-server/blob/main/deployments/README.m
| TCP:10002 | api port, such as user, friend, group, message interfaces. | Port release or nginx reverse proxy, and firewall off |
| TCP:10005 | Required when choosing minio storage (openIM uses minio storage by default) | Port release or nginx reverse proxy, and firewall off |
</details>
<details> <summary>Open Chat Ports</summary>
+ chat warehouse: https://github.com/OpenIMSDK/chat

@ -132,14 +132,14 @@ api:
# minio.signEndpoint is minio public network address
object:
enable: "minio"
apiURL: "http://172.28.0.1:10002"
apiURL: "http://http://127.0.0.1:10002"
minio:
bucket: "openim"
endpoint: "http://172.28.0.1:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ''
signEndpoint: "http://172.28.0.1:10005"
signEndpoint: "http://127.0.0.1:10005"
cos:
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
secretID: ''

@ -13,6 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if ! command -v pv &> /dev/null
then
echo "pv not found, installing..."
if [ -e /etc/debian_version ]; then
sudo apt-get update
sudo apt-get install -y pv
elif [ -e /etc/redhat-release ]; then
sudo yum install -y pv
else
echo "Unsupported OS, please install pv manually."
exit 1
fi
fi
readonly t_reset=$(tput sgr0)
readonly green=$(tput bold; tput setaf 2)
readonly yellow=$(tput bold; tput setaf 3)
@ -58,8 +72,11 @@ clear
openim::util::desc "========> Start the basic openim docker components"
openim::util::desc "========> You can use docker-compose ps to check the status of the container"
openim::util::run "curl https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml -o basic-openim-server-dependency.yml"
openim::util::run "docker compose up --f basic-openim-server-dependency.yml up -d"
openim::util::run "docker compose up -d"
clear
openim::util::desc "========> Use make init-githooks Initialize git hooks "
openim::util::run "make init-githooks"
clear
openim::util::desc "The specification is pretty high, you need to be bound on your branch name, as well as commit messages"
@ -133,3 +150,5 @@ clear
openim::util::desc "Add copyright"
openim::util::run "make add-copyright"
clear
exit 0

Loading…
Cancel
Save