change: don't promise to support Tengine (#5961)

This commit is contained in:
罗泽轩 2021-12-30 18:04:35 +08:00 committed by GitHub
parent 6ac80b9fb2
commit 70ef2d0a44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1 additions and 267 deletions

View File

@ -27,7 +27,6 @@ jobs:
- linux_openresty
- linux_openresty_1_17
- linux_openresty_mtls
- linux_tengine
runs-on: ${{ matrix.platform }}
timeout-minutes: 90

View File

@ -65,7 +65,6 @@ A/B testing, canary release, blue-green deployment, limit rate, defense against
- **All platforms**
- Cloud-Native: Platform agnostic, No vendor lock-in, APISIX can run from bare-metal to Kubernetes.
- Run Environment: Both OpenResty and Tengine are supported.
- Supports ARM64: Don't worry about the lock-in of the infra technology.
- **Multi protocols**
@ -221,7 +220,6 @@ Using AWS's eight-core server, APISIX's QPS reaches 140,000 with a latency of on
| Plug-in hot loading | Yes | No |
| Custom LB and route | Yes | No |
| REST API <--> gRPC transcoding | Yes | No |
| Tengine | Yes | No |
| MQTT | Yes | No |
| Configuration effective time | Event-driven, < 1ms | polling, 5 seconds |
| Dashboard | Yes | No |

View File

@ -227,7 +227,7 @@ Please modify "admin_key" in conf/config.yaml .
util.die("can not find openresty\n")
end
local need_ver = "1.17.3"
local need_ver = "1.17.8"
if not version_greater_equal(or_ver, need_ver) then
util.die("openresty version must >=", need_ver, " current ", or_ver, "\n")
end

View File

