Merge pull request #3347 from thomasmckay/1290-nginx-vts

1290 - remove nginx vts
This commit is contained in:
thomasmckay 2019-02-05 14:14:23 -05:00 committed by GitHub
commit 39097b2318
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 125 deletions

View file

@ -63,10 +63,6 @@ RUN apt-get update && apt-get upgrade -y \
yarn=0.22.0-1 \ yarn=0.22.0-1 \
w3m # 13JUL2018 w3m # 13JUL2018
# Install nginx-module-vts
COPY scripts/build-nginx-vts.sh /tmp/build-nginx-vts.sh
RUN /tmp/build-nginx-vts.sh v0.1.18
# Install cfssl # Install cfssl
RUN curl -fsSL -o /bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 \ RUN curl -fsSL -o /bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 \
&& curl -fsSL -o /bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \ && curl -fsSL -o /bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \

View file

@ -65,14 +65,6 @@ http {
access_log /dev/stdout lb_logs; access_log /dev/stdout lb_logs;
} }
server {
include vhost-traffic-status.conf;
listen 9080 default;
access_log /dev/stdout lb_logs;
}
{% if v1_only_domain %} {% if v1_only_domain %}
server { server {
include server-base.conf; include server-base.conf;
@ -132,8 +124,6 @@ http {
resolver 127.0.0.1 valid=10s; resolver 127.0.0.1 valid=10s;
vhost_traffic_status_zone;
server { server {
include server-base.conf; include server-base.conf;
@ -141,14 +131,6 @@ http {
access_log /dev/stdout lb_logs; access_log /dev/stdout lb_logs;
} }
server {
include vhost-traffic-status.conf;
listen 9080 default;
access_log /dev/stdout lb_logs;
}
} }
{% endif %} {% endif %}

View file

@ -1,7 +0,0 @@
# vim: ft=nginx
server_name _;
root /dev/null;
vhost_traffic_status_display;

View file

@ -1,96 +0,0 @@
#!/bin/bash
if [ -z "${1}" ]; then
echo "Please specify a vts version to install."
exit 1
fi
set -euo pipefail
VTS_VERSION="${1}"
NGINX_VERSION="$(nginx -v 2>&1 | cut -d '/' -f 2)"
MODULES_DIR="/usr/lib/nginx/modules"
BUILD_PATH="/tmp/build"
VTS_PATH="${BUILD_PATH}/nginx-module-vts-${VTS_VERSION}"
mkdir -p "${BUILD_PATH}"
mkdir -p "${VTS_PATH}"
cd "${BUILD_PATH}"
echo "==> Downloading nginx-module-vts..."
curl -fsSL -o "nginx-module-vts-${VTS_VERSION}.tar.gz" \
"https://github.com/vozlt/nginx-module-vts/archive/${VTS_VERSION}.tar.gz"
# The directory in the tarball (infuriatingly) doesn't include the
# leading "v" in the version number, so this normalizes it.
tar xzf "nginx-module-vts-${VTS_VERSION}.tar.gz" -C "${VTS_PATH}" \
--strip-components 1
echo "==> Downloading nginx source..."
apt-get source -y nginx
apt-get install -y libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5
echo "==> Building nginx-module-vts..."
cd "nginx-${NGINX_VERSION}"
CCFLAGS='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC'
LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
(
# The options here need to match the output of `nginx -v`.
./configure --prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib/nginx/modules \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
--http-proxy-temp-path=/var/cache/nginx/proxy_temp \
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=/var/cache/nginx/scgi_temp \
--user=nginx \
--group=nginx \
--with-compat \
--with-file-aio \
--with-threads \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_dav_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_slice_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_sub_module \
--with-http_v2_module \
--with-mail \
--with-mail_ssl_module \
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-cc-opt="${CCFLAGS}" \
--with-ld-opt="${LDFLAGS}" \
--add-dynamic-module="${VTS_PATH}"
make modules
) 1>/dev/null
echo "==> Installing nginx-module-vts..."
cp -a objs/ngx_http_vhost_traffic_status_module.so \
"${MODULES_DIR}/ngx_http_vhost_traffic_status_module.so"
echo "==> Cleaning up..."
cd / && rm -fr "${BUILD_PATH}"
apt-get purge -y libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5