Skip to content

Commit 5cf1be3

Browse files
committed
fix: remove openldap dependencies from apisix
1 parent 4f9301c commit 5cf1be3

File tree

11 files changed

+10
-105
lines changed

11 files changed

+10
-105
lines changed

.github/workflows/fuzzing-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
sudo apt-get -y install software-properties-common
5151
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
5252
sudo apt-get update
53-
sudo apt-get install -y git openresty curl openresty-openssl111-dev unzip make gcc libldap2-dev
53+
sudo apt-get install -y git openresty curl openresty-openssl111-dev unzip make gcc
5454
./utils/linux-install-luarocks.sh
5555
5656
make deps

ci/centos7-ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ install_dependencies() {
2323

2424
# install build & runtime deps
2525
yum install -y wget tar gcc automake autoconf libtool make unzip \
26-
git sudo openldap-devel which ca-certificates openssl-devel \
26+
git sudo which ca-certificates openssl-devel \
2727
epel-release
2828

2929
# install newer curl

ci/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,5 @@ GRPC_SERVER_EXAMPLE_VER=20210819
146146

147147
linux_get_dependencies () {
148148
apt update
149-
apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev
149+
apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev
150150
}

ci/linux-install-openresty.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if [ "$OPENRESTY_VERSION" == "source" ]; then
7979
chmod +x build-apisix-base.sh
8080
./build-apisix-base.sh latest
8181

82-
sudo apt-get install -y openresty-openssl111 openresty-openssl111-debug-dev libldap2-dev openresty-pcre openresty-zlib
82+
sudo apt-get install -y openresty-openssl111 openresty-openssl111-debug-dev openresty-pcre openresty-zlib
8383

8484
exit 0
8585
fi
@@ -90,4 +90,4 @@ else
9090
openresty="openresty-debug=$OPENRESTY_VERSION*"
9191
fi
9292

93-
sudo apt-get install "$openresty" openresty-openssl111-debug-dev libldap2-dev
93+
sudo apt-get install "$openresty" openresty-openssl111-debug-dev

ci/performance_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set -ex
2222

2323
install_dependencies() {
2424
apt-get -y update --fix-missing
25-
apt-get -y install lua5.1 liblua5.1-0-dev libldap2-dev
25+
apt-get -y install lua5.1 liblua5.1-0-dev
2626
export_or_prefix
2727
export OPENRESTY_VERSION=source
2828
./ci/linux-install-openresty.sh

ci/pod/docker-compose.plugin.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,26 +123,6 @@ services:
123123
networks:
124124
skywalk_net:
125125

126-
127-
## OpenLDAP
128-
openldap:
129-
image: bitnami/openldap:2.5.8
130-
environment:
131-
- LDAP_ADMIN_USERNAME=amdin
132-
- LDAP_ADMIN_PASSWORD=adminpassword
133-
- LDAP_USERS=user01,user02
134-
- LDAP_PASSWORDS=password1,password2
135-
- LDAP_ENABLE_TLS=yes
136-
- LDAP_TLS_CERT_FILE=/certs/localhost_slapd_cert.pem
137-
- LDAP_TLS_KEY_FILE=/certs/localhost_slapd_key.pem
138-
- LDAP_TLS_CA_FILE=/certs/apisix.crt
139-
ports:
140-
- "1389:1389"
141-
- "1636:1636"
142-
volumes:
143-
- ./t/certs:/certs
144-
145-
146126
## Grafana Loki
147127
loki:
148128
image: grafana/loki:2.8.0

ci/redhat-ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ install_dependencies() {
2222

2323
# install build & runtime deps
2424
yum install -y --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms \
25-
wget tar gcc automake autoconf libtool make unzip git sudo openldap-devel hostname \
25+
wget tar gcc automake autoconf libtool make unzip git sudo hostname \
2626
which ca-certificates openssl-devel
2727

2828
# install newer curl

docs/en/latest/building-apisix.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -73,43 +73,6 @@ make install
7373

7474
This will install the runtime-dependent Lua libraries and the `apisix` CLI tool.
7575

76-
:::note
77-
78-
If you get an error message like `Could not find header file for LDAP/PCRE/openssl` while running `make deps`, use this solution.
79-
80-
`luarocks` supports custom compile-time dependencies (See: [Config file format](https://github.com/luarocks/luarocks/wiki/Config-file-format)). You can use a third-party tool to install the missing packages and add its installation directory to the `luarocks`' variables table. This method works on macOS, Ubuntu, CentOS, and other similar operating systems.
81-
82-
The solution below is for macOS but it works similarly for other operating systems:
83-
84-
1. Install `openldap` by running:
85-
86-
```shell
87-
brew install openldap
88-
```
89-
90-
2. Locate the installation directory by running:
91-
92-
```shell
93-
brew --prefix openldap
94-
```
95-
96-
3. Add this path to the project configuration file by any of the two methods shown below:
97-
1. You can use the `luarocks config` command to set `LDAP_DIR`:
98-
99-
```shell
100-
luarocks config variables.LDAP_DIR /opt/homebrew/cellar/openldap/2.6.1
101-
```
102-
103-
2. You can also change the default configuration file of `luarocks`. Open the file `~/.luaorcks/config-5.1.lua` and add the following:
104-
105-
```shell
106-
variables = { LDAP_DIR = "/opt/homebrew/cellar/openldap/2.6.1", LDAP_INCDIR = "/opt/homebrew/cellar/openldap/2.6.1/include", }
107-
```
108-
109-
`/opt/homebrew/cellar/openldap/` is default path `openldap` is installed on Apple Silicon macOS machines. For Intel machines, the default path is `/usr/local/opt/openldap/`.
110-
111-
:::
112-
11376
To uninstall the APISIX runtime, run:
11477

11578
```shell

docs/zh/latest/building-apisix.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -77,43 +77,6 @@ make install
7777

7878
该命令将安装 APISIX 运行时依赖的 Lua 库和 `apisix` 命令。
7979

80-
:::note
81-
82-
如果你在运行 `make deps` 时收到类似 `Could not find header file for LDAP/PCRE/openssl` 的错误消息,请使用此解决方案。
83-
84-
`luarocks` 支持自定义编译时依赖项(请参考:[配置文件格式](https://github.com/luarocks/luarocks/wiki/Config-file-format))。你可以使用第三方工具安装缺少的软件包并将其安装目录添加到 `luarocks` 变量表中。此方法适用于 macOS、Ubuntu、CentOS 和其他类似操作系统。
85-
86-
此处仅给出 macOS 的具体解决步骤,其他操作系统的解决方案类似:
87-
88-
1. 安装 `openldap`
89-
90-
```shell
91-
brew install openldap
92-
```
93-
94-
2. 使用以下命令命令找到本地安装目录:
95-
96-
```shell
97-
brew --prefix openldap
98-
```
99-
100-
3. 将路径添加到项目配置文件中(选择两种方法中的一种即可):
101-
1. 你可以使用 `luarocks config` 命令设置 `LDAP_DIR`
102-
103-
```shell
104-
luarocks config variables.LDAP_DIR /opt/homebrew/cellar/openldap/2.6.1
105-
```
106-
107-
2. 你还可以更改 `luarocks` 的默认配置文件。打开 `~/.luaorcks/config-5.1.lua` 文件并添加以下内容:
108-
109-
```shell
110-
variables = { LDAP_DIR = "/opt/homebrew/cellar/openldap/2.6.1", LDAP_INCDIR = "/opt/homebrew/cellar/openldap/2.6.1/include", }
111-
```
112-
113-
`/opt/homebrew/cellar/openldap/``brew` 在 macOS(Apple Silicon) 上安装 `openldap` 的默认位置。`/usr/local/opt/openldap/` 是 brew 在 macOS(Intel) 上安装 openldap 的默认位置。
114-
115-
:::
116-
11780
如果你不再需要 APISIX,可以执行以下命令卸载:
11881

11982
```shell

t/chaos/utils/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ RUN set -x \
3131
pkgconfig \
3232
cmake \
3333
git \
34-
openldap-dev \
3534
pcre-dev \
3635
sudo \
3736
&& cd apisix \

0 commit comments

Comments
 (0)