Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: OpenIM docker offline deployment and multiple-platform docker image building #432

Closed
2 tasks done
cubxxw opened this issue Jun 8, 2023 · 4 comments
Closed
2 tasks done
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request kind/feature Categorizes issue or PR as related to a new feature.

Comments

@cubxxw
Copy link
Contributor

cubxxw commented Jun 8, 2023

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature request in the OpenIMSDK Slack and got positive feedback

Is this feature request related to a problem?

❎ No

Problem Description

With the efforts of a few days ago, we finally completed the first step: docker offline deployment, and had a full deployment scheme, refer to https://nsddd.notion.site/435ee747c0bc44048da9300a2d745ad3?pvs=25

I hope to make specific designs for the three plates, which are as follows:

  • Determine whether the arm architecture can run the amd architecture machine normally
  • Optimize the local Makefile so that it can normally compile arm and amd binaries, and multi-platform compilation of arm and amd docker images (buildx)
  • Optimize the entire CICD process design to produce the release

Solution Description

docker is not very dependent on the underlying architecture, docker it is not completely cross-platform, mainly not across CPU architectures.

linux command line execution arch command, printed out is the cpu architecture, the cpu architecture is the same, the system is not the same (such as ubuntu and redhat) generally does not affect the use.

Note:
docker can run an ARM-based container on an AMD-based machine depending on whether the container's image depends on arm or amd

Benefits

A great feature request that provides docker cross-platform compilation and deployment of IM

Potential Drawbacks

No response

Additional Information

## image: Build docker images for host arch.
.PHONY: image
image:
	@$(MAKE) image.build

## image.multiarch: Build docker images for multiple platforms. See option PLATFORMS.
.PHONY: image.multiarch
image.multiarch:
	@$(MAKE) image.build.multiarch

## push: Build docker images for host arch and push images to registry.
.PHONY: push
push:
	@$(MAKE) image.push

## push.multiarch: Build docker images for multiple platforms and push images to registry.
.PHONY: push.multiarch
push.multiarch:
	@$(MAKE) image.push.multiarch
@cubxxw cubxxw added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 8, 2023
@cubxxw cubxxw self-assigned this Jun 8, 2023
@cubxxw cubxxw added enhancement New feature or request dependencies Pull requests that update a dependency file labels Jun 8, 2023
@cubxxw
Copy link
Contributor Author

cubxxw commented Jun 10, 2023

Service Name Image Supported Architectures Ports
mysql mysql:5.7 amd64, arm64v8, arm32v7 13306:3306, 23306:33060
mongodb mongo:4.0 amd64, arm64v8, arm32v7 37017:27017
redis redis amd64, arm64v8, arm32v7 16379:6379
zookeeper wurstmeister/zookeeper amd64 2181:2181
kafka wurstmeister/kafka arm,amd64 9092:9092
etcd http://quay.io/coreos/etcd amd64, arm64v8 2379:2379, 2380:2380
minio minio/minio amd64, arm64v8, arm32v7 10005:9000, 9090:9090
open_im_server openim/open_im_server:v2.3.9 amd64 N/A
open_im_enterprise openim/open_im_enterprise:v1.0.3 amd64 N/A
prometheus prom/prometheus amd64, arm64v8, arm32v7 N/A
grafana grafana/grafana amd64, arm64v8, arm32v7 N/A
node-exporter http://quay.io/prometheus/node-exporter amd64, arm64v8, arm32v7 9100:9100

@cubxxw
Copy link
Contributor Author

cubxxw commented Jun 11, 2023

@cubxxw
Copy link
Contributor Author

cubxxw commented Jun 11, 2023

arm off-line install

./coscli cp -r cos://openim-1306374445/openim/image/arm/off-line/off-line/ /tmp/  -e cos.ap-guangzhou.myqcloud.com -i ************************************ -k ************************************

amd off-line install

./coscli cp -r cos://openim-1306374445/openim/image/arm/off-line/off-line/ /tmp/  -e cos.ap-guangzhou.myqcloud.com -i ************************************ -k ************************************

@cubxxw cubxxw closed this as completed Jun 11, 2023
@cubxxw
Copy link
Contributor Author

cubxxw commented Jun 11, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request kind/feature Categorizes issue or PR as related to a new feature.
Projects
Archived in project
Development

No branches or pull requests

1 participant