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

Fixed CiaB build issue #4251

Merged
merged 2 commits into from
Jan 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
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