@ -1,254 +0,0 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
. ./ci/common.sh
before_install() {
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1)
# launch deps env
make ci-env-up
./ci/linux-ci-init-service.sh
}
tengine_install() {
if [ -d "build-cache${OPENRESTY_PREFIX}" ]; then
# sudo rm -rf build-cache${OPENRESTY_PREFIX}
sudo mkdir -p ${OPENRESTY_PREFIX}
sudo cp -r build-cache${OPENRESTY_PREFIX}/* ${OPENRESTY_PREFIX}/
ls -l ${OPENRESTY_PREFIX}/
ls -l ${OPENRESTY_PREFIX}/bin
return
fi
export OPENRESTY_VERSION=1.17.8.2
wget https://openresty.org/download/openresty-$OPENRESTY_VERSION.tar.gz
tar zxf openresty-$OPENRESTY_VERSION.tar.gz
wget https://codeload.github.com/alibaba/tengine/tar.gz/2.3.2
tar zxf 2.3.2
rm -rf openresty-$OPENRESTY_VERSION/bundle/nginx-1.17.8
mv tengine-2.3.2 openresty-$OPENRESTY_VERSION/bundle/
sed -i 's/= auto_complete "nginx";/= auto_complete "tengine";/g' openresty-$OPENRESTY_VERSION/configure
cd openresty-$OPENRESTY_VERSION
# patching start
# https://github.com/alibaba/tengine/issues/1381#issuecomment-541493008
# other patches for tengine 2.3.2 from upstream openresty
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-always_enable_cc_feature_tests.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-balancer_status_code.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-cache_manager_exit.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-daemon_destroy_pool.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-delayed_posted_events.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-hash_overflow.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-init_cycle_pool_release.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-larger_max_error_str.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-log_escape_non_ascii.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-no_Werror.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-pcre_conf_opt.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-proxy_host_port_vars.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-resolver_conf_parsing.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-reuseport_close_unused_fds.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-safe_resolver_ipv6_option.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-single_process_graceful_exit.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-ssl_cert_cb_yield.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-ssl_sess_cb_yield.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-stream_balancer_export.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-stream_proxy_get_next_upstream_tries.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-stream_proxy_timeout_fields.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-stream_ssl_preread_no_skip.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-upstream_pipelining.patch
wget -P patches https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.17.4-upstream_timeout_fields.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/openresty/master/patches/tengine-2.3.2-privileged_agent_process.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-delete_unused_variable.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-keepalive_post_request_status.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-tolerate_backslash_zero_in_uri.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-avoid-limit_req_zone-directive-in-multiple-variables.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-segmentation-fault-in-master-process.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-support-dtls-offload.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-support-prometheus-to-upstream_check_module.patch
wget -P patches https://raw.githubusercontent.com/totemofwolf/tengine/feature/patches/tengine-2.3.2-vnswrr-adaptated-to-dynamic_resolve.patch
cd bundle/tengine-2.3.2
patch -p1 < ../../patches/nginx-1.17.4-always_enable_cc_feature_tests.patch
patch -p1 < ../../patches/nginx-1.17.4-balancer_status_code.patch
patch -p1 < ../../patches/nginx-1.17.4-cache_manager_exit.patch
patch -p1 < ../../patches/nginx-1.17.4-daemon_destroy_pool.patch
patch -p1 < ../../patches/nginx-1.17.4-delayed_posted_events.patch
patch -p1 < ../../patches/nginx-1.17.4-hash_overflow.patch
patch -p1 < ../../patches/nginx-1.17.4-init_cycle_pool_release.patch
patch -p1 < ../../patches/nginx-1.17.4-larger_max_error_str.patch
patch -p1 < ../../patches/nginx-1.17.4-log_escape_non_ascii.patch
patch -p1 < ../../patches/nginx-1.17.4-no_Werror.patch
patch -p1 < ../../patches/nginx-1.17.4-pcre_conf_opt.patch
patch -p1 < ../../patches/nginx-1.17.4-proxy_host_port_vars.patch
patch -p1 < ../../patches/nginx-1.17.4-resolver_conf_parsing.patch
patch -p1 < ../../patches/nginx-1.17.4-reuseport_close_unused_fds.patch
patch -p1 < ../../patches/nginx-1.17.4-safe_resolver_ipv6_option.patch
patch -p1 < ../../patches/nginx-1.17.4-single_process_graceful_exit.patch
patch -p1 < ../../patches/nginx-1.17.4-ssl_cert_cb_yield.patch
patch -p1 < ../../patches/nginx-1.17.4-ssl_sess_cb_yield.patch
patch -p1 < ../../patches/nginx-1.17.4-stream_balancer_export.patch
patch -p1 < ../../patches/nginx-1.17.4-stream_proxy_get_next_upstream_tries.patch
patch -p1 < ../../patches/nginx-1.17.4-stream_proxy_timeout_fields.patch
patch -p1 < ../../patches/nginx-1.17.4-stream_ssl_preread_no_skip.patch
patch -p1 < ../../patches/nginx-1.17.4-upstream_pipelining.patch
patch -p1 < ../../patches/nginx-1.17.4-upstream_timeout_fields.patch
patch -p1 < ../../patches/tengine-2.3.2-privileged_agent_process.patch
patch -p1 < ../../patches/tengine-2.3.2-delete_unused_variable.patch
patch -p1 < ../../patches/tengine-2.3.2-keepalive_post_request_status.patch
patch -p1 < ../../patches/tengine-2.3.2-tolerate_backslash_zero_in_uri.patch
patch -p1 < ../../patches/tengine-2.3.2-avoid-limit_req_zone-directive-in-multiple-variables.patch
patch -p1 < ../../patches/tengine-2.3.2-segmentation-fault-in-master-process.patch
patch -p1 < ../../patches/tengine-2.3.2-support-dtls-offload.patch
patch -p1 < ../../patches/tengine-2.3.2-support-prometheus-to-upstream_check_module.patch
patch -p1 < ../../patches/tengine-2.3.2-vnswrr-adaptated-to-dynamic_resolve.patch
cd -
# patching end
./configure --prefix=${OPENRESTY_PREFIX} --with-debug \
--with-compat \
--with-file-aio \
--with-threads \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_dav_module \
--with-http_degradation_module \
--with-http_flv_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_mp4_module \
--with-http_random_index_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_sub_module \
--with-http_v2_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
--with-stream_ssl_preread_module \
--with-stream_sni \
--with-pcre \
--with-pcre-jit \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_upstream_vnswrr_module/ \
--add-module=bundle/tengine-2.3.2/modules/mod_dubbo \
--add-module=bundle/tengine-2.3.2/modules/ngx_multi_upstream_module \
--add-module=bundle/tengine-2.3.2/modules/mod_config \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_concat_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_footer_filter_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_proxy_connect_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_reqstat_module \
--add-dynamic-module=bundle/tengine-2.3.2/modules/ngx_http_slice_module \
--add-dynamic-module=bundle/tengine-2.3.2/modules/ngx_http_sysguard_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_trim_filter_module \
--add-dynamic-module=bundle/tengine-2.3.2/modules/ngx_http_upstream_check_module \
--add-dynamic-module=bundle/tengine-2.3.2/modules/ngx_http_upstream_consistent_hash_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_upstream_dynamic_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_upstream_dyups_module \
--add-dynamic-module=bundle/tengine-2.3.2/modules/ngx_http_upstream_session_sticky_module \
--add-module=bundle/tengine-2.3.2/modules/ngx_http_user_agent_module \
--add-dynamic-module=bundle/tengine-2.3.2/modules/ngx_slab_stat \
> build.log 2>&1 || (cat build.log && exit 1)
make > build.log 2>&1 || (cat build.log && exit 1)
sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1)
cd ..
mkdir -p build-cache${OPENRESTY_PREFIX}
cp -r ${OPENRESTY_PREFIX}/* build-cache${OPENRESTY_PREFIX}
ls build-cache${OPENRESTY_PREFIX}
rm -rf openresty-${OPENRESTY_VERSION}
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
sudo apt-get -y update --fix-missing
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y "deb https://openresty.org/package/ubuntu $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install openresty-openssl-debug-dev
}
do_install() {
export_or_prefix
sudo apt-get -y update --fix-missing
sudo apt-get -y install software-properties-common
sudo apt-get update
sudo apt-get install lua5.1 liblua5.1-0-dev
tengine_install
./utils/linux-install-luarocks.sh
create_lua_deps
./utils/linux-install-etcd-client.sh
git clone https://github.com/iresty/test-nginx.git test-nginx
}
script() {
export_or_prefix
openresty -V
./t/grpc_server_example/grpc_server_example &
./bin/apisix help
./bin/apisix init
./bin/apisix init_etcd
./bin/apisix start
mkdir -p logs
sleep 1
./bin/apisix stop
sleep 1
# APISIX_ENABLE_LUACOV=1 PERL5LIB=.:$PERL5LIB prove -Itest-nginx/lib -r t
}
after_success() {
cat luacov.stats.out
luacov-coveralls
}
case_opt=$1
shift
case ${case_opt} in
before_install)
before_install "$@"
;;
do_install)
do_install "$@"
;;
script)
script "$@"
;;
after_success)
after_success "$@"
;;
esac

View File

@ -30,8 +30,6 @@ title: Install Dependencies
- Now by default Apache APISIX uses HTTP protocol to talk with etcd cluster, which is insecure. Please configure certificate and corresponding private key for your etcd cluster, and use "https" scheme explicitly in the etcd endpoints list in your Apache APISIX configuration, if you want to keep the data secure and integral. See the etcd section in `conf/config-default.yaml` for more details.
- If you want use Tengine instead of OpenResty, please take a look at this installation step script [Install Tengine at Ubuntu](https://github.com/apache/apisix/blob/master/ci/linux_tengine_runner.sh).
- If it is OpenResty 1.19, APISIX will use OpenResty's built-in LuaJIT to run `bin/apisix`; otherwise it will use Lua 5.1. If you encounter `luajit: lj_asm_x86.h:2819: asm_loop_ fixup: Assertion '((intptr_t)target & 15) == 0' failed`, this is a problem with the low version of OpenResty's built-in LuaJIT under certain compilation conditions.
- On some platforms, installing LuaRocks via the package manager will cause Lua to be upgraded to Lua 5.3, so we recommend installing LuaRocks via source code. if you install OpenResty and its OpenSSL develop library (openresty-openssl111-devel for rpm and openresty-openssl111-dev for deb) via the official repository, then [we provide a script for automatic installation](https://github.com/apache/apisix/blob/master/utils/linux-install-luarocks.sh). If you compile OpenResty yourself, you can refer to the above script and change the path in it. If you don't specify the OpenSSL library path when you compile, you don't need to configure the OpenSSL variables in LuaRocks, because the system's OpenSSL is used by default. If the OpenSSL library is specified at compile time, then you need to ensure that LuaRocks' OpenSSL configuration is consistent with OpenResty's.

View File

@ -39,8 +39,6 @@ dubbo-proxy plugin allows you proxy HTTP request to [**dubbo**](http://dubbo.apa
If you are using OpenResty, you need to build it with dubbo support, see [how to build](../how-to-build.md#step-6-build-openresty-for-apache-apisix)
To make http2dubbo work in APISIX, we enhance the dubbo module based on Tengine's `mod_dubbo`. The modifications are contributed back to Tengine, but they are not included in the latest release version (Tengine-2.3.2) yet. So Tengine itself is unsupported.
## Runtime Attributes
| Name | Type | Requirement | Default | Valid | Description |

View File

@ -66,7 +66,6 @@ A/B 测试、金丝雀发布(灰度发布)、蓝绿部署、限流限速、抵
- **全平台**
- 云原生: 平台无关,没有供应商锁定,无论裸机还是 KubernetesAPISIX 都可以运行。
- 运行环境: OpenResty 和 Tengine 都支持。
- 支持 ARM64: 不用担心底层技术的锁定。
- **多协议**
@ -219,7 +218,6 @@ A/B 测试、金丝雀发布(灰度发布)、蓝绿部署、限流限速、抵
| 插件热更新 | 是 | 否 |
| 用户自定义:负载均衡算法、路由 | 是 | 否 |
| resty <--> gRPC 转码 | 是 | 否 |
| 支持 Tengine 作为运行时 | 是 | 否 |
| MQTT 协议支持 | 是 | 否 |
| 配置生效时间 | 事件通知,低于 1 毫秒更新 | 定期轮询5 秒 |
| 自带控制台 | 是 | 否 |

View File

@ -30,8 +30,6 @@ title: 安装依赖
- 目前 Apache APISIX 默认使用 HTTP 协议与 etcd 集群通信,这并不安全,如果希望保障数据的安全性和完整性。 请为您的 etcd 集群配置证书及对应私钥,并在您的 Apache APISIX etcd endpoints 配置列表中明确使用 `https` 协议前缀。请查阅 `conf/config-default.yaml` 中 etcd 一节相关的配置来了解更多细节。
- 如果你要想使用 Tengine 替代 OpenResty请参考 [Install Tengine at Ubuntu](https://github.com/apache/apisix/blob/master/ci/linux_tengine_runner.sh)。
- 如果是 OpenResty 1.19APISIX 会使用 OpenResty 内置的 LuaJIT 来运行 `bin/apisix`;否则会使用 Lua 5.1。如果运行过程中遇到 `luajit: lj_asm_x86.h:2819: asm_loop_fixup: Assertion '((intptr_t)target & 15) == 0' failed`,这是低版本 OpenResty 内置的 LuaJIT 在特定编译条件下的问题。
- 在某些平台上,通过包管理器安装 LuaRocks 会导致 Lua 被升级为 Lua 5.3,所以我们建议通过源代码的方式安装 LuaRocks。如果你通过官方仓库安装 OpenResty 和 OpenResty 的 OpenSSL 开发库rpm 版本openresty-openssl111-develdeb 版本openresty-openssl111-dev那么 [我们提供了自动安装的脚本](https://github.com/apache/apisix/tree/master/utils/linux-install-luarocks.sh)。如果你是自己编译的 OpenResty可以参考上述脚本并修改里面的路径。如果编译时没有指定 OpenSSL 库的路径,那么无需配置 LuaRocks 内跟 OpenSSL 相关的变量,因为默认都是用的系统自带的 OpenSSL。如果编译时指定了 OpenSSL 库,那么需要保证 LuaRocks 的 OpenSSL 配置跟 OpenResty 的相一致。

View File

@ -38,7 +38,6 @@ title: dubbo-proxy
## 要求
如果你正在使用 `OpenResty`, 你需要编译它来支持 `dubbo`, 参考 [如何编译](../how-to-build.md#步骤6为-Apache-APISIX-构建-OpenResty)。
`APISIX` 中为了实现使从 `http` 代理到 `dubbo`,我们在 `Tengine``mod_dubbo` 基础上对 `dubbo` 模块做了改进。 所有的修改已经提交给 `Tengine`,但是还未合并到最新的 `release` 版本中(Tengine-2.3.2) 。所以目前 `Tengine` 自身是不支持此特性的。
## 运行时属性