Skip to content

Commit

Permalink
doc: Add more detailed description regarding how to build an image of…
Browse files Browse the repository at this point in the history
… Higress Gateway (#217)
  • Loading branch information
CH3CHO authored Apr 3, 2024
1 parent 8fd99cd commit 93f20c6
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
### 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.
Original file line number Diff line number Diff line change
Expand Up @@ -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 镜像。

0 comments on commit 93f20c6

Please sign in to comment.