From 93f20c6a1a4814685a5f854ba3f7a32d4a1f9c43 Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Wed, 3 Apr 2024 16:11:18 +0800 Subject: [PATCH] doc: Add more detailed description regarding how to build an image of Higress Gateway (#217) --- .../current/dev/architecture.md | 22 +++++++++++++++++-- .../current/dev/architecture.md | 22 +++++++++++++++++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/i18n/en-us/docusaurus-plugin-content-docs/current/dev/architecture.md b/i18n/en-us/docusaurus-plugin-content-docs/current/dev/architecture.md index b0411751fc..e4d944eb92 100644 --- a/i18n/en-us/docusaurus-plugin-content-docs/current/dev/architecture.md +++ b/i18n/en-us/docusaurus-plugin-content-docs/current/dev/architecture.md @@ -15,9 +15,27 @@ To compile the binary that can run in the local environment, execute `make build If need to compile the Docker image, please execute `make docker-build` . - ## Higress Gateway The Higress gateway is a data plane that implements gateway routing and forwarding capabilities. -Executing `make build-gateway` in the higress repository directory will compile the Higress Gateway image. \ No newline at end of file +### Quick Build + +Suitable scenario: Envoy itself isn't modified, meaning there is no need to rebuild the envoy binary. + +Steps: +1. Enter the higress repo in the terminal. +2. Execute `make build-gateway-local` to start building the image of Higress Gateway. +3. The image tag will be displayed in the terminal after the build finishes. + +### Full Build + +Suitable scenario: The envoy binary needs to be rebuilt. + +Steps: +1. Enter the higress repo in the terminal. +2. Execute `cd external/proxy; BUILD_WITH_CONTAINER=1 make test_release` to build the envoy binary. +3. Once the build finishes, the built artifact, envoy.tar.gz, will be placed in the `external/package` folder in the higress repo. +4. Rename the `envoy.tar.gz` to `envoy-amd64.tar.gz` or `envoy-arm64.tar.gz`, based on your local architecture. +5. If you want to build a multi-arch image, please re-do step 2 and 3 with another architecture, and copy the renamed built artifact here. +6. Follow the steps mentioned above in the "Quick Build" section to build an Higress Gateway image. \ No newline at end of file diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/dev/architecture.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/dev/architecture.md index 75ebf280ba..785f036cf2 100644 --- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/dev/architecture.md +++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/dev/architecture.md @@ -14,9 +14,27 @@ Higress 的控制面程序,会连接 Istio ,用于生成 Istio API 对象, 若需要编译 docker 镜像,请执行 `make docker-build`。Higress Controller使用的Istio pilot镜像使用`make build-istio-local` 编译。 - ## Higress Gateway Higress 的数据面程序,用于实现网关路由转发等能力。 -在 higress 仓库目录下执行 `make build-gateway-local` 会编译出 Higress Gateway 的镜像。 +### 快速构建 + +适用场景:未对 Envoy 本体进行了修改,即不需要重新编译 Envoy 本体的情况 + +构建步骤: +1. 在命令行下进入 higress 仓库目录; +2. 执行 `make build-gateway-local` 命令,进行 Higress Gateway 镜像的构建; +3. 构建完成后会输出镜像 tag。 + +### 完整构建 + +适用场景:需要重新编译 Envoy 本体的情况 + +构建步骤: +1. 在命令行下进入 higress 仓库目录; +2. 执行 `cd external/proxy; BUILD_WITH_CONTAINER=1 make test_release` 命令,构建 Envoy 本体; +3. 构建完成后,生成的 `envoy.tar.gz` 文件会放在 higress 仓库目录的 `external/package` 子目录内; +4. 将构建完成后输出的 `envoy.tar.gz` 文件,根据本机的系统架构重命名为 `envoy-amd64.tar.gz` 或 `envoy-arm64.tar.gz`; +5. 如果需要构建多平台镜像,那么需要在另一个平台的系统上完成 Envoy 的构建,并将其生成的 envoy.tar.gz 文件重命名后复制到本机上(参考以上 2、3 两步); +6. 参考上面的快速构建步骤,构建 Higress Gateway 镜像。 \ No newline at end of file