Skip to content

Commit

Permalink
Changes for ATC. 8.0.2 release (#8080)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrhoffman committed Sep 27, 2024
2 parents db383e3 + c210441 commit 6cc6356
Show file tree
Hide file tree
Showing 119 changed files with 508 additions and 310 deletions.
5 changes: 3 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ATS_VERSION=9.1.2
GO_VERSION=1.22.1
ATS_VERSION=9.2.4
GO_VERSION=1.23.1
POSTGRES_VERSION=13.16
2 changes: 1 addition & 1 deletion .github/actions/build-ats-test-rpm/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const spawnOptions = {
};

let atcComponent = process.env.ATC_COMPONENT;
const dockerCompose = ["docker-compose", "-f", `${process.env.GITHUB_WORKSPACE}/cache-config/testing/docker/docker-compose-ats-build.yml`];
const dockerCompose = ["docker", "compose", "-f", `${process.env.GITHUB_WORKSPACE}/cache-config/testing/docker/docker-compose-ats-build.yml`];
if (typeof atcComponent !== "string" || atcComponent.length === 0) {
console.error("Missing environment variable ATC_COMPONENT");
process.exit(1);
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/build-ciab/build-ciab.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const spawnOptions = {
stdio: "inherit",
stderr: "inherit"
};
const dockerCompose = ["docker-compose", "-f", "docker-compose.yml", "-f", "docker-compose.readiness.yml"];
const dockerCompose = ["docker", "compose", "-f", "docker-compose.yml", "-f", "docker-compose.readiness.yml"];
process.env.DOCKER_BUILDKIT = 1;
process.env.COMPOSE_DOCKER_CLI_BUILD = 1;

Expand Down Expand Up @@ -49,5 +49,5 @@ function runProcess(...commandArguments) {

moveRPMs();
process.chdir(`${process.env.GITHUB_WORKSPACE}/infrastructure/cdn-in-a-box`);
runProcess("make"); // Place the RPMs for docker-compose build. All RPMs should have already been built.
runProcess("make"); // Place the RPMs for docker compose build. All RPMs should have already been built.
runProcess(...dockerCompose, "build", "--parallel");
2 changes: 1 addition & 1 deletion .github/actions/cache-config-integration-tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const spawnOptions = {
stderr: "inherit",
};

const dockerCompose = ["docker-compose", "-f", `${process.env.GITHUB_WORKSPACE}/cache-config/testing/docker/docker-compose.yml`];
const dockerCompose = ["docker", "compose", "-f", `${process.env.GITHUB_WORKSPACE}/cache-config/testing/docker/docker-compose.yml`];

function runProcess(...commandArguments) {
console.info(...commandArguments);
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/health-client-integration-tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const spawnOptions = {
stderr: "inherit",
};

const dockerCompose = ["docker-compose", "-f", `${process.env.GITHUB_WORKSPACE}/tc-health-client/testing/docker/docker-compose.yml`];
const dockerCompose = ["docker", "compose", "-f", `${process.env.GITHUB_WORKSPACE}/tc-health-client/testing/docker/docker-compose.yml`];

function runProcess(...commandArguments) {
console.info(...commandArguments);
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/run-ciab/run-ciab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ set -ex;
store_ciab_logs() {
echo 'Storing CDN-in-a-Box logs...';
mkdir logs;
for service in $($docker_compose ps --services); do
for service in $($docker_compose ps --services --all); do
$docker_compose logs --no-color --timestamps "$service" >"logs/${service}.log";
done;
}

cd infrastructure/cdn-in-a-box;
logged_services='trafficrouter readiness';
other_services='dns edge enroller mid-01 mid-02 origin static trafficmonitor trafficops trafficstats';
docker_compose='docker-compose -f ./docker-compose.yml -f ./docker-compose.readiness.yml';
docker_compose='docker compose -f ./docker-compose.yml -f ./docker-compose.readiness.yml';
$docker_compose up -d $logged_services $other_services;
$docker_compose logs -f $logged_services &

Expand All @@ -38,7 +38,7 @@ if ! timeout 12m $docker_compose logs -f readiness >/dev/null; then
echo "CDN-in-a-Box didn't become ready within 12 minutes - exiting" >&2;
exit_code=1;
store_ciab_logs;
elif exit_code="$(docker inspect --format='{{.State.ExitCode}}' "$($docker_compose ps -q readiness)")"; [ "$exit_code" -ne 0 ]; then
elif exit_code="$(docker inspect --format='{{.State.ExitCode}}' "$($docker_compose ps -q --all readiness)")"; [ "$exit_code" -ne 0 ]; then
echo 'Readiness container exited with an error' >&2;
store_ciab_logs;
fi;
Expand Down
28 changes: 21 additions & 7 deletions .github/containers/trafficserver-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,36 @@
# specific language governing permissions and limitations
# under the License.

FROM alpine:latest AS build-trafficserver
FROM alpine:3.18 AS build-trafficserver
ARG ATS_VERSION
ADD https://downloads.apache.org/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 /tmp/
ADD https://archive.apache.org/dist/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 /tmp/
RUN set -o errexit -o nounset -o xtrace; \
cd tmp; \
dirname=trafficserver-${ATS_VERSION}; \
tar xf ${dirname}.tar.bz2; \
rm ${dirname}.tar.bz2; \
apk add --no-cache \
apk add --update --no-cache \
# configure dependencies
g++ \
perl \
openssl-dev \
pcre-dev \
make \
# build dependencies
libexecinfo-dev \
fortify-headers \
linux-headers \
zlib-dev; \
# Alpine versions above 3.16 do not contain package libexecinfo-dev,
# which ATS needs.
# https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/68#issuecomment-1571877109
apk add --update --no-cache \
--repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \
libexecinfo-dev; \
cd $dirname; \
# Fix is from https://github.com/apache/trafficserver-ingress-controller/pull/151
sed -i 's/PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP/PTHREAD_RWLOCK_INITIALIZER/' \
include/tscore/ink_rwlock.h \
include/tscpp/util/TsSharedMutex.h; \
./configure \
--disable-tests \
--enable-experimental-plugins \
Expand All @@ -52,13 +61,18 @@ RUN set -o errexit -o nounset -o xtrace; \
cd ..; \
rm -r $dirname

FROM alpine:latest
FROM alpine:3.18
COPY --from=build-trafficserver /tmp/built/ /
RUN apk add --no-cache \
RUN apk add --update --no-cache \
# runtime dependencies
libexecinfo \
libstdc++ \
pcre && \
# Alpine versions above 3.16 do not contain package libexecinfo,
# which ATS needs.
# https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/68#issuecomment-1571877109
apk add --update --no-cache \
--repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \
libexecinfo && \
adduser -D ats
USER ats
CMD /bin/traffic_server
7 changes: 3 additions & 4 deletions .github/containers/trafficserver-alpine/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
# specific language governing permissions and limitations
# under the License.

version: '3.9'
services:
trafficserver:
build:
context: .
dockerfile: Dockerfile
args:
ATS_VERSION: ${ATS_VERSION}
# This docker-compose file is no longer used by the container-trafficserver-alpine.yml
# This docker compose file is no longer used by the container-trafficserver-alpine.yml
# Github Actions workflow and is here in case anyone wants to build it manually, since
# the emulated aarch64 GitHub Actions job takes about 3 hours to run.
# To build the trafficserver image for only your computer's own platform, run
# docker-compose build
# docker compose build
#
# To build and push a single image including both linux/amd64 and linux/arm64 platforms, run
# # docker/binfmt writes to /proc/sys/fs/binfmt_misc and its effects are cleared on reboot
Expand All @@ -42,4 +41,4 @@ services:
- linux/amd64
- linux/arm64
# for example, ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine:9.1.2
image: ${CONTAINER:-ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine}:${ATS_VERSION}
image: ${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY:-apache/trafficcontrol}/ci/trafficserver-alpine}:${ATS_VERSION}
14 changes: 7 additions & 7 deletions .github/workflows/cache-config-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
Expand All @@ -106,7 +106,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/trafficcontrol-${{ github.job }}-*.x86_64.rpm
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
actual_rpm_name="$(ls dist | grep -E '^trafficserver-[0-9.]+-[0-9]+\.[0-9a-f]+.el${{ env.RHEL_VERSION }}.${{ env.TARGET_ARCH }}.rpm$')"
[[ "${{ steps.repo-info.outputs.expected-rpm-name }}" == "$actual_rpm_name" ]]
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
Expand All @@ -158,21 +158,21 @@ jobs:
- name: Checkout
uses: actions/checkout@master
- name: Download TO RPM
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: traffic_ops
path: ${{ github.workspace }}/cache-config/testing/docker/traffic_ops
- name: Download Cache Config RPM
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: cache-config
path: ${{ github.workspace }}/cache-config/testing/docker/ort_test
- name: Download ATS RPM
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: trafficserver
path: ${{ github.workspace }}/cache-config/testing/docker/yumserver/test-rpms
- name: Build cache config test containers
run: docker-compose -f ${{ github.workspace }}/cache-config/testing/docker/docker-compose.yml build --parallel
run: docker compose -f ${{ github.workspace }}/cache-config/testing/docker/docker-compose.yml build --parallel
- name: Run cache config integration tests
uses: ./.github/actions/cache-config-integration-tests
26 changes: 13 additions & 13 deletions .github/workflows/ciab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -119,7 +119,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -137,7 +137,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/trafficcontrol-${{ github.job }}-*.rpm
Expand All @@ -162,7 +162,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -185,7 +185,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -210,7 +210,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/*.rpm
Expand All @@ -228,7 +228,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -246,7 +246,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -264,7 +264,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand All @@ -282,7 +282,7 @@ jobs:
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm
Expand Down Expand Up @@ -317,7 +317,7 @@ jobs:
actual_rpm_name="$(ls dist | grep -E '^trafficserver-[0-9.]+-[0-9]+\.[0-9a-f]+.el${{ env.RHEL_VERSION }}.${{ env.TARGET_ARCH }}.rpm$')"
[[ "${{ steps.repo-info.outputs.expected-rpm-name }}" == "$actual_rpm_name" ]]
- name: Upload RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
Expand Down Expand Up @@ -348,15 +348,15 @@ jobs:
- name: Import cached Alpine Docker image
run: .github/actions/save-alpine-tar/entrypoint.sh load ${{ env.ALPINE_VERSION }}
- name: Download RPMs
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist/
- name: Build CDN-in-a-Box images
uses: ./.github/actions/build-ciab
- name: Start CDN-in-a-Box
uses: ./.github/actions/run-ciab
- name: Upload CDN-in-a-Box logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ciab-logs
path: infrastructure/cdn-in-a-box/logs/*.log
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container-trafficserver-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

name: Container ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine
name: Container trafficserver-alpine

env:
CONTAINER: ghcr.io/${{ github.repository }}/ci/trafficserver-alpine
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
with:
docs-folder: "docs/"
pre-build-command: "apt-get install -y pandoc"
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: HTMLDocumentation
path: docs/build/html/
Loading

0 comments on commit 6cc6356

Please sign in to comment.