Skip to content

Commit

Permalink
Fixed CiaB build issue (#4251) (#4270)
Browse files Browse the repository at this point in the history
* Fixed CiaB build issue

* Removed commented-out lines

(cherry picked from commit 78e6680)
  • Loading branch information
ocket8888 authored and rawlinp committed Jan 9, 2020
1 parent 725ffa6 commit b6f52aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
5 changes: 3 additions & 2 deletions infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
12 changes: 3 additions & 9 deletions infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b6f52aa

Please sign in to comment.