Skip to content
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

Update trace modules #6122

Merged
merged 1 commit into from
Sep 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/nginx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DIR:=$(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
INIT_BUILDX=$(DIR)/../../hack/init-buildx.sh

# 0.0.0 shouldn't clobber any released builds
TAG ?= 0.107
TAG ?= 0.0
REGISTRY ?= gcr.io/k8s-staging-ingress-nginx

IMAGE = $(REGISTRY)/nginx
Expand Down
101 changes: 65 additions & 36 deletions images/nginx/rootfs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export NGINX_SUBSTITUTIONS=bc58cb11844bc42735bbaef7085ea86ace46d05b
export NGINX_OPENTRACING_VERSION=0.9.0
export OPENTRACING_CPP_VERSION=1.5.1
export ZIPKIN_CPP_VERSION=0.5.2
export JAEGER_VERSION=0.5.0
export JAEGER_VERSION=0.4.2
export MSGPACK_VERSION=3.2.1
export DATADOG_CPP_VERSION=1.2.0
export DATADOG_CPP_VERSION=1.1.5
export MODSECURITY_VERSION=b55a5778c539529ae1aa10ca49413771d52bb62e
export MODSECURITY_LIB_VERSION=v3.0.4
export OWASP_MODSECURITY_CRS_VERSION=v3.3.0
Expand Down Expand Up @@ -149,7 +149,7 @@ get_src 30affaf0f3a84193f7127cc0135da91773ce45d902414082273dae78914f73df \
get_src 3f943d1ac7bbf64b010a57b8738107c1412cb31c55c73f0772b4148614493b7b \
"https://github.com/SpiderLabs/ModSecurity-nginx/archive/$MODSECURITY_VERSION.tar.gz"

get_src c72609a1df7e61771ab9fac4b6d31a187d023cfe765ed488adec714c3cee7cde \
get_src 21257af93a64fee42c04ca6262d292b2e4e0b7b0660c511db357b32fd42ef5d3 \
"https://github.com/jaegertracing/jaeger-client-cpp/archive/v$JAEGER_VERSION.tar.gz"

get_src 464f46744a6be778626d11452c4db3c2d09461080c6db42e358e21af19d542f6 \
Expand All @@ -167,7 +167,7 @@ get_src 2a69815e4ae01aa8b170941a8e1a10b6f6a9aab699dee485d58f021dd933829a \
get_src 82bf1af1ee89887648b53c9df566f8b52ec10400f1641c051970a7540b7bf06a \
"https://github.com/openresty/luajit2/archive/$LUAJIT_VERSION.tar.gz"

get_src 3e6fe45f467d653870985cc52a1c2cf81a8a2c7a7bcf7ffcfedfd305a47a1eca \
get_src b84fd2fb0bb0578af4901db31d1c0ae909b532a1016fe6534cbe31a6c3ad6924 \
"https://github.com/DataDog/dd-opentracing-cpp/archive/v$DATADOG_CPP_VERSION.tar.gz"

get_src 6faab57557bd9cc9fc38208f6bc304c1c13cf048640779f98812cf1f9567e202 \
Expand Down Expand Up @@ -242,10 +242,14 @@ cd "$BUILD_PATH/opentracing-cpp-$OPENTRACING_CPP_VERSION"
mkdir .build
cd .build

cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DBUILD_MOCKTRACER=OFF \
..
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DWITH_BOOST_STATIC=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_MOCKTRACER=OFF \
-DBUILD_STATIC_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
..

make
make install
Expand All @@ -254,7 +258,7 @@ make install
cd "$BUILD_PATH/jaeger-client-cpp-$JAEGER_VERSION"
sed -i 's/-Werror/-Wno-psabi/' CMakeLists.txt

cat <<EOF > export.map
cat <<EOF > export.map
{
global:
OpenTracingMakeTracerFactory;
Expand All @@ -265,14 +269,17 @@ EOF
mkdir .build
cd .build

cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DJAEGERTRACING_BUILD_EXAMPLES=OFF \
-DJAEGERTRACING_BUILD_CROSSDOCK=OFF \
-DJAEGERTRACING_COVERAGE=OFF \
-DJAEGERTRACING_PLUGIN=ON \
-DHUNTER_CONFIGURATION_TYPES=Release \
-DJAEGERTRACING_WITH_YAML_CPP=ON ..
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DJAEGERTRACING_BUILD_EXAMPLES=OFF \
-DJAEGERTRACING_BUILD_CROSSDOCK=OFF \
-DJAEGERTRACING_COVERAGE=OFF \
-DJAEGERTRACING_PLUGIN=ON \
-DHUNTER_CONFIGURATION_TYPES=Release \
-DBUILD_SHARED_LIBS=OFF \
-DJAEGERTRACING_WITH_YAML_CPP=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
..

make
make install
Expand All @@ -297,9 +304,12 @@ mkdir .build
cd .build

cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_SHARED_LIBS=OFF \
-DWITH_BOOST_STATIC=ON \
-DBUILD_PLUGIN=ON \
-DBUILD_TESTING=OFF ..
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
..

make
make install
Expand All @@ -310,10 +320,10 @@ cd "$BUILD_PATH/msgpack-c-cpp-$MSGPACK_VERSION"
mkdir .build
cd .build
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_MOCKTRACER=OFF \
..
-DBUILD_SHARED_LIBS=OFF \
-DMSGPACK_BUILD_EXAMPLES=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
..

make
make install
Expand All @@ -323,7 +333,13 @@ cd "$BUILD_PATH/dd-opentracing-cpp-$DATADOG_CPP_VERSION"

mkdir .build
cd .build
cmake ..

cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED=OFF \
-DBUILD_STATIC=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \
..

make
make install
Expand Down Expand Up @@ -457,14 +473,10 @@ CC_OPT="-g -Og -fPIE -fstack-protector-strong \
--param=ssp-buffer-size=4 \
-DTCP_FASTOPEN=23 \
-fPIC \
-I$HUNTER_INSTALL_DIR/include \
-Wno-cast-function-type"

LD_OPT="-fPIE -fPIC -pie -Wl,-z,relro -Wl,-z,now"

if [[ ${ARCH} != "armv7l" ]]; then
CC_OPT+=" -I$HUNTER_INSTALL_DIR/include"
LD_OPT+=" -L$HUNTER_INSTALL_DIR/lib"
fi
LD_OPT="-fPIE -fPIC -pie -Wl,-z,relro -Wl,-z,now -L$HUNTER_INSTALL_DIR/lib"

if [[ ${ARCH} != "aarch64" ]]; then
WITH_FLAGS+=" --with-file-aio"
Expand Down Expand Up @@ -555,12 +567,17 @@ cd "$BUILD_PATH/lua-resty-string-$LUA_RESTY_STRING_VERSION"
make install

# build Lua bridge tracer
cd "$BUILD_PATH/lua-bridge-tracer-$LUA_BRIDGE_TRACER_VERSION"
mkdir .build
cd .build
cmake ..
make
make install
#cd "$BUILD_PATH/lua-bridge-tracer-$LUA_BRIDGE_TRACER_VERSION"
#mkdir .build
#cd .build
#
#cmake -DCMAKE_BUILD_TYPE=Release \
# -DBUILD_SHARED=OFF \
# -WITH_BOOST_STATIC=ON \
# ..
#
#make
#make install

# mimalloc
cd "$BUILD_PATH"
Expand All @@ -569,10 +586,22 @@ cd mimalloc

mkdir -p out/release
cd out/release

cmake ../..

make
make install

# check libraries are ok
#echo "Checking libraries..."
#for LIB in $(find /usr/local/lib -name "*.so");do
# ldd $LIB | grep 'not found'
# if [ $? -eq 0 ]; then
# echo "Dependencies is missing for $LIB"
# exit 1
# fi
#done

# update image permissions
writeDirs=( \
/etc/nginx \
Expand Down