2023-09-05 16:31:40 +08:00
# OpenIM Offline Deployment Design
## 1. Base Images
Below are the base images and their versions you'll need:
2024-01-12 18:04:06 +08:00
- [ ] bitnami/kafka:3.5.1
- [ ] redis:7.0.0
- [ ] mongo:6.0.2
- [ ] bitnami/zookeeper:3.8
2024-01-31 14:16:32 +08:00
- [ ] minio/minio:RELEASE.2024-01-11T07-46-16Z
2024-01-12 18:04:06 +08:00
> [!IMPORTANT]
> It is important to note that OpenIM removed mysql components from versions v3.5.0 (release-v3.5) and above, so mysql can be deployed without this requirement or above
**If you need to install more IM components or monitoring products: **
OpenIM:
> [!TIP]
> If you need to install more IM components or monitoring products [images.md](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/images.md)
2024-01-31 14:16:32 +08:00
- [ ] ghcr.io/openimsdk/openim-web:<version-name>
- [ ] ghcr.io/openimsdk/openim-admin:<version-name>
- [ ] ghcr.io/openimsdk/openim-chat:<version-name>
- [ ] ghcr.io/openimsdk/openim-server:<version-name>
2024-01-12 18:04:06 +08:00
Monitoring:
- [ ] prom/prometheus: v2.48.1
- [ ] prom/alertmanager: v0.23.0
- [ ] grafana/grafana: 10.2.2
- [ ] bitnami/node-exporter: 1.7.0
2023-09-05 16:31:40 +08:00
Use the following commands to pull these base images:
2024-01-12 18:04:06 +08:00
``` bash
docker pull bitnami/kafka:3.5.1
2023-09-05 16:31:40 +08:00
docker pull redis:7.0.0
docker pull mongo:6.0.2
2024-01-31 14:16:32 +08:00
docker pull mariadb:10.6
2024-01-12 18:04:06 +08:00
docker pull bitnami/zookeeper:3.8
2024-01-31 14:16:32 +08:00
docker pull minio/minio:2024-01-11T07-46-16Z
2023-09-05 16:31:40 +08:00
```
2024-01-12 18:04:06 +08:00
If you need to install more IM components or monitoring products:
``` bash
docker pull prom/prometheus:v2.48.1
docker pull prom/alertmanager:v0.23.0
docker pull grafana/grafana:10.2.2
docker pull bitnami/node-exporter:1.7.0
```
## 2. OpenIM Images
2023-09-05 16:31:40 +08:00
2023-11-10 19:37:25 +08:00
**For detailed understanding of version management and storage of OpenIM and Chat ** : [version.md ](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/version.md )
2023-09-05 16:31:40 +08:00
### OpenIM Image
2023-11-10 19:37:25 +08:00
- Get image version info: [images.md ](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/images.md )
2023-09-05 16:31:40 +08:00
- Depending on the required version, execute the following command:
``` bash
docker pull ghcr.io/openimsdk/openim-server:<version-name>
```
### Chat Image
- Execute the following command to pull the image:
``` bash
2024-01-12 18:04:06 +08:00
docker pull ghcr.io/openimsdk/openim-chat:<version-name>
```
### Web Image
- Execute the following command to pull the image:
``` bash
docker pull ghcr.io/openimsdk/openim-web:<version-name>
2023-09-05 16:31:40 +08:00
```
2024-01-12 18:04:06 +08:00
### Admin Image
- Execute the following command to pull the image:
``` bash
docker pull ghcr.io/openimsdk/openim-admin:<version-name>
```
2023-09-05 16:31:40 +08:00
## 3. Image Storage Selection
**Repositories ** :
- Alibaba Cloud: `registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server`
- Docker Hub: `openim/openim-server`
**Version Selection ** :
- Stable: e.g. release-v3.2 (or 3.1, 3.3)
- Latest: latest
- Latest of main: main
## 4. Version Selection
You can select from the following versions:
- Stable: e.g. release-v3.2
- Latest: latest
- Latest from main branch: main
## 5. Offline Deployment Steps
1. **Pull images ** : Execute the above `docker pull` commands to pull all required images locally.
2. **Save images ** :
2024-01-12 18:04:06 +08:00
``` bash
2023-09-05 16:31:40 +08:00
docker save -o <tar-file-name>.tar <image-name>
```
2024-01-12 18:04:06 +08:00
If you want to save all the images, use the following command:
2023-09-05 16:31:40 +08:00
2024-01-12 18:04:06 +08:00
``` bash
docker save -o <tar-file-name>.tar $( docker images -q)
2023-09-05 16:31:40 +08:00
```
2024-01-12 18:04:06 +08:00
3. **Fetch code ** : Clone the repository:
``` bash
git clone https://github.com/openimsdk/openim-docker.git
2023-09-05 16:31:40 +08:00
```
2024-01-12 18:04:06 +08:00
Or download the code from [Releases ](https://github.com/openimsdk/openim-docker/releases/ ).
2023-09-05 16:31:40 +08:00
2024-01-12 18:04:06 +08:00
> Because of the difference between win and linux newlines, please do not clone the repository with win and then synchronize scp to linux.
2023-09-05 16:31:40 +08:00
2024-01-12 18:04:06 +08:00
4. **Transfer files ** : Use `scp` to transfer all images and code to the intranet server.
``` bash
2023-09-05 16:31:40 +08:00
scp <tar-file-name>.tar user@remote-ip:/path/on/remote/server
```
Or choose other transfer methods such as a hard drive.
2024-01-12 18:04:06 +08:00
5. **Import images ** : On the intranet server:
2023-09-05 16:31:40 +08:00
2024-01-12 18:04:06 +08:00
``` bash
2023-09-05 16:31:40 +08:00
docker load -i <tar-file-name>.tar
```
2024-01-12 18:04:06 +08:00
Import directly with shortcut commands:
2023-09-05 16:31:40 +08:00
2024-01-12 18:04:06 +08:00
``` bash
for i in ` ls ./` ; do docker load -i $i ; done
2023-09-05 16:31:40 +08:00
```
2024-01-12 18:04:06 +08:00
6. **Deploy ** : Navigate to the `openim-docker` repository directory and follow the [README guide ](https://github.com/openimsdk/openim-docker ) for deployment.
7. **Deploy using docker compose ** :
``` bash
export OPENIM_IP = "your ip" # Set Ip
make init # Init config
docker compose up -d # Deployment
docker compose ps # Verify
2023-09-05 16:31:40 +08:00
```
> **Note**: If you're using a version of Docker prior to 20, make sure you've installed `docker-compose`.
## 6. Reference Links
2024-01-12 18:04:06 +08:00
- [openimsdk Issue #432 ](https://github.com/openimsdk/open-im-server/issues/432 )
2023-09-05 16:31:40 +08:00
- [Notion Link ](https://nsddd.notion.site/435ee747c0bc44048da9300a2d745ad3?pvs=25 )
2024-01-31 14:16:32 +08:00
- [openimsdk Issue #474 ](https://github.com/openimsdk/open-im-server/issues/474 )