From b38c31464f787f4de586d74b2133a128da094686 Mon Sep 17 00:00:00 2001 From: Tom McKay Date: Mon, 28 Jan 2019 09:41:43 -0500 Subject: [PATCH] 1290 - remove nginx vts --- Dockerfile | 4 -- conf/nginx/nginx.conf.jnj | 18 ------ conf/nginx/vhost-traffic-status.conf | 7 -- scripts/build-nginx-vts.sh | 96 ---------------------------- 4 files changed, 125 deletions(-) delete mode 100644 conf/nginx/vhost-traffic-status.conf delete mode 100755 scripts/build-nginx-vts.sh diff --git a/Dockerfile b/Dockerfile index 89b95f730..5254962ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,10 +63,6 @@ RUN apt-get update && apt-get upgrade -y \ yarn=0.22.0-1 \ 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 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 \ diff --git a/conf/nginx/nginx.conf.jnj b/conf/nginx/nginx.conf.jnj index 656295a7c..94f46a386 100644 --- a/conf/nginx/nginx.conf.jnj +++ b/conf/nginx/nginx.conf.jnj @@ -65,14 +65,6 @@ http { 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 %} server { include server-base.conf; @@ -132,8 +124,6 @@ http { resolver 127.0.0.1 valid=10s; - vhost_traffic_status_zone; - server { include server-base.conf; @@ -141,14 +131,6 @@ http { access_log /dev/stdout lb_logs; } - - server { - include vhost-traffic-status.conf; - - listen 9080 default; - - access_log /dev/stdout lb_logs; - } } {% endif %} diff --git a/conf/nginx/vhost-traffic-status.conf b/conf/nginx/vhost-traffic-status.conf deleted file mode 100644 index a041cd96b..000000000 --- a/conf/nginx/vhost-traffic-status.conf +++ /dev/null @@ -1,7 +0,0 @@ -# vim: ft=nginx - -server_name _; - -root /dev/null; - -vhost_traffic_status_display; diff --git a/scripts/build-nginx-vts.sh b/scripts/build-nginx-vts.sh deleted file mode 100755 index f652b9c34..000000000 --- a/scripts/build-nginx-vts.sh +++ /dev/null @@ -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