Skip to content

Commit

Permalink
fix ciab-build (#125)
Browse files Browse the repository at this point in the history
* fix ciab-build

* fix yumserver Dockerfile

* Update Go version to 1.22.5 (apache#8034)

* Update Go version to 1.22.5

* Update some images to Rocky Linux 8

---------

Co-authored-by: asf-ci-trafficcontrol <asf-ci-trafficcontrol@users.noreply.github.com>
Co-authored-by: Zach Hoffman <zrhoffman@apache.org>

---------

Co-authored-by: asf-ci-trafficcontrol <asf-ci-trafficcontrol@users.noreply.github.com>
Co-authored-by: Zach Hoffman <zrhoffman@apache.org>
  • Loading branch information
3 people authored Jul 22, 2024
1 parent 22530c0 commit 8219f09
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ATS_VERSION=9.1.2
GO_VERSION=1.22.1
GO_VERSION=1.22.5
2 changes: 1 addition & 1 deletion GO_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.1
1.22.5
3 changes: 2 additions & 1 deletion cache-config/testing/docker/trafficserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ COPY cache-config/testing/docker/trafficserver/traffic_server_jemalloc \
cache-config/testing/docker/trafficserver/cjose.pic.patch \
cache-config/testing/docker/trafficserver/jansson.pic.patch \
cache-config/testing/docker/trafficserver/run.sh \
/
cache-config/testing/docker/trafficserver/trafficserver.env \
/

CMD /run.sh
1 change: 1 addition & 0 deletions cache-config/testing/docker/trafficserver/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ cd /root/rpmbuild/SOURCES
# clone the trafficserver repo
git clone https://github.com/apache/trafficserver.git --branch $ATS_VERSION || die "Failed to fetch the ATS Source"
cp /traffic_server_jemalloc .
cp /trafficserver.env .

# patch in the astats plugin
(cp -fa /astats_over_http /root/rpmbuild/SOURCES/trafficserver/plugins/astats_over_http
Expand Down
21 changes: 21 additions & 0 deletions cache-config/testing/docker/trafficserver/trafficserver.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0

STDOUTLOG=/var/log/trafficserver/traffic.out
STDERRLOG=/var/log/trafficserver/traffic.out
5 changes: 5 additions & 0 deletions cache-config/testing/docker/trafficserver/trafficserver.spec
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Apache Traffic Server with Apache Traffic Control modifications and environment
%setup -c -T
cp -far %{src}/. .
cp -fa %{src}/../traffic_server_jemalloc ..
cp -fa %{src}/../trafficserver.env ..
autoreconf -vfi

%build
Expand Down Expand Up @@ -81,8 +82,11 @@ make DESTDIR=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT/opt/trafficserver/etc/trafficserver/snapshots
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cp rc/trafficserver.service $RPM_BUILD_ROOT/usr/lib/systemd/system/
cp ../traffic_server_jemalloc $RPM_BUILD_ROOT/opt/trafficserver/bin/
touch $RPM_BUILD_ROOT/etc/sysconfig/trafficserver
cp ../trafficserver.env $RPM_BUILD_ROOT/etc/sysconfig/trafficserver
mkdir -p "${RPM_BUILD_ROOT}"/var/log/trafficserver

%if %{?_with_openssl_included:1}%{!?_with_openssl_included:0}
Expand Down Expand Up @@ -124,6 +128,7 @@ fi
%license LICENSE
%defattr(-,root,root)
%attr(644,-,-) /usr/lib/systemd/system/trafficserver.service
%attr(644,-,-) /etc/sysconfig/trafficserver
%dir /opt/trafficserver
%if %{?_with_openssl_included:1}%{!?_with_openssl_included:0}
/opt/trafficserver/openssl
Expand Down
4 changes: 2 additions & 2 deletions cache-config/testing/docker/yumserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
# Based on CentOS 6.6
############################################################

FROM centos:7
FROM rockylinux:8
MAINTAINER dev@trafficcontrol.apache.org

RUN yum install -y httpd createrepo yum-utils
RUN dnf install -y httpd createrepo yum-utils

RUN mkdir -p /var/www/html/traffic-control/7/x86_64/Packages
RUN sed -i -e 's/#ServerName www.example.com:80/ServerName www.example.com:80/g' /etc/httpd/conf/httpd.conf
Expand Down
14 changes: 9 additions & 5 deletions tc-health-client/testing/docker/db_init/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@
# Based on CentOS 7.2
############################################################

FROM centos/systemd
FROM rockylinux:8

RUN yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
RUN dnf install -y \
epel-release \
libicu \
"https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-$(rpm --eval %_arch)/pgdg-redhat-repo-latest.noarch.rpm" && \
dnf -y --repo=pgdg13 install postgresql13 && \
dnf -y remove pgdg-redhat-repo

RUN yum -y install \
postgresql13 \
RUN dnf -y install \
nmap-ncat \
cpanminus && \
yum clean all
dnf clean all

ENV POSTGRES_HOME $POSTGRES_HOME
ENV PGPASSWORD $PGPASSWORD
Expand Down
34 changes: 28 additions & 6 deletions traffic_ops/app/db/trafficvault/test/Dockerfile-db-admin
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,39 @@
# Dockerfile to build Traffic Ops DB admin test environment
############################################################

FROM centos:7
FROM rockylinux:8
ARG POSTGRES_VERSION=13.2
ENV POSTGRES_VERSION=$POSTGRES_VERSION

# NOTE: temporary workaround for removal of golang packages from CentOS 7 base repo
RUN yum install -y \
epel-release \
centos-release-scl-rh \
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
git && \
yum -y install golang
epel-release \
libicu \
"https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-$(rpm --eval %_arch)/pgdg-redhat-repo-latest.noarch.rpm" \
git && \
dnf -y --repo=pgdg13 install postgresql13 && \
dnf -y remove pgdg-redhat-repo && \
dnf -y --enablerepo=powertools install \
cpanminus \
expat-devel \
golang \
libcap \
libcurl-devel \
libidn-devel \
libpcap-devel \
mkisofs \
openssl-devel \
perl-core \
perl-Crypt-ScryptKDF \
perl-DBD-Pg \
perl-DBI \
perl-Digest-SHA1 \
perl-JSON \
perl-libwww-perl \
perl-TermReadKey \
perl-Test-CPAN-Meta \
perl-WWW-Curl \
python3

# Override TRAFFIC_OPS_RPM arg to use a different one using --build-arg TRAFFIC_OPS_RPM=... Can be local file or http://...
ARG TRAFFIC_OPS_RPM=traffic_ops.rpm
Expand Down
19 changes: 10 additions & 9 deletions traffic_ops_db/test/docker/Dockerfile-db-admin
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
# Dockerfile to build Traffic Ops DB admin test environment
############################################################

FROM centos:7
FROM rockylinux:8
ARG POSTGRES_VERSION=13.2
ENV POSTGRES_VERSION=$POSTGRES_VERSION

RUN yum install -y \
epel-release \
centos-release-scl-rh \
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
RUN dnf install -y \
epel-release \
libicu \
"https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-$(rpm --eval %_arch)/pgdg-redhat-repo-latest.noarch.rpm" \
git && \
yum -y install \
dnf -y --repo=pgdg13 install postgresql13 && \
dnf -y remove pgdg-redhat-repo && \
dnf -y --enablerepo=powertools install \
cpanminus \
expat-devel \
libcap \
Expand All @@ -47,9 +49,8 @@ RUN yum install -y \
perl-TermReadKey \
perl-Test-CPAN-Meta \
perl-WWW-Curl \
postgresql13 \
postgresql13-devel &&\
yum clean all
python3 && \
dnf clean all

# Override TRAFFIC_OPS_RPM arg to use a different one using --build-arg TRAFFIC_OPS_RPM=... Can be local file or http://...
ARG TRAFFIC_OPS_RPM=traffic_ops.rpm
Expand Down

0 comments on commit 8219f09

Please sign in to comment.