From 7dcd40401ff87998557d2c031a188da9362381ca Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong (cubxxw)" <3293172751nss@gmail.com> Date: Tue, 9 Jan 2024 16:24:48 +0800 Subject: [PATCH] feat: add openim support arm arch Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> --- .github/workflows/openimci.yml | 17 ++++++++++++----- docs/contrib/offline-deployment.md | 30 +++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/.github/workflows/openimci.yml b/.github/workflows/openimci.yml index a0566f3d5..57a4180b1 100644 --- a/.github/workflows/openimci.yml +++ b/.github/workflows/openimci.yml @@ -114,7 +114,7 @@ jobs: continue-on-error: true openim-start: - name: Test OpenIM install/start on ${{ matrix.os }} + name: Test OpenIM install/start on ${{ matrix.os }}-${{ matrix.arch }} runs-on: ${{ matrix.os }} permissions: contents: write @@ -125,6 +125,7 @@ jobs: matrix: go_version: ["1.21"] os: ["ubuntu-latest"] + arch: [arm64, armv7, amd64] steps: - name: Checkout and Install OpenIM uses: actions/checkout@v4 @@ -143,6 +144,7 @@ jobs: # sudo docker ps - name: Check the OpenIM environment and status + if: runner.os == 'Linux' && matrix.arch == 'amd64' id: docker_info run: | sleep 30 @@ -155,21 +157,26 @@ jobs: - name: Comment PR uses: thollander/actions-comment-pull-request@v2 + if: runner.os == 'Linux' && matrix.arch == 'amd64' with: message: | > [!TIP] > Run make install to check the status ### Docker Images: - ``` +
Click to expand docker images + ```bash ${{ env.images }} ``` +
+ ### Docker Processes: - ``` +
Click to expand docker ps + ```bash ${{ env.containers }} ``` - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true +
+ GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} execute-scripts: name: Execute OpenIM Script On ${{ matrix.os }} diff --git a/docs/contrib/offline-deployment.md b/docs/contrib/offline-deployment.md index 0e0755143..a96f82d4a 100644 --- a/docs/contrib/offline-deployment.md +++ b/docs/contrib/offline-deployment.md @@ -124,7 +124,13 @@ You can select from the following versions: docker save -o .tar ``` -1. **Fetch code**: Clone the repository: +If you want to save all the images, use the following command: + +```bash +docker save -o .tar $(docker images -q) +``` + +3. **Fetch code**: Clone the repository: ```bash git clone https://github.com/openimsdk/openim-docker.git @@ -134,7 +140,7 @@ Or download the code from [Releases](https://github.com/openimsdk/openim-docker/ > Because of the difference between win and linux newlines, please do not clone the repository with win and then synchronize scp to linux. -1. **Transfer files**: Use `scp` to transfer all images and code to the intranet server. +4. **Transfer files**: Use `scp` to transfer all images and code to the intranet server. ```bash scp .tar user@remote-ip:/path/on/remote/server @@ -142,21 +148,27 @@ scp .tar user@remote-ip:/path/on/remote/server Or choose other transfer methods such as a hard drive. -2. **Import images**: On the intranet server: +5. **Import images**: On the intranet server: ```bash docker load -i .tar ``` -3. **Deploy**: Navigate to the `openim-docker` repository directory and follow the [README guide](https://github.com/openimsdk/openim-docker) for deployment. - -4. **Deploy using docker compose**: +Import directly with shortcut commands: ```bash -docker compose up -d +for i in `ls ./`;do docker load -i $i;done +``` + +6. **Deploy**: Navigate to the `openim-docker` repository directory and follow the [README guide](https://github.com/openimsdk/openim-docker) for deployment. -# Verify -docker compose ps +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 ``` > **Note**: If you're using a version of Docker prior to 20, make sure you've installed `docker-compose`.