From bb16d5cb27f693fa9237b7e453e417d537e81954 Mon Sep 17 00:00:00 2001 From: ocket8888 Date: Fri, 3 Jan 2020 07:58:48 -0700 Subject: [PATCH] Fixed CiaB build issue (#4251) * Fixed CiaB build issue * Removed commented-out lines (cherry picked from commit 78e6680a46cc51d560f92beea818e40a6e99af06) --- infrastructure/cdn-in-a-box/traffic_ops/Dockerfile | 5 +++-- .../cdn-in-a-box/traffic_ops/trafficops-init.sh | 12 +++--------- .../traffic_ops_data/profiles/000-GLOBAL.json | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile index 5c4b756edf..fe0cf4d31b 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile +++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile @@ -70,11 +70,12 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \ postgresql96-devel \ postgresql96-libs \ tar &&\ - yum -y clean all + yum -y clean all && mkdir -p /opt/traffic_ops/app/public -ADD https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz / +ADD traffic_router/core/src/test/resources/geo/GeoLite2-City.mmdb.gz /opt/traffic_ops/app/public/ WORKDIR /opt/traffic_ops/app + ADD traffic_ops/app/cpanfile traffic_ops/install/bin/install_goose.sh ./ RUN cpanm -l ./local Carton && \ POSTGRES_HOME=/usr/pgsql-9.6 PERL5LIB=$(pwd)/local/lib/perl5 ./local/bin/carton && \ diff --git a/infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh b/infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh index 711f3bac48..d03944525b 100755 --- a/infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh +++ b/infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh @@ -81,11 +81,11 @@ load_data_from() { for d in $endpoints; do [[ -d $d ]] || continue # Let containers know to write out server.json - if [[ "$d" = "deliveryservice_servers" ]] ; then + if [[ "$d" = "deliveryservice_servers" ]] ; then touch "$ENROLLER_DIR/initial-load-done" sync - fi - for f in "$d"/*.json; do + fi + for f in "$d"/*.json; do echo "Loading $f" delayfor "$f" envsubst "$vars" <$f > "$ENROLLER_DIR"/$f @@ -100,9 +100,3 @@ load_data_from() { # First, load required data at the top level load_data_from /traffic_ops_data - -# Copy the free MaxMind GeoLite DB to TrafficOps public directory -tar -C /var/tmp -zxpvf /GeoLite2-City.tar.gz -geo_dir=$(find /var/tmp -maxdepth 1 -type d -name GeoLite2-City\*) -gzip -c "$geo_dir/GeoLite2-City.mmdb" > "$TO_DIR/public/GeoLite2-City.mmdb.gz" -chown trafops:trafops "$TO_DIR/public/GeoLite2-City.mmdb.gz" diff --git a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/000-GLOBAL.json b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/000-GLOBAL.json index 13cb340ea8..ab37c5bb3c 100644 --- a/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/000-GLOBAL.json +++ b/infrastructure/cdn-in-a-box/traffic_ops_data/profiles/000-GLOBAL.json @@ -20,14 +20,14 @@ "value": "CDN-In-A-Box" }, { - "value": "https://trafficops.infra.ciab.test/GeoLiteCity.dat.gz", + "value": "https://trafficops.infra.ciab.test/GeoLite2-City.mmdb.gz", "configFile": "CRConfig.json", "name": "geolocation.polling.url" }, { "name": "geolocation6.polling.url", "configFile": "CRConfig.json", - "value": "https://trafficops.infra.ciab.test/GeoLiteCity.dat.gz" + "value": "https://trafficops.infra.ciab.test/GeoLite2-City.mmdb.gz" }, { "value": "Traffic Ops",