-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: install apisix-runtime when install APISIX from source #10729
fix: install apisix-runtime when install APISIX from source #10729
Conversation
Signed-off-by: Vacant <vacant@MasterNode.local>
sudo yum -y install centos-release-scl | ||
sudo yum -y install devtoolset-9 patch wget | ||
set +eu | ||
source scl_source enable devtoolset-9 | ||
set -eu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these dependencies do? There was no such thing before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, we used to use compiled apisix runtime repo packages, but now building from source code requires these dependencies.
Centos requires a higher version of gcc..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason to compile apisix-runtime from the source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Publishing the apisix-runtime repo will cause the installation of the apisix 3.7.0 deb package to fail.
- CI is built using source code and should be consistent.
- The apisix deb/rpm is a complete package and does not rely on the apisix runtime repo package, so building the apisix runtime is just an intermediate process.
sudo yum install -y \ | ||
gcc gcc-c++ curl wget unzip xz gnupg perl-ExtUtils-Embed cpanminus patch \ | ||
perl perl-devel pcre pcre-devel openldap-devel \ | ||
openresty-zlib-devel openresty-pcre-devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these dependencies do? There was no such thing before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, apsix-runtime was not built from source code.
} | ||
|
||
# Install dependencies on ubuntu and debian | ||
function install_dependencies_with_apt() { | ||
# add OpenResty source | ||
sudo apt-get update | ||
sudo apt-get -y install software-properties-common wget lsb-release | ||
sudo apt-get -y install software-properties-common wget lsb-release gnupg patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is the same as before, unless we do not build from the apisix runtime source code.
# install OpenResty and some compilation tools | ||
sudo apt-get install -y git openresty curl openresty-openssl111-dev make gcc libpcre3 libpcre3-dev libldap2-dev unzip | ||
# install some compilation tools | ||
sudo apt-get install -y curl make gcc g++ cpanminus libpcre3 libpcre3-dev libldap2-dev unzip openresty-zlib-dev openresty-pcre-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
docs/zh/latest/building-apisix.md
Outdated
``` | ||
|
||
现在,你可以运行以下命令,从 Github 克隆 APISIX 源码: | ||
现在,切换到 APISIX 源码的目录,你可以通过以下命令安装依赖项: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No dependencies in the command line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
|
||
export luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -O0" | ||
export debug_args=--with-debug | ||
yum install -y openresty-pcre-devel openresty-zlib-devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required to build the apisix-runtime.
yum -y install https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm | ||
|
||
export luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -O0" | ||
export debug_args=--with-debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./build-apisix-runtime.sh latest contains debug information.
Without with-debug, our test cases cannot pass.
@@ -43,9 +42,9 @@ install_dependencies() { | |||
|
|||
# install openresty to make apisix's rpm test work | |||
yum install -y yum-utils && yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo | |||
export luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -O0" | |||
export debug_args=--with-debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you remove export debug_args=--with-debug, all debug log will be suppressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./build-apisix-runtime.sh latest
contains debug information.
Without with-debug
, our test cases cannot pass.
# install OpenResty and some compilation tools | ||
# shellcheck disable=SC2086 | ||
sudo yum install -y openresty $common_dep | ||
sudo yum-config-manager --add-repo "https://openresty.org/package/${1}/openresty.repo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need apisix repo any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
if [ -f "./utils/linux-install-luarocks.sh" ]; then | ||
./utils/linux-install-luarocks.sh | ||
elif [ -f "./linux-install-luarocks.sh" ]; then | ||
./linux-install-luarocks.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file linux-install-luarocks.sh
is under the directory utils
, why need this judge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script can be executed separately in the utils/
directory.
Co-authored-by: Liu Wei <375636559@qq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
we have replace openresty by apisix-runtime now, but t he user guide and
install-dependencies.sh
have not been updateFixes #10684
Checklist