diff --git a/.env b/.env index eec0601e6b..f7218a9923 100644 --- a/.env +++ b/.env @@ -1,3 +1,2 @@ -ATS_VERSION=9.2.4 -GO_VERSION=1.23.1 -POSTGRES_VERSION=13.16 +ATS_VERSION=9.1.2 +GO_VERSION=1.22.1 diff --git a/.github/actions/build-ats-test-rpm/main.js b/.github/actions/build-ats-test-rpm/main.js index 7af19ca2b6..7f3fc9919b 100644 --- a/.github/actions/build-ats-test-rpm/main.js +++ b/.github/actions/build-ats-test-rpm/main.js @@ -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); diff --git a/.github/actions/build-ciab/build-ciab.js b/.github/actions/build-ciab/build-ciab.js index 9d8c4c96a3..bd25010820 100644 --- a/.github/actions/build-ciab/build-ciab.js +++ b/.github/actions/build-ciab/build-ciab.js @@ -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; @@ -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"); diff --git a/.github/actions/cache-config-integration-tests/main.js b/.github/actions/cache-config-integration-tests/main.js index f126bb1c0f..167efb91f7 100644 --- a/.github/actions/cache-config-integration-tests/main.js +++ b/.github/actions/cache-config-integration-tests/main.js @@ -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); diff --git a/.github/actions/health-client-integration-tests/main.js b/.github/actions/health-client-integration-tests/main.js index 6b80091242..561cf8492e 100644 --- a/.github/actions/health-client-integration-tests/main.js +++ b/.github/actions/health-client-integration-tests/main.js @@ -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); diff --git a/.github/actions/run-ciab/run-ciab.sh b/.github/actions/run-ciab/run-ciab.sh index d675ba0f40..80c0e6631c 100755 --- a/.github/actions/run-ciab/run-ciab.sh +++ b/.github/actions/run-ciab/run-ciab.sh @@ -21,7 +21,7 @@ set -ex; store_ciab_logs() { echo 'Storing CDN-in-a-Box logs...'; mkdir logs; - for service in $($docker_compose ps --services --all); do + for service in $($docker_compose ps --services); do $docker_compose logs --no-color --timestamps "$service" >"logs/${service}.log"; done; } @@ -29,7 +29,7 @@ store_ciab_logs() { 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 & @@ -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 --all readiness)")"; [ "$exit_code" -ne 0 ]; then +elif exit_code="$(docker inspect --format='{{.State.ExitCode}}' "$($docker_compose ps -q readiness)")"; [ "$exit_code" -ne 0 ]; then echo 'Readiness container exited with an error' >&2; store_ciab_logs; fi; diff --git a/.github/containers/trafficserver-alpine/Dockerfile b/.github/containers/trafficserver-alpine/Dockerfile index 6ce641c268..9efce0a9b8 100644 --- a/.github/containers/trafficserver-alpine/Dockerfile +++ b/.github/containers/trafficserver-alpine/Dockerfile @@ -15,15 +15,15 @@ # specific language governing permissions and limitations # under the License. -FROM alpine:3.18 AS build-trafficserver +FROM alpine:latest AS build-trafficserver ARG ATS_VERSION -ADD https://archive.apache.org/dist/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 /tmp/ +ADD https://downloads.apache.org/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 --update --no-cache \ + apk add --no-cache \ # configure dependencies g++ \ perl \ @@ -31,20 +31,11 @@ RUN set -o errexit -o nounset -o xtrace; \ 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 \ @@ -61,18 +52,13 @@ RUN set -o errexit -o nounset -o xtrace; \ cd ..; \ rm -r $dirname -FROM alpine:3.18 +FROM alpine:latest COPY --from=build-trafficserver /tmp/built/ / -RUN apk add --update --no-cache \ +RUN apk add --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 diff --git a/.github/containers/trafficserver-alpine/docker-compose.yml b/.github/containers/trafficserver-alpine/docker-compose.yml index e5b4c2dc64..68cd428377 100644 --- a/.github/containers/trafficserver-alpine/docker-compose.yml +++ b/.github/containers/trafficserver-alpine/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. +version: '3.9' services: trafficserver: build: @@ -22,11 +23,11 @@ services: 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 @@ -41,4 +42,4 @@ services: - linux/amd64 - linux/arm64 # for example, ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine:9.1.2 - image: ${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY:-apache/trafficcontrol}/ci/trafficserver-alpine}:${ATS_VERSION} + image: ${CONTAINER:-ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine}:${ATS_VERSION} diff --git a/.github/workflows/cache-config-tests.yml b/.github/workflows/cache-config-tests.yml index 5150640659..f5ad388501 100644 --- a/.github/workflows/cache-config-tests.yml +++ b/.github/workflows/cache-config-tests.yml @@ -88,7 +88,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm @@ -106,7 +106,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/trafficcontrol-${{ github.job }}-*.x86_64.rpm @@ -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@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm @@ -158,21 +158,21 @@ jobs: - name: Checkout uses: actions/checkout@master - name: Download TO RPM - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 with: name: traffic_ops path: ${{ github.workspace }}/cache-config/testing/docker/traffic_ops - name: Download Cache Config RPM - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 with: name: cache-config path: ${{ github.workspace }}/cache-config/testing/docker/ort_test - name: Download ATS RPM - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 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 diff --git a/.github/workflows/ciab.yaml b/.github/workflows/ciab.yaml index a3a9a8c94a..39c6bee04c 100644 --- a/.github/workflows/ciab.yaml +++ b/.github/workflows/ciab.yaml @@ -101,7 +101,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -119,7 +119,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -137,7 +137,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/trafficcontrol-${{ github.job }}-*.rpm @@ -162,7 +162,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -185,7 +185,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -210,7 +210,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/*.rpm @@ -228,7 +228,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -246,7 +246,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -264,7 +264,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -282,7 +282,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.rpm @@ -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@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm @@ -348,7 +348,7 @@ 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@v4 + uses: actions/download-artifact@v2 with: path: ${{ github.workspace }}/dist/ - name: Build CDN-in-a-Box images @@ -356,7 +356,7 @@ jobs: - name: Start CDN-in-a-Box uses: ./.github/actions/run-ciab - name: Upload CDN-in-a-Box logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ciab-logs path: infrastructure/cdn-in-a-box/logs/*.log diff --git a/.github/workflows/container-trafficserver-alpine.yml b/.github/workflows/container-trafficserver-alpine.yml index 2ed1669ea6..7a1da09030 100644 --- a/.github/workflows/container-trafficserver-alpine.yml +++ b/.github/workflows/container-trafficserver-alpine.yml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: Container trafficserver-alpine +name: Container ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine env: CONTAINER: ghcr.io/${{ github.repository }}/ci/trafficserver-alpine diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 779f5c82f5..eb162e8567 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -49,7 +49,7 @@ jobs: with: docs-folder: "docs/" pre-build-command: "apt-get install -y pandoc" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v1 with: name: HTMLDocumentation path: docs/build/html/ diff --git a/.github/workflows/health-client-tests.yml b/.github/workflows/health-client-tests.yml index 1811891627..b1662194fb 100644 --- a/.github/workflows/health-client-tests.yml +++ b/.github/workflows/health-client-tests.yml @@ -82,7 +82,7 @@ jobs: env: ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm @@ -101,7 +101,7 @@ jobs: NO_SOURCE: 1 ATC_COMPONENT: ${{ github.job }} - name: Upload RPM - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/trafficcontrol-health-client-*.x86_64.rpm @@ -136,7 +136,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@v4 + uses: actions/upload-artifact@v2 with: name: ${{ github.job }} path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm @@ -153,23 +153,23 @@ jobs: - name: Checkout uses: actions/checkout@master - name: Download TO RPM - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 with: name: traffic_ops path: ${{ github.workspace }}/tc-health-client/testing/docker/traffic_ops - name: Download Health Client RPM - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 with: name: tc-health-client path: ${{ github.workspace }}/tc-health-client/testing/docker/health-check-test - name: Download ATS RPM - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v2 with: name: trafficserver path: ${{ github.workspace }}/tc-health-client/testing/docker/health-check-test - name: display directory run: ls -l ${{ github.workspace }}/tc-health-client/testing/docker/health-check-test - name: Build health client test containers - run: docker compose -f ${{ github.workspace }}/tc-health-client/testing/docker/docker-compose.yml build --parallel + run: docker-compose -f ${{ github.workspace }}/tc-health-client/testing/docker/docker-compose.yml build --parallel - name: Run health client integration tests uses: ./.github/actions/health-client-integration-tests diff --git a/.github/workflows/to.api.contract.tests.yml b/.github/workflows/to.api.contract.tests.yml index 043229de24..a709289967 100644 --- a/.github/workflows/to.api.contract.tests.yml +++ b/.github/workflows/to.api.contract.tests.yml @@ -105,13 +105,13 @@ jobs: version: 4 - name: Upload Vault logs if: ${{ steps.v4Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v4 Traffic Vault logs path: ${{ github.workspace }}/infrastructure/cdn-in-a-box/traffic.vault.logs - name: Upload Ops logs if: ${{ steps.v4Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v4 Traffic Ops logs path: ${{ github.workspace }}/traffic_ops/traffic_ops_golang/traffic.ops.log diff --git a/.github/workflows/to.integration.tests.yml b/.github/workflows/to.integration.tests.yml index 8cfd89207b..2be60a5f1c 100644 --- a/.github/workflows/to.integration.tests.yml +++ b/.github/workflows/to.integration.tests.yml @@ -123,13 +123,13 @@ jobs: flags: traffic_ops_integration,v3 - name: Upload v3 Vault logs if: ${{ steps.v3Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v3 Traffic Vault logs path: ${{ github.workspace }}/infrastructure/cdn-in-a-box/traffic.vault.logs - name: Upload v3 Ops logs if: ${{ steps.v3Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v3 Traffic Ops logs path: ${{ github.workspace }}/traffic_ops/traffic_ops_golang/traffic.ops.log @@ -200,13 +200,13 @@ jobs: flags: traffic_ops_integration,v4 - name: Upload v4 Vault logs if: ${{ steps.v4Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v4 Traffic Vault logs path: ${{ github.workspace }}/infrastructure/cdn-in-a-box/traffic.vault.logs - name: Upload v4 Ops logs if: ${{ steps.v4Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v4 Traffic Ops logs path: ${{ github.workspace }}/traffic_ops/traffic_ops_golang/traffic.ops.log @@ -279,13 +279,13 @@ jobs: flags: traffic_ops_integration,v5 - name: Upload v5 Vault logs if: ${{ steps.v5Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v5 Traffic Vault logs path: ${{ github.workspace }}/infrastructure/cdn-in-a-box/traffic.vault.logs - name: Upload v5 Ops logs if: ${{ steps.v5Tests.outcome != 'success' && always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: v5 Traffic Ops logs path: ${{ github.workspace }}/traffic_ops/traffic_ops_golang/traffic.ops.log diff --git a/.github/workflows/tp.integration.tests.yml b/.github/workflows/tp.integration.tests.yml index b6ce0d8daf..17fb097fac 100644 --- a/.github/workflows/tp.integration.tests.yml +++ b/.github/workflows/tp.integration.tests.yml @@ -165,7 +165,7 @@ jobs: with: smtp_address: 172.17.0.1 - name: Upload Report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 if: always() with: name: ${{ github.job }} diff --git a/.github/workflows/tpv2.yml b/.github/workflows/tpv2.yml index 66052b4c3c..57c156abfe 100644 --- a/.github/workflows/tpv2.yml +++ b/.github/workflows/tpv2.yml @@ -261,7 +261,7 @@ jobs: - name: Run everything and test uses: ./.github/actions/tpv2-integration-tests - name: Upload Report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 if: always() with: name: ${{ github.job }} diff --git a/.github/workflows/tr-ultimate-test-harness.yml b/.github/workflows/tr-ultimate-test-harness.yml index 67c7ed7a47..5dbb842193 100644 --- a/.github/workflows/tr-ultimate-test-harness.yml +++ b/.github/workflows/tr-ultimate-test-harness.yml @@ -62,10 +62,10 @@ jobs: go-version: ${{ env.GO_VERSION }} - name: Vendor dependencies run: go mod vendor - - name: Build docker compose services + - name: Build docker-compose services run: | - docker compose build --parallel && - docker compose pull db + docker-compose build --parallel && + docker-compose pull db - name: Cache local Maven repository uses: actions/cache@v2 with: @@ -81,7 +81,7 @@ jobs: restore-keys: | ${{ runner.os }}-node-modules- - name: Start the Dev CDN in a Box - run: docker compose up -d + run: docker-compose up -d - name: Wait until Traffic Ops is ready to accept requests run: | trap 'echo "Error on line ${LINENO} of setting interface IP addresses"; exit 1' ERR @@ -113,7 +113,7 @@ jobs: service_by_hostname[edge]=t3c for hostname in trafficrouter edge; do - container_id="$(docker compose ps -q --all "${service_by_hostname[$hostname]}")" + container_id="$(docker-compose ps -q "${service_by_hostname[$hostname]}")" interface="$(<<'JSON' jq { "mtu": 1500, @@ -202,12 +202,12 @@ jobs: run: | set -o errexit -o nounset mkdir -p dev/logs - for service in $(docker compose ps --all --services); do - docker compose logs --no-color --timestamps "$service" >"dev/logs/${service}.log" + for service in $(docker-compose ps --services); do + docker-compose logs --no-color --timestamps "$service" >"dev/logs/${service}.log" done if: ${{ failure() }} - name: Upload Dev CDN-in-a-Box logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: dev-ciab-logs path: dev/logs/*.log diff --git a/.github/workflows/tr.tests.yaml b/.github/workflows/tr.tests.yaml index 38bf66cc21..b04a7b6443 100644 --- a/.github/workflows/tr.tests.yaml +++ b/.github/workflows/tr.tests.yaml @@ -66,7 +66,7 @@ jobs: files: core/target/site/jacoco-aggregate/jacoco.xml flags: traffic_router_unit - name: Upload Surefire and Failsafe Reports - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 if: ${{ failure() }} with: name: junit-reports diff --git a/.github/workflows/traffic.ops.database.yml b/.github/workflows/traffic.ops.database.yml index ff04809cfb..758d61324b 100644 --- a/.github/workflows/traffic.ops.database.yml +++ b/.github/workflows/traffic.ops.database.yml @@ -51,6 +51,6 @@ jobs: - name: Build And Copy Traffic Ops RPM run: ./pkg traffic_ops_build && cp ./dist/traffic_ops-*.x86_64.rpm traffic_ops_db/test/docker/traffic_ops.rpm && cp ./dist/traffic_ops-*.x86_64.rpm traffic_ops/app/db/trafficvault/test/traffic_ops.rpm - name: Run Traffic Ops Database Docker Tests - run: cd traffic_ops_db/test/docker/ && docker compose up --build --exit-code-from trafficops-db-admin + run: cd traffic_ops_db/test/docker/ && docker-compose up --build --exit-code-from trafficops-db-admin - name: Run Traffic Vault Database Docker Tests - run: cd traffic_ops/app/db/trafficvault/test/ && docker compose up --build --exit-code-from trafficvault-db-admin + run: cd traffic_ops/app/db/trafficvault/test/ && docker-compose up --build --exit-code-from trafficvault-db-admin diff --git a/.gitignore b/.gitignore index 81e5f7f3f5..223bea41ea 100644 --- a/.gitignore +++ b/.gitignore @@ -51,7 +51,7 @@ vendor/**/.travis.yml .dbInfo /dist *.pyc -bin/docker compose +bin/docker-compose /.m2/ /.npm/ /.github/actions/**/node_modules/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8be864afae..8f8ab1906c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -##[8.0.2] - 2024-09-27 -- [#8081](https://github.com/apache/trafficcontrol/pull/8081) *GH Actions* Updates the versions used for actions/artifact-download and actions/artifact-upload. -- [#8079](https://github.com/apache/trafficcontrol/pull/8079) *Traffic Ops DB* Update Postgres version to 13.16. -- [#8071](https://github.com/apache/trafficcontrol/pull/8071) *Traffic Ops* Improve validation for the `id` field of the `PUT /deliveryservice_request_comments` endpoint. -- [#8056](https://github.com/apache/trafficcontrol/pull/8056) Remove the `version` key from compose files and use `docker compose` instead of `docker-compose`. - ## [8.0.1] - 2024-03-19 ### Fixed - [#7957](https://github.com/apache/trafficcontrol/pull/7957) *Traffic Ops*: Fix the incorrect display of delivery services assigned to ORG servers. diff --git a/GO_VERSION b/GO_VERSION index 49e0a31d49..6245beecd3 100644 --- a/GO_VERSION +++ b/GO_VERSION @@ -1 +1 @@ -1.23.1 +1.22.1 diff --git a/VERSION b/VERSION index 8b22a322d0..cd1d2e94f3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.2 +8.0.1 diff --git a/cache-config/testing/README.md b/cache-config/testing/README.md index 0bcbb7dce8..c624cdeed3 100644 --- a/cache-config/testing/README.md +++ b/cache-config/testing/README.md @@ -69,7 +69,7 @@ Docker containers you will need to provide the following resources: 4. You may copy an Apache Trafficserver RPM to the docker/yumserver/test-rpms directory or you can run: - **docker compose -f docker-compose-ats-build.yml run trafficserver_build** + **docker-compose -f docker-compose-ats-build.yml run trafficserver_build** to build an rpm which is copied to docker/yumserver/test-rpms. @@ -83,8 +83,8 @@ Docker containers you will need to provide the following resources: 6. Build the Docker images and run the ort test: ``` cd trafficcontrol/cache-config/testing/docker - docker compose build - docker compose run ort_test + docker-compose build + docker-compose run ort_test ``` After some time, test results should be available at 'ort-tests/test.log' diff --git a/cache-config/testing/docker/.env b/cache-config/testing/docker/.env deleted file mode 120000 index e72b3932f4..0000000000 --- a/cache-config/testing/docker/.env +++ /dev/null @@ -1 +0,0 @@ -../../../.env \ No newline at end of file diff --git a/cache-config/testing/docker/docker-compose-ats-build.yml b/cache-config/testing/docker/docker-compose-ats-build.yml index 1a085f0ed6..ca91deff47 100644 --- a/cache-config/testing/docker/docker-compose-ats-build.yml +++ b/cache-config/testing/docker/docker-compose-ats-build.yml @@ -18,6 +18,7 @@ # --- +version: '3.8' volumes: trafficcontrol: diff --git a/cache-config/testing/docker/docker-compose.yml b/cache-config/testing/docker/docker-compose.yml index 08712fb8a0..b072c72aec 100644 --- a/cache-config/testing/docker/docker-compose.yml +++ b/cache-config/testing/docker/docker-compose.yml @@ -22,11 +22,12 @@ # container updates ../ort-tests/tc-fixtures.json with # the corresponding version string) # -# Run: docker compose build -# Run: docker compose run ort_test +# Run: docker-compose build +# Run: docker-compose run ort_test # --- +version: '3.8' volumes: trafficcontrol: @@ -35,7 +36,7 @@ volumes: services: db: - image: postgres:${POSTGRES_VERSION} + image: postgres:13.2 env_file: - variables.env ports: @@ -50,7 +51,6 @@ services: args: - OS_DISTRO=${OS_DISTRO:-rockylinux} - OS_VERSION=${OS_VERSION:-8} - - POSTGRES_VERSION=${POSTGRES_VERSION} context: ../../.. dockerfile: cache-config/testing/docker/traffic_ops/Dockerfile volumes: diff --git a/cache-config/testing/docker/traffic_ops/Dockerfile b/cache-config/testing/docker/traffic_ops/Dockerfile index 83d1c38b22..c5f9d8c89c 100644 --- a/cache-config/testing/docker/traffic_ops/Dockerfile +++ b/cache-config/testing/docker/traffic_ops/Dockerfile @@ -39,7 +39,7 @@ RUN set -o nounset -o errexit && \ if [[ "${OS_VERSION%%.*}" -eq 7 ]]; then \ use_repo=''; \ enable_repo=''; \ - # needed for llvm-toolset-7-clang, which is needed for postgresql13-devel-13.X-1PGDG, required by TO rpm + # needed for llvm-toolset-7-clang, which is needed for postgresql13-devel-13.2-1PGDG, required by TO rpm dnf -y install gcc centos-release-scl-rh; \ else \ use_repo='--repo=pgdg13'; \ diff --git a/cache-config/testing/docker/yumserver/Dockerfile b/cache-config/testing/docker/yumserver/Dockerfile index 416f0e4d46..254b515c92 100644 --- a/cache-config/testing/docker/yumserver/Dockerfile +++ b/cache-config/testing/docker/yumserver/Dockerfile @@ -20,10 +20,10 @@ # Based on CentOS 6.6 ############################################################ -FROM rockylinux:8 +FROM centos:7 MAINTAINER dev@trafficcontrol.apache.org -RUN dnf install -y httpd createrepo yum-utils +RUN yum 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 diff --git a/dev/atc.dev.sh b/dev/atc.dev.sh index 9360af30e9..128f3e52c6 100644 --- a/dev/atc.dev.sh +++ b/dev/atc.dev.sh @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. -alias atc-start="docker compose up -d --build"; -alias atc-build="docker compose build"; -alias atc-stop="docker compose kill && docker compose down -v --remove-orphans"; +alias atc-start="docker-compose up -d --build"; +alias atc-build="docker-compose build"; +alias atc-stop="docker-compose kill && docker-compose down -v --remove-orphans"; function atc-restart { if ! atc-stop $@; then diff --git a/docker-compose.yml b/docker-compose.yml index 83c8d53bbc..d9da0325cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ # under the License. --- +version: '3.8' services: trafficops: @@ -38,7 +39,7 @@ services: - .:/go/src/github.com/apache/trafficcontrol db: - image: postgres:${POSTGRES_VERSION}-alpine + image: postgres:13.2-alpine ports: - 5432:5432 environment: diff --git a/docs/source/_ext/atc.py b/docs/source/_ext/atc.py index 6d6d050a1b..4b020bb63a 100644 --- a/docs/source/_ext/atc.py +++ b/docs/source/_ext/atc.py @@ -70,33 +70,6 @@ def atc_go_version(unused_typ: str, strong_node = nodes.strong(major_minor_version, major_minor_version) return [strong_node], [] -def atc_postgres_version( - unused_typ: None, - unused_rawtext: None, - unused_text: None, - lineno: int, - unused_inliner: None, - unused_options: None=None, - unused_content: None=None -) -> Tuple[List[nodes.Node], List[nodes.Node]]: - """ - A role that inserts the Postgres version used/required by this version of ATC. - - Example: - - :atc-postgres-version:_ - """ - env_file = os.path.join(os.path.dirname(__file__), "../../../.env") - with open(file=env_file, encoding="utf-8") as env_file: - env_file_contents = env_file.read() - - matches = re.search(pattern=r"^POSTGRES_VERSION=(\d+\.\d+)$", string=env_file_contents, flags=re.MULTILINE) - if matches is None: - raise ValueError(f"Postgres version found that could not be parsed: '{env_file_contents}' (from line {lineno})") - major_minor_version = matches.group(1) - strong_node = nodes.strong(major_minor_version, major_minor_version) - return [strong_node], [] - # -- Issue role -------------------------------------------------------------- from docutils import utils @@ -230,7 +203,6 @@ def setup(app: object) -> dict: text=(visit_impl_node, depart_impl_node)) app.add_directive("impl-detail", ImplementationDetail) app.add_role("atc-go-version", atc_go_version) - app.add_role("atc-postgres-version", atc_postgres_version) app.add_role("issue", issue_role) app.add_role("pr", pr_role) app.add_role("pull-request", pr_role) diff --git a/docs/source/admin/ansible-labs/ansible_labs.rst b/docs/source/admin/ansible-labs/ansible_labs.rst index 6207ea16f3..76c2d4f2ec 100644 --- a/docs/source/admin/ansible-labs/ansible_labs.rst +++ b/docs/source/admin/ansible-labs/ansible_labs.rst @@ -126,7 +126,7 @@ A simple scaffold for a lab directory is included at :atc-file:`infrastructure/a * The :atc-file:`infrastructure/ansible/sample.lab/ansible` subdirectory should be used to hold variables specific to a particular lab in either ``vars.yml`` or an encrypted Ansible ``vault`` * The :atc-file:`infrastructure/ansible/sample.lab/inventory` directory is where it's recommended for your provisioning layer to drop a valid Ansible inventory file describing what was allocated. When using Ansible, it's important to point the inventory source to this directory so that it will merge all available inventory files together for you. * The :atc-file:`infrastructure/ansible/sample.lab/out/ssl` directory is generated with the first run of the lab and holds your local copy of the lab SSL data. The out directory is also handy for holding temporary data from the provisioning or steady-state layers to help triage failures. -* The docker and docker compose related files are present as an optional wrapper for Linux hosts (doesn't work on OSX) around all the lab plumbing dependencies for Ansible. This is particularly handy for automated systems who perform regular redeployments such as in a CI/CD tool. +* The docker and docker-compose related files are present as an optional wrapper for Linux hosts (doesn't work on OSX) around all the lab plumbing dependencies for Ansible. This is particularly handy for automated systems who perform regular redeployments such as in a CI/CD tool. * :atc-file:`infrastructure/ansible/sample.lab/manual.run.sh` is a scaffold for the entrypoint for performing a lab rebuild from your local system. Gilt diff --git a/docs/source/admin/quick_howto/ciab.rst b/docs/source/admin/quick_howto/ciab.rst index 1d85d25860..1ffafd115e 100644 --- a/docs/source/admin/quick_howto/ciab.rst +++ b/docs/source/admin/quick_howto/ciab.rst @@ -38,7 +38,7 @@ The CDN in a Box directory is found within the Traffic Control repository at :fi .. note:: These can also be specified via the ``RPM`` variable to a direct Docker build of the component - with the exception of Traffic Router, which instead accepts ``TRAFFIC_ROUTER_RPM`` to specify a Traffic Router RPM and ``TOMCAT_RPM`` to specify an Apache Tomcat RPM. -These can all be supplied manually via the steps in :ref:`dev-building` (for Traffic Control component RPMs) or via some external source. Alternatively, the :file:`infrastructure/cdn-in-a-box/Makefile` file contains recipes to build all of these - simply run :manpage:`make(1)` from the :file:`infrastructure/cdn-in-a-box/` directory. Once all RPM dependencies have been satisfied, run ``docker compose build --parallel`` from the :file:`infrastructure/cdn-in-a-box/` directory to construct the images needed to run CDN in a Box. +These can all be supplied manually via the steps in :ref:`dev-building` (for Traffic Control component RPMs) or via some external source. Alternatively, the :file:`infrastructure/cdn-in-a-box/Makefile` file contains recipes to build all of these - simply run :manpage:`make(1)` from the :file:`infrastructure/cdn-in-a-box/` directory. Once all RPM dependencies have been satisfied, run ``docker-compose build --parallel`` from the :file:`infrastructure/cdn-in-a-box/` directory to construct the images needed to run CDN in a Box. .. tip:: If you have gone through the steps to :ref:`dev-building-natively`, you can run ``make native`` instead of ``make`` to build the RPMs quickly. Another option is running ``make -j4`` to build 4 components at once, if your computer can handle it. @@ -51,11 +51,11 @@ By default, CDN in a Box will be based on Rocky Linux 8. To base CDN in a Box on export BASE_IMAGE=centos RHEL_VERSION=7 make # Builds RPMs for CentOS 7 - docker compose build --parallel # Builds CentOS 7 CDN in a Box images + docker-compose build --parallel # Builds CentOS 7 CDN in a Box images Usage ----- -In a typical scenario, if the steps in `Building`_ have been followed, all that's required to start the CDN in a Box is to run ``docker compose up`` - optionally with the ``-d`` flag to run without binding to the terminal - from the :file:`infrastructure/cdn-in-a-box/` directory. This will start up the entire stack and should take care of any needed initial configuration. The services within the environment are by default not exposed locally to the host. If this is the desired behavior when bringing up CDN in a Box the command ``docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml up`` should be run. The ports are configured within the :file:`infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml` file, but the default ports are shown in :ref:`ciab-service-info`. Some services have credentials associated, which are totally configurable in `variables.env`_. +In a typical scenario, if the steps in `Building`_ have been followed, all that's required to start the CDN in a Box is to run ``docker-compose up`` - optionally with the ``-d`` flag to run without binding to the terminal - from the :file:`infrastructure/cdn-in-a-box/` directory. This will start up the entire stack and should take care of any needed initial configuration. The services within the environment are by default not exposed locally to the host. If this is the desired behavior when bringing up CDN in a Box the command ``docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml up`` should be run. The ports are configured within the :file:`infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml` file, but the default ports are shown in :ref:`ciab-service-info`. Some services have credentials associated, which are totally configurable in `variables.env`_. .. _ciab-service-info: .. table:: Service Info @@ -107,14 +107,14 @@ To test the demo1 Delivery Service: .. code-block:: shell :caption: Example Command to See the CDN in Action - sudo docker compose exec enroller curl -L "http://video.demo1.mycdn.ciab.test" + sudo docker-compose exec enroller curl -L "http://video.demo1.mycdn.ciab.test" To test the ``foo.kabletown.net.`` Federation: .. code-block:: shell :caption: Query the Federation CNAME using the Delivery Service hostname - sudo docker compose exec trafficrouter dig +short @trafficrouter.infra.ciab.test -t CNAME video.demo2.mycdn.ciab.test + sudo docker-compose exec trafficrouter dig +short @trafficrouter.infra.ciab.test -t CNAME video.demo2.mycdn.ciab.test # Expected response: foo.kabletown.net. @@ -127,7 +127,7 @@ In order to check the "readiness" of your CDN, you can optionally start the Read .. code-block:: shell :caption: Example Command to Run the Readiness Container - sudo docker compose -f docker-compose.readiness.yml up + sudo docker-compose -f docker-compose.readiness.yml up Integration Tests """"""""""""""""" @@ -137,14 +137,14 @@ There also exist TP and TO integration tests containers. Both of these container .. code-block:: shell :caption: Running TP Integration Tests - sudo docker compose -f docker-compose.traffic-portal-test.yml up + sudo docker-compose -f docker-compose.traffic-portal-test.yml up .. code-block:: shell :caption: Running TO Integration Tests - sudo docker compose -f docker-compose.traffic-ops-test.yml up + sudo docker-compose -f docker-compose.traffic-ops-test.yml up -.. note:: If all CDN in a Box containers are started at once (example: ``docker compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up -d edge enroller dns db smtp trafficops trafficvault integration``), the :ref:`Enroller ` initial data load is skipped to prevent data conflicts with the :ref:`Traffic Ops API tests fixtures `. +.. note:: If all CDN in a Box containers are started at once (example: ``docker-compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up -d edge enroller dns db smtp trafficops trafficvault integration``), the :ref:`Enroller ` initial data load is skipped to prevent data conflicts with the :ref:`Traffic Ops API tests fixtures `. variables.env """"""""""""" @@ -285,7 +285,7 @@ Multiple optional containers may be combined by using a shell alias: # From the infrastructure/cdn-in-a-box directory # (Assuming the names of the optional services are stored in the `NAME1` and `NAME2` environment variables) - alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.$NAME1.yml -f $PWD/optional/docker-compose.$NAME2.yml" + alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.$NAME1.yml -f $PWD/optional/docker-compose.$NAME2.yml" docker volume prune -f mydc build mydc up @@ -302,7 +302,7 @@ The TightVNC optional container provides a basic lightweight window manager (flu :caption: CIAB Startup Using Bash Alias # From infrastructure/cdn-in-a-box - alias mydc="docker compose "` \ + alias mydc="docker-compose "` \ `"-f $PWD/docker-compose.yml "` \ `"-f $PWD/docker-compose.expose-ports.yml "` \ `"-f $PWD/optional/docker-compose.vnc.yml "` \ @@ -381,7 +381,7 @@ Dante's socks proxy is an optional container that can be used to provide browser :caption: CIAB Startup Using Bash Alias # From infrastructure/cdn-in-a-box - alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.socksproxy.yml" + alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.socksproxy.yml" docker volume prune -f mydc build mydc kill @@ -390,17 +390,17 @@ Dante's socks proxy is an optional container that can be used to provide browser #. Once the CDN-in-a-box stack has started, use the aforementioned browser to access Traffic Portal via the socks proxy on the docker host. -.. seealso:: `The official Docker Compose documentation CLI reference `_ for complete instructions on how to pass service definition files to the ``docker compose`` executable. +.. seealso:: `The official Docker Compose documentation CLI reference `_ for complete instructions on how to pass service definition files to the ``docker-compose`` executable. Static Subnet ------------- -Since ``docker compose`` will randomly create a subnet and it has a chance to conflict with your network environment, using static subnet is a good choice. +Since ``docker-compose`` will randomly create a subnet and it has a chance to conflict with your network environment, using static subnet is a good choice. .. code-block:: shell :caption: CIAB Startup with Static Subnet # From the infrastructure/cdn-in-a-box directory - alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.static-subnet.yml" + alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.static-subnet.yml" docker volume prune -f mydc build mydc up @@ -417,7 +417,7 @@ How to use it :caption: CIAB Startup with VPN # From infrastructure/cdn-in-a-box - alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/docker-compose.expose-ports.yml -f $PWD/optional/docker-compose.vpn.yml -f $PWD/optional/docker-compose.vpn.expose-ports.yml" + alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/docker-compose.expose-ports.yml -f $PWD/optional/docker-compose.vpn.yml -f $PWD/optional/docker-compose.vpn.expose-ports.yml" mydc down -v mydc build mydc up @@ -444,12 +444,12 @@ If you want a GUI version of VPN client, we recommend `Tunnelblick `_ @@ -227,7 +227,7 @@ By default, the RPMs will be built targeting Rocky Linux 8. CentOS 7 is also a s export RHEL_VERSION=7 -.. warning:: Although there are no known issues with natively-built RPMs, the official, supported method of building the RPMs is by using :ref:`pkg ` or :ref:`docker compose `. Use natively-built RPMs at your own risk. +.. warning:: Although there are no known issues with natively-built RPMs, the official, supported method of building the RPMs is by using :ref:`pkg ` or :ref:`docker-compose `. Use natively-built RPMs at your own risk. Building Individual Components ============================== @@ -237,7 +237,7 @@ Building This Documentation --------------------------- See instructions for :ref:`building the documentation `. -.. [#compose-optional] This is optional, but recommended. If a ``docker compose`` executable is not available the ``pkg`` script will automatically download and run it using a container. This is noticeably slower than running it natively. +.. [#compose-optional] This is optional, but recommended. If a ``docker-compose`` executable is not available the ``pkg`` script will automatically download and run it using a container. This is noticeably slower than running it natively. .. [#optional-project] This project is "optional", which means that it cannot be built unless :option:`-o` is given. .. [#default-project] This is a default project, which will be built if ``pkg`` is run with no ``projects`` argument .. [#mac-jdk] If you are on macOS, you additionally need to :ref:`dev-tr-mac-jdk`. diff --git a/docs/source/development/debugging.rst b/docs/source/development/debugging.rst index f39ae1121f..ffb7b9308b 100644 --- a/docs/source/development/debugging.rst +++ b/docs/source/development/debugging.rst @@ -44,9 +44,9 @@ Enroller * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build/rebuild the ``enroller-debug`` image each time you have changed :atc-file:`infrastructure/cdn-in-a-box/enroller/enroller.go`. Then, start CDN-in-a-Box. .. code-block:: shell - :caption: docker compose command for debugging the CDN in a Box Enroller + :caption: docker-compose command for debugging the CDN in a Box Enroller - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build enroller mydc up @@ -103,9 +103,9 @@ t3c on Edge Cache * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build the ``edge-debug`` image to make sure it uses our fresh ``trafficcontrol-cache-config.rpm``. Then, start CDN-in-a-Box: .. code-block:: shell - :caption: docker compose command for debugging ``t3c`` running on the Edge Cache + :caption: docker-compose command for debugging ``t3c`` running on the Edge Cache - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build edge mydc up -d @@ -170,9 +170,9 @@ t3c on Mid 01 Cache * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build the ``mid-debug`` image to make sure it uses our fresh ``trafficcontrol-cache-config.rpm``. Then, start CDN-in-a-Box: .. code-block:: shell - :caption: docker compose command for debugging ``t3c`` running on the Mid 01 Cache + :caption: docker-compose command for debugging ``t3c`` running on the Mid 01 Cache - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build mid-01 mydc up -d @@ -237,9 +237,9 @@ t3c on Mid 02 Cache * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build the ``mid-debug`` image to make sure it uses our fresh ``trafficcontrol-cache-config.rpm``. Then, start CDN-in-a-Box: .. code-block:: shell - :caption: docker compose command for debugging ``t3c`` running on the Mid 02 Cache + :caption: docker-compose command for debugging ``t3c`` running on the Mid 02 Cache - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build mid-02 mydc up -d @@ -297,9 +297,9 @@ Traffic Monitor * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build the ``trafficmonitor-debug`` image to make sure it uses our fresh ``traffic_monitor.rpm``. Then, start CDN-in-a-Box: .. code-block:: shell - :caption: docker compose command for debugging Traffic Monitor + :caption: docker-compose command for debugging Traffic Monitor - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build trafficmonitor mydc up @@ -346,9 +346,9 @@ Traffic Ops * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build the ``trafficops-debug`` image to make sure it uses our fresh ``traffic_ops.rpm``. Then, start CDN-in-a-Box: .. code-block:: shell - :caption: docker compose command for debugging Traffic Ops + :caption: docker-compose command for debugging Traffic Ops - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build trafficops mydc up @@ -393,9 +393,9 @@ Traffic Router * Start CDN-in-a-Box, including the "expose ports" "debugging" compose files: .. code-block:: shell - :caption: docker compose command for debugging Traffic Router + :caption: docker-compose command for debugging Traffic Router - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build trafficrouter mydc up -d @@ -494,9 +494,9 @@ Traffic Stats * Stop CDN-in-a-Box if it is running and remove any existing volumes. Build the ``trafficstats-debug`` image to make sure it uses our fresh ``traffic_stats.rpm``. Then, start CDN-in-a-Box: .. code-block:: shell - :caption: docker compose command for debugging Traffic Stats + :caption: docker-compose command for debugging Traffic Stats - alias mydc='docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' + alias mydc='docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml -f optional/docker-compose.debugging.yml' mydc down -v mydc build trafficstats mydc up diff --git a/docs/source/development/traffic_ops.rst b/docs/source/development/traffic_ops.rst index f27d28c750..850c4d1c69 100644 --- a/docs/source/development/traffic_ops.rst +++ b/docs/source/development/traffic_ops.rst @@ -28,10 +28,7 @@ Software Requirements ===================== Traffic Ops is only supported on CentOS 7+ systems (although many developers do use Mac OS with some success). Here are the requirements: -- |install-postgres-link|_ - the machine where Traffic Ops is running must have the client tool set (e.g. :manpage:`psql(1)`), but the actual database can be run anywhere so long as it is accessible. - -.. |install-postgres-link| replace:: PostgreSQL :atc-postgres-version:`_` -.. _install-postgres-link: https://www.postgresql.org/download/ +- `PostgreSQL 13.2 `_ - the machine where Traffic Ops is running must have the client tool set (e.g. :manpage:`psql(1)`), but the actual database can be run anywhere so long as it is accessible. .. note:: Prior to version 13.2, Traffic Ops used version 9.6. For upgrading an existing Mac OS Homebrew-based PostgreSQL instance, you can use `Homebrew `_ to easily upgrade from 9.6 to 13.2: diff --git a/docs/source/development/traffic_router.rst b/docs/source/development/traffic_router.rst index 49a23bd9f3..a4aa9e1be6 100644 --- a/docs/source/development/traffic_router.rst +++ b/docs/source/development/traffic_router.rst @@ -301,7 +301,7 @@ Once your IDE is listening for debugging connections, start the unit tests: .. code-block:: shell :caption: Run the Traffic Router unit tests in Docker, with or without debugging enabled - docker compose up + docker-compose up RPM Packaging ============= diff --git a/experimental/graphql.sample/README.md b/experimental/graphql.sample/README.md index cf7e990e3a..511c6ffc03 100644 --- a/experimental/graphql.sample/README.md +++ b/experimental/graphql.sample/README.md @@ -1,13 +1,13 @@ # GraphQL Testing ## Getting started -1. Get docker and docker compose working -2. `docker compose up -d` +1. Get docker and docker-compose working +2. `docker-compose up -d` 3. Connect to PGAdmin at `localhost:80` 4. Create a new database `traffic_ops` owned by a new role `traffic_ops` 5. Restore a TO database dump -6. Stop the local env `docker compose down` -7. `docker compose up` +6. Stop the local env `docker-compose down` +7. `docker-compose up` 8. Connect to the interactive query tester `localhost:5000/graphiql` and start experimenting ### PGModler (optional, mac) diff --git a/experimental/graphql.sample/docker-compose.yml b/experimental/graphql.sample/docker-compose.yml index a776f82b40..d08ae2f01e 100644 --- a/experimental/graphql.sample/docker-compose.yml +++ b/experimental/graphql.sample/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' services: pg-db: diff --git a/experimental/traffic-portal/package-lock.json b/experimental/traffic-portal/package-lock.json index 7925fae7b6..3ce0ffa129 100644 --- a/experimental/traffic-portal/package-lock.json +++ b/experimental/traffic-portal/package-lock.json @@ -55,8 +55,8 @@ "@types/node-forge": "^1.3.2", "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", - "axios": "^0.28.0", - "chromedriver": "^129.0.1", + "axios": "^0.27.2", + "chromedriver": "^122.0.6", "codelyzer": "^6.0.0", "eslint": "^8.39.0", "eslint-plugin-import": "^2.25.3", @@ -9056,14 +9056,13 @@ } }, "node_modules/axios": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.28.1.tgz", - "integrity": "sha512-iUcGA5a7p0mVb4Gm/sy+FSECNkPFT4y7wt6OM/CDpO/OnNCvSs3PoMG8ibrC9jRoGYU0gUK5pXVC4NPXq6lHRQ==", + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" } }, "node_modules/axobject-query": { @@ -9933,9 +9932,9 @@ } }, "node_modules/chromedriver": { - "version": "129.0.1", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.1.tgz", - "integrity": "sha512-thJqK3c7p9rIhmjBvs/cgaK0Hk30g7LbnmMXQ2aLnn75ZOiEl/2GBcgc6fw+4GIw1SmOYhnNmaEI1iTP3qob0w==", + "version": "122.0.6", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-122.0.6.tgz", + "integrity": "sha512-Q0r+QlUtiJWMQ5HdYaFa0CtBmLFq3n5JWfmq9mOC00UMBvWxku09gUkvBt457QnYfTM/XHqY/HTFOxHvATnTmA==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/experimental/traffic-portal/package.json b/experimental/traffic-portal/package.json index ccbd653537..c8732397a3 100644 --- a/experimental/traffic-portal/package.json +++ b/experimental/traffic-portal/package.json @@ -96,9 +96,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", "axios": "^0.27.2", - "chromedriver": "^129.0.1", - "axios": "^0.28.0", - "chromedriver": "^129.0.1", + "chromedriver": "^122.0.6", "codelyzer": "^6.0.0", "eslint": "^8.39.0", "eslint-plugin-import": "^2.25.3", diff --git a/infrastructure/ansible/sample.lab/docker-compose.yaml b/infrastructure/ansible/sample.lab/docker-compose.yaml index 321461faf5..5d00e9cf81 100644 --- a/infrastructure/ansible/sample.lab/docker-compose.yaml +++ b/infrastructure/ansible/sample.lab/docker-compose.yaml @@ -12,6 +12,7 @@ # limitations under the License. # +version: '3.8' services: sample.driver.playbook: diff --git a/infrastructure/cdn-in-a-box/Makefile b/infrastructure/cdn-in-a-box/Makefile index fa4d976777..71e2e2e23b 100644 --- a/infrastructure/cdn-in-a-box/Makefile +++ b/infrastructure/cdn-in-a-box/Makefile @@ -220,7 +220,7 @@ $(TCH_RPM_ABSOLUTE): $(TCH_DIST_RPM) # Dist rpms $(ATS_DIST_RPM): $(ATS_SOURCE) - docker compose -f $(TC_DIR)/cache-config/testing/docker/docker-compose-ats-build.yml build --parallel trafficserver_build && docker compose -f $(TC_DIR)/cache-config/testing/docker/docker-compose-ats-build.yml run --rm trafficserver_build + docker-compose -f $(TC_DIR)/cache-config/testing/docker/docker-compose-ats-build.yml build --parallel trafficserver_build && docker-compose -f $(TC_DIR)/cache-config/testing/docker/docker-compose-ats-build.yml run --rm trafficserver_build $(TM_DIST_RPM): $(TM_SOURCE) "$(PKG_COMMAND)" $(PKG_FLAGS) traffic_monitor$(BUILD_SUFFIX) diff --git a/infrastructure/cdn-in-a-box/README.md b/infrastructure/cdn-in-a-box/README.md index 5daa09fb66..0eed1e889a 100644 --- a/infrastructure/cdn-in-a-box/README.md +++ b/infrastructure/cdn-in-a-box/README.md @@ -30,7 +30,7 @@ minimal CDN for full system testing. The containers run on Docker, and require Docker (tested v17.05.0-ce) and Docker Compose (tested v1.9.0) to build and run. On most 'nix systems these can be installed via the distribution's package manager under the names `docker-ce` and -`docker compose`, respectively (e.g. `sudo dnf install docker-ce`). +`docker-compose`, respectively (e.g. `sudo dnf install docker-ce`). Each container (except the origin) requires an `.rpm` file to install the Traffic Control component for which it is responsible. You can download these `*.rpm` files from an archive @@ -49,7 +49,7 @@ directories, such that their filenames are as follows: Finally, run the test CDN using the command: ```bash -docker compose up --build +docker-compose up --build ``` ## Readiness @@ -58,7 +58,7 @@ you can optionally start the "readiness" container which will test your CDN and exit successfully when your CDN in a Box is ready: ```bash -docker compose -f docker-compose.readiness.yml up --build +docker-compose -f docker-compose.readiness.yml up --build ``` If the container does not exit successfully after a reasonable amount of time, @@ -167,14 +167,14 @@ show you the default UI for interacting with the CDN - Traffic Portal. By default, `docker-compose.yml` does not expose ports to the host. This allows the host to be running other services on those ports, as well as allowing multiple CDN-in-a-Boxes to run on the same host, without port conflicts. -To expose the ports of each service on the host, add the `docker-compose.expose-ports.yml` file. For example, `docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml up`. +To expose the ports of each service on the host, add the `docker-compose.expose-ports.yml` file. For example, `docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml up`. ## Varnish By default, CDN-in-a-Box uses Apache Traffic Server as the cache server. To run CDN-in-a-Box with Varnish add the `docker-compose.varnish.yml` file. -For example, `docker compose -f docker-compose.yml -f docker-compose.varnish.yml up` +For example, `docker-compose -f docker-compose.yml -f docker-compose.varnish.yml up` ## Common Pitfalls @@ -201,7 +201,7 @@ In the trafficcontrol/infrastructure/cdn-in-a-box directory run the following: - `make build-builders` ~~> this will create all the rpms and copy each rpms into its own folder in the cdn-in-a-box project. This will also create the dist folder under trafficcontrol folder structure even if you deleted yours. -- `docker compose up` ~~> this will create docker images, and if rebuild is needed, run `docker compose up --build`. +- `docker-compose up` ~~> this will create docker images, and if rebuild is needed, run `docker-compose up --build`. ### Docker v4.11 and later of Docker Desktop for Mac diff --git a/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml b/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml index 4e04d2d113..b14b17b178 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.expose-ports.yml @@ -17,10 +17,11 @@ # # This compose file will expose the ports of each service on the host. # -# docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml up +# docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml up # --- +version: '3.8' services: db: diff --git a/infrastructure/cdn-in-a-box/docker-compose.readiness.yml b/infrastructure/cdn-in-a-box/docker-compose.readiness.yml index 8a3cde8a03..cf5840e9c3 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.readiness.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.readiness.yml @@ -15,21 +15,22 @@ # specific language governing permissions and limitations # under the License. -# This docker compose file starts a readiness service that will exit +# This docker-compose file starts a readiness service that will exit # successfully when it is able to successfully curl all delivery # service example URLs. # # For example: # -# docker compose -f docker-compose.yml -f docker-compose.readiness.yml up +# docker-compose -f docker-compose.yml -f docker-compose.readiness.yml up # # Or, start up the main services in the background and run the readiness # service in the foreground: # -# docker compose up -d -# docker compose -f docker-compose.readiness.yml up +# docker-compose up -d +# docker-compose -f docker-compose.readiness.yml up --- +version: '3.8' services: readiness: diff --git a/infrastructure/cdn-in-a-box/docker-compose.tr-load-tests.yml b/infrastructure/cdn-in-a-box/docker-compose.tr-load-tests.yml index 335cbdec54..a4c4befcc8 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.tr-load-tests.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.tr-load-tests.yml @@ -20,10 +20,11 @@ # make sure any container rpms you need are updated. Below is an # example of how to run the main compose with this file: # -# docker compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up -d edge enroller dns db smtp trafficops trafficvault integration -# docker compose -f docker-compose.traffic-ops-test.yml logs -f integration +# docker-compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up -d edge enroller dns db smtp trafficops trafficvault integration +# docker-compose -f docker-compose.traffic-ops-test.yml logs -f integration --- +version: '3.8' services: load-tests: diff --git a/infrastructure/cdn-in-a-box/docker-compose.traffic-ops-test.yml b/infrastructure/cdn-in-a-box/docker-compose.traffic-ops-test.yml index d107c5b309..acd959a80e 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.traffic-ops-test.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.traffic-ops-test.yml @@ -20,10 +20,11 @@ # make sure any container rpms you need are updated. Below is an # example of how to run the main compose with this file: # -# docker compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up -d edge enroller dns db smtp trafficops trafficvault integration -# docker compose -f docker-compose.traffic-ops-test.yml logs -f integration +# docker-compose -f docker-compose.yml -f docker-compose.traffic-ops-test.yml up -d edge enroller dns db smtp trafficops trafficvault integration +# docker-compose -f docker-compose.traffic-ops-test.yml logs -f integration --- +version: '3.8' services: integration: diff --git a/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml b/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml index 940a3d2b5c..85724f10dd 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml @@ -20,10 +20,11 @@ # make sure any container rpms you need are updated. Below is an # example of how to run the main compose with this file: # -# docker compose -f docker-compose.yml -f docker-compose.traffic-portal-test.yml up -d db edge trafficportal trafficops trafficvault portal-integration-test -# docker compose -f docker-compose.traffic-portal-test.yml logs -f portal-integration-test +# docker-compose -f docker-compose.yml -f docker-compose.traffic-portal-test.yml up -d db edge trafficportal trafficops trafficvault portal-integration-test +# docker-compose -f docker-compose.traffic-portal-test.yml logs -f portal-integration-test --- +version: '3.8' services: portal-integration-test: diff --git a/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-v2-test.yml b/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-v2-test.yml index 753e35c4d4..08b9566388 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-v2-test.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-v2-test.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' services: tpv2-e2e-test: diff --git a/infrastructure/cdn-in-a-box/docker-compose.varnish.yml b/infrastructure/cdn-in-a-box/docker-compose.varnish.yml index dcef62567d..f79ba0cff9 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.varnish.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.varnish.yml @@ -17,10 +17,11 @@ # # This compose file will run cache servers as Varnish instead of ATS. # -# docker compose -f docker-compose.yml -f docker-compose.varnish.yml up +# docker-compose -f docker-compose.yml -f docker-compose.varnish.yml up # --- +version: '3.8' services: edge: diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml b/infrastructure/cdn-in-a-box/docker-compose.yml index 6b0fcca0b4..37dc3c43ab 100644 --- a/infrastructure/cdn-in-a-box/docker-compose.yml +++ b/infrastructure/cdn-in-a-box/docker-compose.yml @@ -23,7 +23,7 @@ # # Adjust the settings in `variables.env` to suit your needs. # -# docker compose up -d +# docker-compose up -d # # The Traffic Ops API will then be available on https://localhost:6443, # and the postgres database on localhost 5432. @@ -31,14 +31,13 @@ # Note that this setup is intended for testing and not for production use. --- +version: '3.8' services: # db is the Traffic Ops database running in postgresql. Only trafficops needs to have access to it. # All other components access the database thru the Traffic Ops API db: build: - args: - POSTGRES_VERSION: ${POSTGRES_VERSION} context: . dockerfile: traffic_ops/Dockerfile-db hostname: db diff --git a/infrastructure/cdn-in-a-box/health/tc-health-client-ReadMe.md b/infrastructure/cdn-in-a-box/health/tc-health-client-ReadMe.md index f0a2084ac8..04c3cf1a2f 100644 --- a/infrastructure/cdn-in-a-box/health/tc-health-client-ReadMe.md +++ b/infrastructure/cdn-in-a-box/health/tc-health-client-ReadMe.md @@ -21,7 +21,7 @@ ## Building and Running -Build and run cdn-in-a-box `docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml up`, once up and running, using docker desktop, navigate to terminal tab of an edge or mid. cd into `/var/log/trafficcontrol` and run `tail -f tc-health-client.log`. Click on the `Open in external terminal` on upper right side and cd into `/usr/bin` and run `./tc-health-client`. Wait for the dispersion time to pass and then logs will start in the window where the tail command was ran. After that you may interact with it via Traffic Portal. +Build and run cdn-in-a-box `docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml up`, once up and running, using docker desktop, navigate to terminal tab of an edge or mid. cd into `/var/log/trafficcontrol` and run `tail -f tc-health-client.log`. Click on the `Open in external terminal` on upper right side and cd into `/usr/bin` and run `./tc-health-client`. Wait for the dispersion time to pass and then logs will start in the window where the tail command was ran. After that you may interact with it via Traffic Portal. ## Enable Debug instructions [Different from Production] @@ -33,11 +33,11 @@ Watch logs in the docker desktop tab where `tail -f tc-health-client.log` was ra ## Config files for Testing Only -For testing only the `tc-health-client.json` are the settings used to run it locally and can be changed. If changed `purge` all containers and run `docker compose -f docker-compose.yml -f docker-compose.expose-ports.yml up` in the `infrastructure/cdn-in-a-box/` folder. Same applies if the `tc-health-client.service` and `to-creds` files are changed. The `tc-health-client.service` is set for `Debug` mode with `vvv` which is different from Production which is `vv`. +For testing only the `tc-health-client.json` are the settings used to run it locally and can be changed. If changed `purge` all containers and run `docker-compose -f docker-compose.yml -f docker-compose.expose-ports.yml up` in the `infrastructure/cdn-in-a-box/` folder. Same applies if the `tc-health-client.service` and `to-creds` files are changed. The `tc-health-client.service` is set for `Debug` mode with `vvv` which is different from Production which is `vv`. ## Rebuilding the tc-health-client only -Delete the `trafficcontrol-health-client-[version].rpm` from the `\dist` folder and from `/trafficcontrol/infrastructure/cdn-in-a-box/health` then cd into `/trafficcontrol` and run `./pkg -v -8 -b tc-health-client_build` this builds the RPM to be used with docker or `./pkg -v -8 tc-health-client_build` to build x86_64. Then copy the rpm from `/dist` into `/trafficcontrol/infrastructure/cdn-in-a-box/health` and rename it to `trafficcontrol-health-client.rpm` by removing the version. Build and run with `docker compose -f docker-compose.yml -f docker compose`. +Delete the `trafficcontrol-health-client-[version].rpm` from the `\dist` folder and from `/trafficcontrol/infrastructure/cdn-in-a-box/health` then cd into `/trafficcontrol` and run `./pkg -v -8 -b tc-health-client_build` this builds the RPM to be used with docker or `./pkg -v -8 tc-health-client_build` to build x86_64. Then copy the rpm from `/dist` into `/trafficcontrol/infrastructure/cdn-in-a-box/health` and rename it to `trafficcontrol-health-client.rpm` by removing the version. Build and run with `docker-compose -f docker-compose.yml -f docker-compose`. ## Example Testing Commands diff --git a/infrastructure/cdn-in-a-box/optional/README.md b/infrastructure/cdn-in-a-box/optional/README.md index 51b6005908..0f17560455 100644 --- a/infrastructure/cdn-in-a-box/optional/README.md +++ b/infrastructure/cdn-in-a-box/optional/README.md @@ -19,12 +19,12 @@ ## CDN-In-A-Box Optional Container(s) -Create an alias to utilize these container(s) with the core CDN-In-A-Box stack. Note, that the exposed port(s) have been moved to an optional docker compose file to allow for concurrent CiaB instances. +Create an alias to utilize these container(s) with the core CDN-In-A-Box stack. Note, that the exposed port(s) have been moved to an optional docker-compose file to allow for concurrent CiaB instances. From the top-level directory of `cdn-in-a-box` create the following alias: ``` -alias mydc="docker compose "` \ +alias mydc="docker-compose "` \ `"-f $PWD/docker-compose.yml "` \ `"-f $PWD/docker-compose.expose-ports.yml "` \ `"-f $PWD/optional/docker-compose.$NAME1.yml "` \ @@ -37,7 +37,7 @@ For example, to add the socksproxy and vnc optional container(s), use the follow ``` -alias mydc="docker compose "` \ +alias mydc="docker-compose "` \ `"-f $PWD/docker-compose.yml "` \ `"-f $PWD/docker-compose.expose-ports.yml "` \ `"-f $PWD/optional/docker-compose.socksproxy.yml "` \ diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.debugging.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.debugging.yml index 5ef0f4faec..c32d2465d5 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.debugging.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.debugging.yml @@ -18,6 +18,7 @@ # Exposes debugging ports --- +version: '3.8' services: enroller: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.expose-ports.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.expose-ports.yml index 57fe940a0e..f33b5ae294 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.expose-ports.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.expose-ports.yml @@ -18,6 +18,7 @@ # Expose the Grafana container on the host on port 3000 --- +version: '3.8' services: grafana: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.yml index 0942f591b1..df35b3e340 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.grafana.yml @@ -18,7 +18,7 @@ # This container provide a Grafana service. # To start up CiaB with optional Grafana container: # -# alias mydc="docker compose "` \ +# alias mydc="docker-compose "` \ # `"-f $PWD/docker-compose.yml "` \ # `"-f $PWD/optional/docker-compose.grafana.yml "` # @@ -37,6 +37,7 @@ --- +version: '3.8' services: grafana: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.expose-ports.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.expose-ports.yml index b607e7e87b..400215d07a 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.expose-ports.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.expose-ports.yml @@ -19,7 +19,7 @@ # # From ./infrastructure/cdn-in-a-box # -# alias mydc="docker compose "` \ +# alias mydc="docker-compose "` \ # `"-f $PWD/docker-compose.yml "` \ # `"-f $PWD/docker-compose.expose-ports.yml "` \ # `"-f $PWD/optional/docker-compose.socksproxy.yml "` \ @@ -31,6 +31,7 @@ # Note that this setup is intended for testing and not for production use. # --- +version: '3.8' services: socksproxy: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml index a24e0ca19f..9e42a9ad61 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml @@ -24,7 +24,7 @@ # # To start up CiaB with VNC optional container: # -# alias mydc="docker compose "` \ +# alias mydc="docker-compose "` \ # `"-f $PWD/docker-compose.yml "` \ # `"-f $PWD/docker-compose.expose-ports.yml "` \ # `"-f $PWD/optional/docker-compose.socksproxy.yml "` \ @@ -36,6 +36,7 @@ # Note that this setup is intended for testing and not for production use. # --- +version: '3.8' services: # Optional Socks Proxy for docker hosts that have limited bridge/ipforwarding support. diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.static-subnet.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.static-subnet.yml index 85349e45b7..7e8f433ea0 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.static-subnet.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.static-subnet.yml @@ -16,6 +16,7 @@ # under the License. --- +version: '3.8' networks: default: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-portal-v2.expose-ports.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-portal-v2.expose-ports.yml deleted file mode 100644 index 4f824895bd..0000000000 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-portal-v2.expose-ports.yml +++ /dev/null @@ -1,22 +0,0 @@ -# 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. ---- - -services: - trafficportalv2: - ports: - - "8443:443" diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-portal-v2.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-portal-v2.yml deleted file mode 100644 index 73b5753b55..0000000000 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-portal-v2.yml +++ /dev/null @@ -1,43 +0,0 @@ -# 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. ---- - -services: - - trafficportalv2: - build: - context: . - dockerfile: optional/traffic_portal_v2/Dockerfile - args: - # Change BASE_IMAGE to centos when RHEL_VERSION=7 - BASE_IMAGE: ${BASE_IMAGE:-rockylinux} - RHEL_VERSION: ${RHEL_VERSION:-8} - TRAFFIC_PORTAL_RPM: optional/traffic_portal_v2/traffic_portal_v2.rpm - depends_on: - - enroller - domainname: infra.ciab.test - env_file: - - variables.env - hostname: trafficportalv2 - image: trafficportalv2 - volumes: - - shared:/shared - -volumes: - shared: - external: false - junit: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.expose-ports.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.expose-ports.yml index 2e81077e3f..873b2197c9 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.expose-ports.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.expose-ports.yml @@ -18,6 +18,7 @@ # Expose the trafficvault container on the host on ports 8087, 8088, and 8098 --- +version: '3.8' services: trafficvault: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.yml index b6b769debb..fdabde0b69 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.traffic-vault.yml @@ -20,10 +20,11 @@ # # Below is an example of how to run the main compose with this file: # -# docker compose -f docker-compose.yml -f optional/docker-compose.traffic-vault.yml up +# docker-compose -f docker-compose.yml -f optional/docker-compose.traffic-vault.yml up # --- +version: '3.8' services: trafficvault: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.expose-ports.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.expose-ports.yml index 6c0c3e5d8e..49cde090f4 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.expose-ports.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.expose-ports.yml @@ -19,7 +19,7 @@ # # From ./infrastructure/cdn-in-a-box # -# alias mydc="docker compose "` \ +# alias mydc="docker-compose "` \ # `"-f $PWD/docker-compose.yml "` \ # `"-f $PWD/docker-compose.expose-ports.yml "` \ # `"-f $PWD/optional/docker-compose.vnc.yml "` \ @@ -31,6 +31,7 @@ # Note that this setup is intended for testing and not for production use. # --- +version: '3.8' services: vnc: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml index 9c5277fc55..5163c7bb20 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml @@ -25,7 +25,7 @@ # # To start up CiaB with VNC optional container: # -# alias mydc="docker compose "` \ +# alias mydc="docker-compose "` \ # `"-f $PWD/docker-compose.yml "` \ # `"-f $PWD/docker-compose.expose-ports.yml "` \ # `"-f $PWD/optional/docker-compose.vnc.yml "` \ @@ -37,6 +37,7 @@ # Note that this setup is intended for testing and not for production use. # --- +version: '3.8' services: # TestClient is a VNC/Proxy container for development/testing CDN-In-A-Box diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.expose-ports.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.expose-ports.yml index 731670ee35..b49038032a 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.expose-ports.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.expose-ports.yml @@ -27,6 +27,7 @@ # connect to this OpenVPN server by it. --- +version: '3.8' services: vpn: diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.yml index 1d0c5774d5..88a683da86 100644 --- a/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.yml +++ b/infrastructure/cdn-in-a-box/optional/docker-compose.vpn.yml @@ -20,7 +20,7 @@ # # To start up CiaB with OpenVPN optional container: # -# alias mydc="docker compose "` \ +# alias mydc="docker-compose "` \ # `"-f $PWD/docker-compose.yml "` \ # `"-f $PWD/docker-compose.expose-ports.yml "` \ # `"-f $PWD/optional/docker-compose.vpn.yml "` \ @@ -36,6 +36,7 @@ # connect to this OpenVPN server by it. --- +version: '3.8' services: vpn: diff --git a/infrastructure/cdn-in-a-box/optional/socksproxy/README.md b/infrastructure/cdn-in-a-box/optional/socksproxy/README.md index 889aa2015c..193dd72429 100644 --- a/infrastructure/cdn-in-a-box/optional/socksproxy/README.md +++ b/infrastructure/cdn-in-a-box/optional/socksproxy/README.md @@ -27,7 +27,7 @@ when running the CDN-In-A-Box stack on OSX/Windows docker host that lack network ``` # From infrastructure/cdn-in-a-box -alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.socksproxy.yml" +alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.socksproxy.yml" docker volume prune -f mydc build mydc kill diff --git a/infrastructure/cdn-in-a-box/optional/vnc/README.md b/infrastructure/cdn-in-a-box/optional/vnc/README.md index 13cd6970ac..1e3def40bf 100644 --- a/infrastructure/cdn-in-a-box/optional/vnc/README.md +++ b/infrastructure/cdn-in-a-box/optional/vnc/README.md @@ -25,7 +25,7 @@ This container provides a basic lightweight window manager (fluxbox), firefox br ``` # From infrastructure/cdn-in-a-box -alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.vnc.yml" +alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/optional/docker-compose.vnc.yml" docker volume prune -f mydc rm -fv mydc kill diff --git a/infrastructure/cdn-in-a-box/optional/vpn/README.rst b/infrastructure/cdn-in-a-box/optional/vpn/README.rst index c8caf175f0..53e4644c93 100644 --- a/infrastructure/cdn-in-a-box/optional/vpn/README.rst +++ b/infrastructure/cdn-in-a-box/optional/vpn/README.rst @@ -26,7 +26,7 @@ How to use it .. code-block:: shell # From infrastructure/cdn-in-a-box - alias mydc="docker compose -f $PWD/docker-compose.yml -f $PWD/docker-compose.expose-ports.yml -f $PWD/optional/docker-compose.vpn.yml -f $PWD/optional/docker-compose.vpn.expose-ports.yml" + alias mydc="docker-compose -f $PWD/docker-compose.yml -f $PWD/docker-compose.expose-ports.yml -f $PWD/optional/docker-compose.vpn.yml -f $PWD/optional/docker-compose.vpn.expose-ports.yml" mydc down -v mydc build mydc up @@ -51,13 +51,13 @@ If you want a GUI version of VPN client, you can choose `Tunnelblick -# Building *trafficcontrol* using *docker compose* +# Building *trafficcontrol* using *docker-compose* Refer to the build instructions in the top-level `trafficcontrol/BUILD.md`. diff --git a/infrastructure/docker/build/docker-compose-opt.yml b/infrastructure/docker/build/docker-compose-opt.yml index 9d3e6a8ff3..9a843e4617 100644 --- a/infrastructure/docker/build/docker-compose-opt.yml +++ b/infrastructure/docker/build/docker-compose-opt.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' services: ats: diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml index 38e2229994..a02f5aab36 100644 --- a/infrastructure/docker/build/docker-compose.yml +++ b/infrastructure/docker/build/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' services: weasel: diff --git a/pkg b/pkg index 37a817abbd..a9efc2b4af 100755 --- a/pkg +++ b/pkg @@ -31,18 +31,18 @@ else COMPOSECMD=() fi -# Check to see if docker compose is already installed and use it directly, if possible. +# Check to see if docker-compose is already installed and use it directly, if possible. if [ ${#COMPOSECMD[@]} -eq 0 ]; then - if docker compose >/dev/null 2>&1; then - COMPOSECMD=( docker compose ) + if which docker-compose >/dev/null 2>&1; then + COMPOSECMD=( docker-compose ) fi fi -# If it's unavailable, download the image and run docker compose inside a container. +# If it's unavailable, download the image and run docker-compose inside a container. # This is considerably slower, but allows for building on hosts without docker-compose. if [ ${#COMPOSECMD[@]} -eq 0 ]; then # Pin the version of docker-compose. - IMAGE="docker:latest" + IMAGE="docker/compose:1.11.2" # We need to either mount the docker socket or export the docker host into the container. # This allows the container to manage "sibling" containers via docker. @@ -80,7 +80,7 @@ if [ ${#COMPOSECMD[@]} -eq 0 ]; then # COMPOSECMD is kept as an array to significantly simplify handling paths that contain # spaces and other special characters. - COMPOSECMD=(docker run --rm "${DOCKER_ADDR[@]}" $COMPOSE_OPTIONS "${VOLUMES[@]}" -w "$(pwd)" $IMAGE docker compose) + COMPOSECMD=(docker run --rm "${DOCKER_ADDR[@]}" $COMPOSE_OPTIONS "${VOLUMES[@]}" -w "$(pwd)" $IMAGE) fi # Parse command line arguments @@ -243,7 +243,7 @@ while (( "$#" )); do "${COMPOSECMD[@]}" -f $COMPOSE_FILE run "${RUN_OPTIONS[@]}" --rm $1 || exit 1 # Check for a chained compose file for this particular project. - # A chained compose file will be named exactly the same as main docker compose, with .service added, + # A chained compose file will be named exactly the same as main docker-compose, with .service added, # where is the name of the specific service to be chained. The file may be a symlink to another # compose file, in which case the symlink will be followed before it is processed. if [ -e "$COMPOSE_FILE.$1" ] ; then diff --git a/pkg.ps1 b/pkg.ps1 index f9e2f85140..8b5c25b5a8 100755 --- a/pkg.ps1 +++ b/pkg.ps1 @@ -53,14 +53,14 @@ if ($DOCKER -eq "") { Push-Location $PSScriptRoot; $COMPOSE_FILE = "./infrastructure/docker/build/docker-compose.yml"; -$COMPOSE = (Get-Command docker compose).Source; +$COMPOSE = (Get-Command docker-compose).Source; $COMPOSE_ARGS = "" if ($COMPOSE -eq "") { & $DOCKER "inspect docker-compose:latest"; if ($? -eq $false) { & $DOCKER "pull docker-compose:latest"; if ($? -eq $false) { - Write-Error "Couldn't pull docker compose - please connect to the internet or install docker-compose." -Category NotInstalled; + Write-Error "Couldn't pull docker-compose - please connect to the internet or install docker-compose." -Category NotInstalled; exit 1; } } diff --git a/tc-health-client/testing/docker/.env b/tc-health-client/testing/docker/.env deleted file mode 120000 index e72b3932f4..0000000000 --- a/tc-health-client/testing/docker/.env +++ /dev/null @@ -1 +0,0 @@ -../../../.env \ No newline at end of file diff --git a/tc-health-client/testing/docker/db_init/Dockerfile b/tc-health-client/testing/docker/db_init/Dockerfile index d4336a4a09..e101c4f9dd 100644 --- a/tc-health-client/testing/docker/db_init/Dockerfile +++ b/tc-health-client/testing/docker/db_init/Dockerfile @@ -20,19 +20,15 @@ # Based on CentOS 7.2 ############################################################ -FROM rockylinux:8 +FROM centos/systemd -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 install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm -RUN dnf -y install \ +RUN yum -y install \ + postgresql13 \ nmap-ncat \ cpanminus && \ - dnf clean all + yum clean all ENV POSTGRES_HOME $POSTGRES_HOME ENV PGPASSWORD $PGPASSWORD diff --git a/tc-health-client/testing/docker/docker-compose.yml b/tc-health-client/testing/docker/docker-compose.yml index c01d759012..b096c97b70 100644 --- a/tc-health-client/testing/docker/docker-compose.yml +++ b/tc-health-client/testing/docker/docker-compose.yml @@ -22,11 +22,12 @@ # container updates ../ort-tests/tc-fixtures.json with # the corresponding version string) # -# Run: docker compose build -# Run: docker compose run ort_test +# Run: docker-compose build +# Run: docker-compose run ort_test # --- +version: '3.8' volumes: trafficcontrol: @@ -35,7 +36,7 @@ volumes: services: db: - image: postgres:${POSTGRES_VERSION} + image: postgres:13.2 env_file: - variables.env ports: diff --git a/tc-health-client/testing/docker/traffic_ops/Dockerfile b/tc-health-client/testing/docker/traffic_ops/Dockerfile index f4a33f97c5..1e999e80f7 100644 --- a/tc-health-client/testing/docker/traffic_ops/Dockerfile +++ b/tc-health-client/testing/docker/traffic_ops/Dockerfile @@ -37,7 +37,7 @@ RUN set -o nounset -o errexit && \ if [[ "${OS_VERSION%%.*}" -eq 7 ]]; then \ use_repo=''; \ enable_repo=''; \ - # needed for llvm-toolset-7-clang, which is needed for postgresql13-devel-13.x-1PGDG, required by TO rpm + # needed for llvm-toolset-7-clang, which is needed for postgresql13-devel-13.2-1PGDG, required by TO rpm dnf -y install gcc centos-release-scl-rh; \ else \ use_repo='--repo=pgdg13'; \ diff --git a/test/fakeOrigin/README.md b/test/fakeOrigin/README.md index b9046af843..d7396195ca 100644 --- a/test/fakeOrigin/README.md +++ b/test/fakeOrigin/README.md @@ -40,7 +40,7 @@ Local build pre-requesites: * OSX: ```brew install ffmpeg --with-rtmp-dump``` * CentOS: [Instructions](https://linuxadmin.io/install-ffmpeg-on-centos-7/) -and/or just a modern version of Docker & docker compose +and/or just a modern version of Docker & docker-compose If you're building locally, just run ```go install github.com/apache/trafficcontrol/v8/test/fakeOrigin@latest``` @@ -55,10 +55,10 @@ fakeOrigin -cfg config.json (same as above, but specify the location) ``` Running in docker: ``` -docker compose build --no-cache -docker compose up --force-recreate +docker-compose build --no-cache +docker-compose up --force-recreate ... customize the config.json created in ./docker_host (maps to /host inside the container, it's really important to customize this appropriately) -docker compose up --force-recreate +docker-compose up --force-recreate ``` On startup it will print any routes that are available after transcoding. You should just be able to plug those m3u8 url into VLC to start streaming. diff --git a/test/fakeOrigin/docker-compose.yml b/test/fakeOrigin/docker-compose.yml index b7547e58c1..f2acec9eee 100644 --- a/test/fakeOrigin/docker-compose.yml +++ b/test/fakeOrigin/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. +version: '3.8' services: fake_origin: diff --git a/tools/golang/docker-compose.yml b/tools/golang/docker-compose.yml index 7754b5424e..854db7b3ad 100644 --- a/tools/golang/docker-compose.yml +++ b/tools/golang/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' services: lint: diff --git a/traffic_monitor/tests/_integration/README.md b/traffic_monitor/tests/_integration/README.md index ea442581fd..7eaaf5866f 100644 --- a/traffic_monitor/tests/_integration/README.md +++ b/traffic_monitor/tests/_integration/README.md @@ -6,4 +6,4 @@ From this directory, run `build_tests.sh`. This will build the Traffic Monitor R ## Running -From this directory, run `docker compose run tmintegrationtest` +From this directory, run `docker-compose run tmintegrationtest` diff --git a/traffic_monitor/tests/_integration/build_tests.sh b/traffic_monitor/tests/_integration/build_tests.sh index bc38dc5edd..371e130bdd 100755 --- a/traffic_monitor/tests/_integration/build_tests.sh +++ b/traffic_monitor/tests/_integration/build_tests.sh @@ -22,4 +22,4 @@ fi cp "dist/$rpm" "traffic_monitor/tests/_integration/tm/traffic_monitor.rpm" cd - -docker compose build +docker-compose build diff --git a/traffic_monitor/tests/_integration/docker-compose.yml b/traffic_monitor/tests/_integration/docker-compose.yml index 6bdd4b200d..fdd2f0dd44 100644 --- a/traffic_monitor/tests/_integration/docker-compose.yml +++ b/traffic_monitor/tests/_integration/docker-compose.yml @@ -29,10 +29,11 @@ # To run the integration tests, your current working directory must be trafficcontrol/traffic_monitor. # This is because Docker doesn't allow accessing files outside the current "context". # -# docker compose up -d +# docker-compose up -d # --- +version: '3.8' services: testto: diff --git a/traffic_monitor/tests/docker-compose.yml b/traffic_monitor/tests/docker-compose.yml index 8ed15d6918..7d7f6be8b0 100644 --- a/traffic_monitor/tests/docker-compose.yml +++ b/traffic_monitor/tests/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' volumes: junit: diff --git a/traffic_ops/INSTALL.md b/traffic_ops/INSTALL.md index 5edd18575c..d35de2e650 100644 --- a/traffic_ops/INSTALL.md +++ b/traffic_ops/INSTALL.md @@ -30,7 +30,7 @@ Instructions are here: https://yum.postgresql.org/ `$ sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm` -## Install Postgres 13.16 server (in a container or on the host) +## Install Postgres 13.2 server (in a container or on the host) ### on the host: @@ -46,7 +46,7 @@ Instructions are here: https://yum.postgresql.org/ NOTE: you do *not* need postgresql13-server if running postgres within a `docker` container. -Install `docker` and `docker compose` using instructions here: +Install `docker` and `docker-compose` using instructions here: https://docs.docker.com/engine/installation/linux/centos/ diff --git a/traffic_ops/app/bin/tests/docker-compose.yml b/traffic_ops/app/bin/tests/docker-compose.yml index 7078bf1716..5526a637d2 100644 --- a/traffic_ops/app/bin/tests/docker-compose.yml +++ b/traffic_ops/app/bin/tests/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' volumes: traffic_ops_golang: diff --git a/traffic_ops/app/db/trafficvault/test/.env b/traffic_ops/app/db/trafficvault/test/.env deleted file mode 120000 index 7e66cb76ec..0000000000 --- a/traffic_ops/app/db/trafficvault/test/.env +++ /dev/null @@ -1 +0,0 @@ -../../../../../.env \ No newline at end of file diff --git a/traffic_ops/app/db/trafficvault/test/Dockerfile-db-admin b/traffic_ops/app/db/trafficvault/test/Dockerfile-db-admin index 680a4a8a32..0ac328a2da 100644 --- a/traffic_ops/app/db/trafficvault/test/Dockerfile-db-admin +++ b/traffic_ops/app/db/trafficvault/test/Dockerfile-db-admin @@ -19,39 +19,17 @@ # Dockerfile to build Traffic Ops DB admin test environment ############################################################ -FROM rockylinux:8 -ARG POSTGRES_VERSION +FROM centos:7 +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 \ - 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 + 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 # 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 diff --git a/traffic_ops/app/db/trafficvault/test/Dockerfile-tvdb b/traffic_ops/app/db/trafficvault/test/Dockerfile-tvdb index 9c054d1bfe..5fdeeb5a08 100644 --- a/traffic_ops/app/db/trafficvault/test/Dockerfile-tvdb +++ b/traffic_ops/app/db/trafficvault/test/Dockerfile-tvdb @@ -19,9 +19,9 @@ # Dockerfile for traffic vault db ############################################################ -ARG POSTGRES_VERSION +ARG POSTGRES_VERSION=13.2 FROM postgres:${POSTGRES_VERSION} -ARG POSTGRES_VERSION +ARG POSTGRES_VERSION=13.2 ENV POSTGRES_VERSION=$POSTGRES_VERSION ENV POSTGRES_PASSWORD=twelve diff --git a/traffic_ops/app/db/trafficvault/test/README.md b/traffic_ops/app/db/trafficvault/test/README.md index 05bac8b86c..883a94ca84 100644 --- a/traffic_ops/app/db/trafficvault/test/README.md +++ b/traffic_ops/app/db/trafficvault/test/README.md @@ -30,8 +30,8 @@ NOTE: this test is similar to the TODB test found in traffic_ops_db/test/docker. 1. Build a Traffic Ops rpm (from the project root): `./pkg traffic_ops_build` 2. Copy the rpm to ./traffic_ops.rpm 3. Optional: place a DB dump file in ./initdb.d (file name must end in "dump") -4. `docker compose build` -5. `docker compose up --exit-code-from trafficvault-db-admin` +4. `docker-compose build` +5. `docker-compose up --exit-code-from trafficvault-db-admin` ## Notes about data directory and AES keys diff --git a/traffic_ops/app/db/trafficvault/test/docker-compose.yml b/traffic_ops/app/db/trafficvault/test/docker-compose.yml index b0a4b66d44..5fcb456a60 100644 --- a/traffic_ops/app/db/trafficvault/test/docker-compose.yml +++ b/traffic_ops/app/db/trafficvault/test/docker-compose.yml @@ -21,10 +21,11 @@ # # To optionally run the test with a starter TVDB, put the TVDB dump file in ./initdb.d/ # -# docker compose build -# docker compose up --exit-code-from trafficvault-db-admin +# docker-compose build +# docker-compose up --exit-code-from trafficvault-db-admin --- +version: '3.8' services: tvdb: @@ -32,7 +33,7 @@ services: context: . dockerfile: Dockerfile-tvdb args: - POSTGRES_VERSION: ${POSTGRES_VERSION} + POSTGRES_VERSION: ${POSTGRES_VERSION:-13.2} ports: - 5432 @@ -41,7 +42,7 @@ services: context: . dockerfile: Dockerfile-db-admin args: - POSTGRES_VERSION: ${POSTGRES_VERSION} + POSTGRES_VERSION: ${POSTGRES_VERSION:-13.2} TRAFFIC_OPS_RPM: traffic_ops.rpm depends_on: - tvdb diff --git a/traffic_ops/build/build_rpm.sh b/traffic_ops/build/build_rpm.sh index 126cb2a6fe..96043dedaf 100755 --- a/traffic_ops/build/build_rpm.sh +++ b/traffic_ops/build/build_rpm.sh @@ -111,9 +111,8 @@ initBuildArea() { cp "$TO_DIR"/build/traffic_ops.spec "$RPMBUILD"/SPECS/. || \ { echo "Could not copy spec files: $?"; return 1; } - source "${TC_DIR}/.env" PLUGINS="$(grep -l 'AddPlugin(' "${TO_DIR}/traffic_ops_golang/plugin/"*.go | grep -v 'func AddPlugin(' | xargs -I '{}' basename {} '.go')" - export POSTGRES_VERSION PLUGINS + export PLUGINS echo "The build area has been initialized." } diff --git a/traffic_ops/build/traffic_ops.spec b/traffic_ops/build/traffic_ops.spec index 0368366390..c2d404c558 100644 --- a/traffic_ops/build/traffic_ops.spec +++ b/traffic_ops/build/traffic_ops.spec @@ -21,7 +21,6 @@ %define TRAFFIC_OPS_LOG_DIR /var/log/traffic_ops %define TRAFFIC_OPS_ROOT_CERTIFICATES_DIR /var/log/traffic_ops %define debug_package %{nil} -%define postgres_version %{getenv:POSTGRES_VERSION} Summary: Traffic Ops Name: traffic_ops @@ -37,7 +36,7 @@ AutoReqProv: no Requires: cpanminus, expat-devel, libcurl, libpcap-devel, mkisofs, tar Requires: openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, perl-Digest-SHA1 Requires: libidn-devel, libcurl-devel, libcap -Requires: postgresql13 >= %{postgres_version} +Requires: postgresql13 >= 13.2 Requires: perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, perl-WWW-Curl, perl-TermReadKey, perl-Crypt-ScryptKDF Requires: python(abi) Requires(pre): /usr/sbin/useradd, /usr/bin/getent diff --git a/traffic_ops/traffic_ops_golang/README.md b/traffic_ops/traffic_ops_golang/README.md index 595e72b65f..5cfa6d268c 100644 --- a/traffic_ops/traffic_ops_golang/README.md +++ b/traffic_ops/traffic_ops_golang/README.md @@ -24,7 +24,7 @@ To run `traffic_ops_golang` proxy locally the following prerequisites are needed: * Golang version greater or equal to the Go version found in the `GO_VERSION` file at the base of this repository. See: [https://golang.org/doc/install](https://golang.org/doc/install) -* Postgres 13 or greater +* Postgres 13.2 or greater ## Vendoring and Building diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/request/comment/comments.go b/traffic_ops/traffic_ops_golang/deliveryservice/request/comment/comments.go index 46cae5ae60..68a46c1c00 100644 --- a/traffic_ops/traffic_ops_golang/deliveryservice/request/comment/comments.go +++ b/traffic_ops/traffic_ops_golang/deliveryservice/request/comment/comments.go @@ -264,7 +264,6 @@ func Get(w http.ResponseWriter, r *http.Request) { // Validate is used to ensure that the DeliveryServiceRequestCommentV5 struct passed in to the function is valid. func Validate(dsrc tc.DeliveryServiceRequestCommentV5) error { errs := validation.Errors{ - "id": validation.Validate(dsrc.ID, validation.NotNil), "deliveryServiceRequestId": validation.Validate(dsrc.DeliveryServiceRequestID, validation.NotNil), "value": validation.Validate(dsrc.Value, validation.NotNil), } @@ -287,13 +286,6 @@ func Update(w http.ResponseWriter, r *http.Request) { api.HandleErr(w, r, tx, http.StatusBadRequest, err, nil) return } - idParam := inf.Params["id"] - id, parseErr := strconv.Atoi(idParam) - if parseErr != nil { - api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, errors.New("id must be an integer"), nil) - return - } - deliveryServiceRequestComment.ID = id if err := Validate(deliveryServiceRequestComment); err != nil { api.HandleErr(w, r, tx, http.StatusBadRequest, err, nil) @@ -301,7 +293,7 @@ func Update(w http.ResponseWriter, r *http.Request) { } var current tc.DeliveryServiceRequestCommentV5 - err := inf.Tx.QueryRowx(selectQuery() + `WHERE dsrc.id=` + strconv.Itoa(deliveryServiceRequestComment.ID)).StructScan(¤t) + err := inf.Tx.QueryRowx(selectQuery() + `WHERE dsrc.id=` + inf.Params["id"]).StructScan(¤t) if err != nil { api.HandleErr(w, r, tx, http.StatusInternalServerError, nil, errors.New("scanning deliveryservice_request_comment: "+err.Error())) return @@ -313,6 +305,13 @@ func Update(w http.ResponseWriter, r *http.Request) { return } deliveryServiceRequestComment.AuthorID = current.AuthorID + idParam := inf.Params["id"] + id, parseErr := strconv.Atoi(idParam) + if parseErr != nil { + api.HandleErr(w, r, inf.Tx.Tx, http.StatusBadRequest, errors.New("id must be an integer"), nil) + return + } + deliveryServiceRequestComment.ID = id userErr, sysErr, sc := api.CheckIfUnModified(r.Header, inf.Tx, id, "deliveryservice_request_comment") if userErr != nil || sysErr != nil { api.HandleErr(w, r, tx, sc, userErr, sysErr) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md index 73499dfbed..93ba7ce249 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/README.md @@ -43,15 +43,15 @@ The `docker-compose.yml` will start two rendering services, a custom http servic To start the Swagger UI services (and build them if not already built) just run: -```$ docker compose up``` +```$ docker-compose up``` NOTE: Iterative Workflow Tips: Blow away only the local images (excluding remote ones) and bring down the container: -```$ docker compose down --rmi local``` +```$ docker-compose down --rmi local``` Blow away all the images (including remote ones) and bring down the container: -```$ docker compose down --rmi all``` +```$ docker-compose down --rmi all``` Once started navigate your browser to [http://localhost:8080](http://localhost:8080) @@ -60,7 +60,7 @@ Once started navigate your browser to [http://localhost:8080](http://localhost:8 After you generate the `swaggerspec/swagger.json` from the steps above use the `swaggerspec` Docker Compose file to convert the `swagger.json` to .rst so that it can merged in with the existing Traffic Control documentation. * `$ cd swaggerspec` -* `$ docker compose up` - will convert the `swagger.json` in this directory into `v13_api_docs.rst` +* `$ docker-compose up` - will convert the `swagger.json` in this directory into `v13_api_docs.rst` * `$ cp v13_api_docs.rst ../../../../../docs/source/development/traffic_ops_api` * `$ cd ../../../../../docs` * `$ make` - will generate all the Sphinx documentation along with the newly generated TO Swagger API 1.3 docs @@ -68,7 +68,7 @@ After you generate the `swaggerspec/swagger.json` from the steps above use the ` NOTE: Iterative Workflow Tips: Blow away only the local images (excluding remote ones) and bring down the container: -```$ docker compose down --rmi local``` +```$ docker-compose down --rmi local``` Blow away all the images (including remote ones) and bring down the container: -```$ docker compose down --rmi all``` +```$ docker-compose down --rmi all``` diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml index acc4e3cbc4..63f4fd570d 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/docker-compose.yml @@ -16,6 +16,7 @@ # specific language governing permissions and limitations # under the License. +version: '3.8' services: swagger-spec-server: diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/docker-compose.yml b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/docker-compose.yml index ada6345a55..949cc0e369 100644 --- a/traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/docker-compose.yml +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/v13/swaggerspec/docker-compose.yml @@ -16,6 +16,7 @@ # specific language governing permissions and limitations # under the License. +version: '3.8' services: to-rst: diff --git a/traffic_ops_db/docker/.env b/traffic_ops_db/docker/.env deleted file mode 120000 index c7360fb82d..0000000000 --- a/traffic_ops_db/docker/.env +++ /dev/null @@ -1 +0,0 @@ -../../.env \ No newline at end of file diff --git a/traffic_ops_db/docker/Dockerfile b/traffic_ops_db/docker/Dockerfile index fbb343a397..ce3f53ab2a 100644 --- a/traffic_ops_db/docker/Dockerfile +++ b/traffic_ops_db/docker/Dockerfile @@ -11,8 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -ARG POSTGRES_VERSION -FROM postgres:${POSTGRES_VERSION} +FROM postgres:13.2 MAINTAINER dev@trafficcontrol.apache.org diff --git a/traffic_ops_db/docker/docker-compose.dev.yml b/traffic_ops_db/docker/docker-compose.dev.yml index cd758ace74..e714f60e17 100644 --- a/traffic_ops_db/docker/docker-compose.dev.yml +++ b/traffic_ops_db/docker/docker-compose.dev.yml @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +version: '3.8' services: db: diff --git a/traffic_ops_db/docker/docker-compose.yml b/traffic_ops_db/docker/docker-compose.yml index 68729f927d..34c46f990e 100644 --- a/traffic_ops_db/docker/docker-compose.yml +++ b/traffic_ops_db/docker/docker-compose.yml @@ -11,14 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # +version: '3.8' services: db: build: context: .. dockerfile: /opt/traffic_ops_db/docker/Dockerfile - args: - POSTGRES_VERSION: ${POSTGRES_VERSION} env_file: - /opt/traffic_ops_db/docker/docker-compose.env ports: diff --git a/traffic_ops_db/docker/todb.sh b/traffic_ops_db/docker/todb.sh index 5a3d8ed12c..9863cbe167 100755 --- a/traffic_ops_db/docker/todb.sh +++ b/traffic_ops_db/docker/todb.sh @@ -28,11 +28,11 @@ if [[ "$ACTION" == "setup" ]];then echo "Setup complete" elif [[ "$ACTION" == "run" ]];then - docker compose -f docker-compose.dev.yml -p $PROJECT_NAME up -d + docker-compose -f docker-compose.dev.yml -p $PROJECT_NAME up -d echo "Started Docker container: $CONTAINER_NAME" elif [[ "$ACTION" == "stop" ]];then - docker compose -f docker-compose.dev.yml -p $PROJECT_NAME down -v + docker-compose -f docker-compose.dev.yml -p $PROJECT_NAME down -v echo "Stopping Docker container: $CONTAINER_NAME" elif [[ "$ACTION" == "clean" ]];then @@ -42,7 +42,7 @@ elif [[ "$ACTION" == "clean" ]];then rm -rf pgdata elif [[ "$ACTION" == "seed" ]];then - docker compose -f docker-compose.dev.yml -p $PROJECT_NAME down -v + docker-compose -f docker-compose.dev.yml -p $PROJECT_NAME down -v else echo "Valid actions: 'setup', 'run', 'stop', 'clean'" exit 0 diff --git a/traffic_ops_db/systemd/traffic_ops_db.service b/traffic_ops_db/systemd/traffic_ops_db.service index 6d3cbc79f4..31110e3f11 100644 --- a/traffic_ops_db/systemd/traffic_ops_db.service +++ b/traffic_ops_db/systemd/traffic_ops_db.service @@ -23,8 +23,8 @@ After=docker.service [Service] Restart=always -ExecStart=/usr/bin/docker compose -p trafficops -f /opt/traffic_ops_db/docker/docker-compose.yml up -ExecStop=/usr/bin/docker compose -p trafficops -f /opt/traffic_ops_db/docker/docker-compose.yml stop +ExecStart=/usr/bin/docker-compose -p trafficops -f /opt/traffic_ops_db/docker/docker-compose.yml up +ExecStop=/usr/bin/docker-compose -p trafficops -f /opt/traffic_ops_db/docker/docker-compose.yml stop [Install] WantedBy=default.target diff --git a/traffic_ops_db/test/docker/.env b/traffic_ops_db/test/docker/.env deleted file mode 120000 index e72b3932f4..0000000000 --- a/traffic_ops_db/test/docker/.env +++ /dev/null @@ -1 +0,0 @@ -../../../.env \ No newline at end of file diff --git a/traffic_ops_db/test/docker/Dockerfile-db b/traffic_ops_db/test/docker/Dockerfile-db index aaccabb4ef..e2dc6c32b3 100644 --- a/traffic_ops_db/test/docker/Dockerfile-db +++ b/traffic_ops_db/test/docker/Dockerfile-db @@ -19,9 +19,9 @@ # Dockerfile for trafficops db ############################################################ -ARG POSTGRES_VERSION +ARG POSTGRES_VERSION=13.2 FROM postgres:${POSTGRES_VERSION} -ARG POSTGRES_VERSION +ARG POSTGRES_VERSION=13.2 ENV POSTGRES_VERSION=$POSTGRES_VERSION ENV POSTGRES_PASSWORD=twelve diff --git a/traffic_ops_db/test/docker/Dockerfile-db-admin b/traffic_ops_db/test/docker/Dockerfile-db-admin index fa24860d67..03745c9dc7 100644 --- a/traffic_ops_db/test/docker/Dockerfile-db-admin +++ b/traffic_ops_db/test/docker/Dockerfile-db-admin @@ -19,18 +19,16 @@ # Dockerfile to build Traffic Ops DB admin test environment ############################################################ -FROM rockylinux:8 -ARG POSTGRES_VERSION +FROM centos:7 +ARG POSTGRES_VERSION=13.2 ENV POSTGRES_VERSION=$POSTGRES_VERSION -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" \ +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 && \ - dnf -y --repo=pgdg13 install postgresql13 && \ - dnf -y remove pgdg-redhat-repo && \ - dnf -y --enablerepo=powertools install \ + yum -y install \ cpanminus \ expat-devel \ libcap \ @@ -49,8 +47,9 @@ RUN dnf install -y \ perl-TermReadKey \ perl-Test-CPAN-Meta \ perl-WWW-Curl \ - python3 && \ - dnf clean all + postgresql13 \ + postgresql13-devel &&\ + yum 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 diff --git a/traffic_ops_db/test/docker/docker-compose.yml b/traffic_ops_db/test/docker/docker-compose.yml index 2bb2e65e33..2e6dd81e84 100644 --- a/traffic_ops_db/test/docker/docker-compose.yml +++ b/traffic_ops_db/test/docker/docker-compose.yml @@ -21,10 +21,11 @@ # # To optionally run the test with a starter DB, put the DB dump file in ./initdb.d/ # -# docker compose build -# docker compose up --exit-code-from trafficops-db-admin +# docker-compose build +# docker-compose up --exit-code-from trafficops-db-admin --- +version: '3.8' services: db: @@ -32,7 +33,7 @@ services: context: . dockerfile: Dockerfile-db args: - POSTGRES_VERSION: ${POSTGRES_VERSION} + POSTGRES_VERSION: ${POSTGRES_VERSION:-13.2} ports: - 5432 @@ -41,7 +42,7 @@ services: context: . dockerfile: Dockerfile-db-admin args: - POSTGRES_VERSION: ${POSTGRES_VERSION} + POSTGRES_VERSION: ${POSTGRES_VERSION:-13.2} TRAFFIC_OPS_RPM: traffic_ops.rpm depends_on: - db diff --git a/traffic_portal/etc/systemd/system/traffic_portal.service b/traffic_portal/etc/systemd/system/traffic_portal.service index 19c20001d0..dc24d3a554 100644 --- a/traffic_portal/etc/systemd/system/traffic_portal.service +++ b/traffic_portal/etc/systemd/system/traffic_portal.service @@ -22,8 +22,8 @@ After=docker.service [Service] Restart=always -ExecStart=/usr/bin/docker compose -p traffic -f /opt/traffic_portal/docker/docker-compose.yml up -ExecStop=/usr/bin/docker compose -p traffic -f /opt/traffic_portal/docker/docker-compose.yml down -v +ExecStart=/usr/bin/docker-compose -p traffic -f /opt/traffic_portal/docker/docker-compose.yml up +ExecStop=/usr/bin/docker-compose -p traffic -f /opt/traffic_portal/docker/docker-compose.yml down -v WorkingDirectory=/opt/traffic_portal/docker [Install] diff --git a/traffic_router/tests/docker-compose.yml b/traffic_router/tests/docker-compose.yml index 3c85dc0f86..0bdd2fcc88 100644 --- a/traffic_router/tests/docker-compose.yml +++ b/traffic_router/tests/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' volumes: junit: diff --git a/traffic_server/_tsb/docker-compose.yml b/traffic_server/_tsb/docker-compose.yml index 0da3a31ab6..6467a58bd6 100644 --- a/traffic_server/_tsb/docker-compose.yml +++ b/traffic_server/_tsb/docker-compose.yml @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. --- +version: '3.8' services: ats_build: build: diff --git a/traffic_stats/trafficcontrol-scenes/package.json b/traffic_stats/trafficcontrol-scenes/package.json deleted file mode 100644 index 709f860d52..0000000000 --- a/traffic_stats/trafficcontrol-scenes/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "trafficcontrol-scenes", - "version": "1.0.0", - "description": "Traffic Control Grafana Scenes", - "scripts": { - "build": "webpack -c ./webpack/webpack.config.ts --env production", - "dev": "webpack -w -c ./webpack/webpack.config.ts --env development", - "test": "jest --watch --onlyChanged", - "test:ci": "jest --passWithNoTests --maxWorkers 4", - "typecheck": "tsc --noEmit", - "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "npm run lint -- --fix", - "e2e": "npm exec cypress install && npm exec grafana-e2e run", - "e2e:update": "npm exec cypress install && npm exec grafana-e2e run --update-screenshots", - "server": "docker compose up --build", - "sign": "npx --yes @grafana/sign-plugin@latest" - }, - "author": "ntheanh201", - "license": "Apache-2.0", - "devDependencies": { - "@grafana/e2e": "10.0.3", - "@grafana/e2e-selectors": "10.0.3", - "@grafana/tsconfig": "^1.2.0-rc1", - "@swc/helpers": "^0.5.0", - "@swc/jest": "^0.2.26", - "@testing-library/jest-dom": "6.1.4", - "@testing-library/react": "14.0.0", - "@types/jest": "^29.5.0", - "@types/node": "^20.8.7", - "@types/testing-library__jest-dom": "5.14.8", - "identity-obj-proxy": "3.0.0", - "jest": "^29.5.0", - "jest-environment-jsdom": "^29.5.0", - "prettier": "^2.8.7", - "sass": "1.63.2", - "tsconfig-paths": "^4.2.0", - "typescript": "4.8.4" - }, - "engines": { - "node": ">=20" - }, - "dependencies": { - "@babel/core": "^7.21.4", - "@emotion/css": "11.10.6", - "@grafana/data": "10.0.3", - "@grafana/eslint-config": "^6.0.0", - "@grafana/runtime": "10.0.3", - "@grafana/scenes": "^1.28.0", - "@grafana/schema": "10.0.3", - "@grafana/ui": "10.0.3", - "@swc/core": "^1.3.90", - "@types/lodash": "^4.14.194", - "@types/react-router-dom": "^5.3.3", - "copy-webpack-plugin": "^11.0.0", - "css-loader": "^6.7.3", - "eslint-plugin-deprecation": "^2.0.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-prefer-arrow": "^1.2.3", - "eslint-webpack-plugin": "^4.0.1", - "fork-ts-checker-webpack-plugin": "^8.0.0", - "glob": "^10.2.7", - "globby": "^14.0.0", - "react": "18.2.0", - "react-dom": "18.2.0", - "react-router-dom": "5.3.3", - "replace-in-file-webpack-plugin": "^1.0.6", - "rxjs": "7.8.0", - "sass-loader": "13.3.1", - "style-loader": "3.3.3", - "swc-loader": "^0.2.3", - "tslib": "2.5.3", - "ts-node": "^10.9.1", - "webpack": "^5.86.0", - "webpack-cli": "^5.1.4", - "webpack-livereload-plugin": "^3.0.2" - }, - "packageManager": "npm@10.2.3" -}