From 171096d846b6b4e7a4e83b25fe3a4936238ae2b0 Mon Sep 17 00:00:00 2001 From: DanEric <dan@syncad.com> Date: Tue, 18 Mar 2025 23:37:17 +0000 Subject: [PATCH] Update docker images to be based on Ubuntu 24.04 --- .gitlab-ci.yml | 11 +++-------- Dockerfile | 16 ++++++++-------- Dockerfile.jmeter | 7 ++++--- hive | 2 +- scripts/ci-helpers/build_ci_base_image.sh | 2 +- scripts/ci-helpers/prepare_data_image_job.yml | 2 +- scripts/setup_ubuntu.sh | 4 ++-- 7 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00679e576..9dc82aa60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,8 +14,8 @@ variables: GIT_SUBMODULE_STRATEGY: recursive FF_ENABLE_JOB_CLEANUP: 1 GIT_STRATEGY: clone - # uses registry.gitlab.syncad.com/hive/haf/ci-base-image:ubuntu22.04-18 - BUILDER_IMAGE_TAG: "@sha256:3f3198e1db9e438ccfa1a559f7529a173129b74e74ae35e1c189f8820361c397" + # uses registry.gitlab.syncad.com/hive/haf/ci-base-image:ubuntu24.04-1 + BUILDER_IMAGE_TAG: "@sha256:a3793dfccca6762c33adf819588960ea45463bf00be2ba61d8040260c3e648b1" CI_DEBUG_SERVICES: "true" SETUP_SCRIPTS_PATH: "$CI_PROJECT_DIR/scripts" TEST_TOOLS_NODE_DEFAULT_WAIT_FOR_LIVE_TIMEOUT: 60 @@ -28,12 +28,7 @@ variables: include: - template: Workflows/Branch-Pipelines.gitlab-ci.yml - local: '/scripts/ci-helpers/prepare_data_image_job.yml' - - project: 'hive/common-ci-configuration' - ref: e74d7109838ff05fdc239bced6a726aa7ad46a9b - file: - - '/templates/python_projects.gitlab-ci.yml' - - '/templates/cache_cleanup.gitlab-ci.yml' - - '/templates/docker_image_jobs.gitlab-ci.yml' + # Do not include common-ci-configuration here, it is already referenced by scripts/ci-helpers/prepare_data_image_job.yml included from Hive verify_poetry_lock_sanity: extends: .verify_poetry_lock_sanity_template diff --git a/Dockerfile b/Dockerfile index 192a6af6b..4d24bee57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,12 @@ # docker buildx build --progress=plain --target=ci-base-image --tag registry.gitlab.syncad.com/hive/haf/ci-base-image$CI_IMAGE_TAG --file Dockerfile . # To be started from cloned haf source directory. ARG CI_REGISTRY_IMAGE=registry.gitlab.syncad.com/hive/haf/ -ARG CI_IMAGE_TAG=ubuntu22.04-18 +ARG CI_IMAGE_TAG=ubuntu24.04-1 ARG BUILD_IMAGE_TAG ARG IMAGE_TAG_PREFIX -FROM registry.gitlab.syncad.com/hive/hive/minimal-runtime:ubuntu22.04-13 AS minimal-runtime +FROM registry.gitlab.syncad.com/hive/hive/minimal-runtime:ubuntu24.04-1 AS minimal-runtime ENV PATH="/home/haf_admin/.local/bin:$PATH" @@ -28,10 +28,10 @@ RUN bash -x ./scripts/setup_ubuntu.sh --haf-admin-account="haf_admin" --hived-ac # everyone to upgrade their haf_api_node in sync with this commit. We should switch haf_api_node's healthcheck to # use wget once images based on this Dockerfile are made official, and we can drop curl soon thereafter RUN apt-get update && \ - DEBIAN_FRONTEND=noniteractive apt-get install --no-install-recommends -y postgresql-common gnupg && \ + DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y postgresql-common gnupg && \ /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \ apt-get update && \ - DEBIAN_FRONTEND=noniteractive apt-get install --no-install-recommends -y curl postgresql-17 postgresql-17-cron libpq5 libboost-chrono1.74.0 libboost-context1.74.0 libboost-filesystem1.74.0 libboost-thread1.74.0 busybox netcat-openbsd && \ + DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl postgresql-17 postgresql-17-cron libpq5 libboost-chrono1.83.0 libboost-context1.83.0 libboost-filesystem1.83.0 libboost-thread1.83.0 busybox netcat-openbsd && \ apt-get remove -y gnupg && \ apt-get autoremove -y && \ busybox --install -s @@ -44,7 +44,7 @@ RUN useradd -r -s /usr/sbin/nologin -b /nonexistent -c "HAF maintenance service USER haf_admin WORKDIR /home/haf_admin -FROM registry.gitlab.syncad.com/hive/hive/ci-base-image:ubuntu22.04-13 AS ci-base-image +FROM registry.gitlab.syncad.com/hive/hive/ci-base-image:ubuntu24.04-1 AS ci-base-image ENV PATH="/home/haf_admin/.local/bin:$PATH" @@ -107,7 +107,7 @@ RUN \ # Here we could use a smaller image without packages specific to build requirements FROM ${CI_REGISTRY_IMAGE}ci-base-image:$CI_IMAGE_TAG AS base_instance -ENV BUILD_IMAGE_TAG=${BUILD_IMAGE_TAG:-:ubuntu22.04-8} +ENV BUILD_IMAGE_TAG=${BUILD_IMAGE_TAG:-:ubuntu24.04-1} ARG P2P_PORT=2001 ENV P2P_PORT=${P2P_PORT} @@ -208,9 +208,9 @@ EXPOSE ${WS_PORT} # JSON rpc service EXPOSE ${HTTP_PORT} -FROM registry.gitlab.syncad.com/hive/haf/minimal-runtime:ubuntu22.04-18 AS minimal-instance +FROM registry.gitlab.syncad.com/hive/haf/minimal-runtime:ubuntu24.04-1 AS minimal-instance -ENV BUILD_IMAGE_TAG=${BUILD_IMAGE_TAG:-:ubuntu22.04-18} +ENV BUILD_IMAGE_TAG=${BUILD_IMAGE_TAG:-:ubuntu24.04-1} ARG P2P_PORT=2001 ENV P2P_PORT=${P2P_PORT} diff --git a/Dockerfile.jmeter b/Dockerfile.jmeter index f07444a90..3cba387b7 100644 --- a/Dockerfile.jmeter +++ b/Dockerfile.jmeter @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1.4 # docker buildx build --tag registry.gitlab.syncad.com/hive/haf/ci-base-image:$CI_IMAGE_TAG-jmeter --progress=plain --file Dockerfile.jmeter . -ARG CI_IMAGE_TAG=ubuntu22.04-8 +ARG CI_IMAGE_TAG=ubuntu24.04-1 -FROM phusion/baseimage:jammy-1.0.1 AS build +FROM phusion/baseimage:noble-1.0.1 AS build COPY <<-EOF /opt/patch.sed s/jtl2junit/m2u/g @@ -46,6 +46,7 @@ RUN <<EOF git clone --single-branch --branch master https://github.com/tguzik/m2u.git m2u-source cd m2u-source find -name CommandLineParser.java -exec sed -i -f /opt/patch.sed {} \; + #### FIXME: m2u doesn't build with recent jdk, appears to be abandonware mvn # Install m2u @@ -83,4 +84,4 @@ RUN <<EOF # Install user dependencies pip3 install prettytable -EOF \ No newline at end of file +EOF diff --git a/hive b/hive index 5129c6fa3..18f1d5c75 160000 --- a/hive +++ b/hive @@ -1 +1 @@ -Subproject commit 5129c6fa3704730f4e46fef950ab10f486f6561f +Subproject commit 18f1d5c753735ddba3ab85baaffc09283d84c652 diff --git a/scripts/ci-helpers/build_ci_base_image.sh b/scripts/ci-helpers/build_ci_base_image.sh index 4860d3cea..422011db6 100755 --- a/scripts/ci-helpers/build_ci_base_image.sh +++ b/scripts/ci-helpers/build_ci_base_image.sh @@ -1,7 +1,7 @@ #! /bin/bash REGISTRY=${1:-registry.gitlab.syncad.com/hive/haf/} -CI_IMAGE_TAG=ubuntu22.04-18 +CI_IMAGE_TAG=ubuntu24.04-1 # exit when any command fails set -e diff --git a/scripts/ci-helpers/prepare_data_image_job.yml b/scripts/ci-helpers/prepare_data_image_job.yml index 8f499d784..5af2b8665 100644 --- a/scripts/ci-helpers/prepare_data_image_job.yml +++ b/scripts/ci-helpers/prepare_data_image_job.yml @@ -1,6 +1,6 @@ include: - project: 'hive/hive' - ref: 1c2fe378cbb7c61147881dce247a6d9c28188f9e #develop + ref: 18f1d5c753735ddba3ab85baaffc09283d84c652 #develop file: '/scripts/ci-helpers/prepare_data_image_job.yml' .prepare_haf_image: diff --git a/scripts/setup_ubuntu.sh b/scripts/setup_ubuntu.sh index 5a8b2b349..b925d1c3a 100755 --- a/scripts/setup_ubuntu.sh +++ b/scripts/setup_ubuntu.sh @@ -39,7 +39,7 @@ install_all_dev_packages() { "$SRC_DIR/hive/scripts/setup_ubuntu.sh" --runtime --dev apt-get update - DEBIAN_FRONTEND=noniteractive apt-get install -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ systemd \ libpq-dev \ tox \ @@ -47,7 +47,7 @@ install_all_dev_packages() { postgresql-common /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y - DEBIAN_FRONTEND=noniteractive apt-get install -y postgresql-17 postgresql-server-dev-17 postgresql-17-cron \ + DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-17 postgresql-server-dev-17 postgresql-17-cron \ netcat-openbsd # needed to correctly handle --skip-hived option apt-get clean -- GitLab