Skip to content

Commit

Permalink
docker: transition bionic to jammy
Browse files Browse the repository at this point in the history
The bionic LTS release of ubuntu is falling out of standard support.

Update all references to bionic from the leaving LTS release to the
current LTS release.  Builds of the fluxrm/testenv for arm64 and amd64
are already on dockerhub based on these changes.
  • Loading branch information
trws committed Aug 4, 2023
1 parent f2fda90 commit 84e76e6
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/test/create-kvs-dumpfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ DUMPFILE=flux-${TAG}.tar.bz2
printf "Creating dumpfile in ${OUTPUTDIR}/${DUMPFILE}\n"
docker run -i --rm -u $(id -u) \
--mount type=bind,source=${OUTPUTDIR},target=/data \
fluxrm/flux-core:bionic-${TAG} \
fluxrm/flux-core:jammy-${TAG} \
flux start sh -c "/data/workload.sh; flux dump /data/${DUMPFILE}"

rm ${OUTPUTDIR}/workload.sh
Expand Down
4 changes: 2 additions & 2 deletions src/test/docker-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ echo $DOCKER_PASSWORD | docker login -u "$DOCKER_USERNAME" --password-stdin
log "docker push ${DOCKER_TAG}"
docker push ${DOCKER_TAG}

# If this is the bionic build, then also tag without image name:
if echo "$DOCKER_TAG" | grep -q "bionic"; then
# If this is the jammy build, then also tag without image name:
if echo "$DOCKER_TAG" | grep -q "jammy"; then
t="${DOCKER_REPO}:${GITHUB_TAG:-latest}"
log "docker push ${t}"
docker tag "$DOCKER_TAG" ${t} && docker push ${t}
Expand Down
16 changes: 8 additions & 8 deletions src/test/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ or a tagged version of flux-core.

#### fluxrm/testenv Docker images

The Dockerfiles `bionic/Dockerfile`, `focal/Dockerfile`,
The Dockerfiles `jammy/Dockerfile`, `focal/Dockerfile`,
`el7/Dockerfile`, and `el8/Dockerfile` describe the images built
under the `fluxrm/testenv:bionic`, `fluxrm/testenv:focal`,
under the `fluxrm/testenv:jammy`, `fluxrm/testenv:focal`,
`fluxrm/testenv:el7`, and `fluxrm/testenv:el8` respectively, and
include the base dependencies required to build flux-core. These images
are updated manually by flux-core maintainers, but the Dockerfiles should
Expand All @@ -41,9 +41,9 @@ result in a temporary docker image being created during testing of the
PR with the dependency installed.

Later, a flux-core maintainer can move the dependency into the `testenv`
Docker images `bionic/Dockerfile` and `el7/Dockerfile`.
Docker images `jammy/Dockerfile` and `el7/Dockerfile`.
These docker images should then be built by hand and manually
pushed to DockerHub at `fluxrm/testenv:bionic` and
pushed to DockerHub at `fluxrm/testenv:jammy` and
`fluxrm/testenv:el7`. Be sure to test that the `docker-run-test.sh`
script still runs against the new `testenv` images, e.g.:

Expand All @@ -56,24 +56,24 @@ $ for i in focal el7 el8 fedora33 fedora34 fedora35 fedora38; do
done
```

#### Bionic multiarch images
#### Jammy multiarch images

Building the bionic images for linux/amd64 and linux/386 requires the
Building the jammy images for linux/amd64 and linux/386 requires the
Docker buildx extensions, see

https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

and run
```
$ docker buildx build --push --platform=linux/386,linux/amd64 --tag fluxrm/testenv:bionic src/test/docker/bionic
$ docker buildx build --push --platform=linux/386,linux/amd64 --tag fluxrm/testenv:jammy src/test/docker/jammy
```

to build and push images to docker hub.

#### Local Testing

Developers can test the docker images themselves. If new dependencies are needed,
they can update the `$image` Dockerfiles manually (where `$image` is one of bionic, el7, el8, or focal).
they can update the `$image` Dockerfiles manually (where `$image` is one of jammy, el7, el8, or focal).
To create a local Docker image, run the command:

```
Expand Down
6 changes: 3 additions & 3 deletions src/test/docker/checks/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ RUN set -x && groupadd fluxuser \

# Make sure user in appropriate group for sudo on different platforms
RUN case $BASE_IMAGE in \
bionic*) adduser $USER sudo && adduser fluxuser sudo ;; \
jammy*) adduser $USER sudo && adduser fluxuser sudo ;; \
focal*) adduser $USER sudo && adduser fluxuser sudo ;; \
el*|fedora*) usermod -G wheel $USER && usermod -G wheel fluxuser ;; \
*) (>&2 echo "Unknown BASE_IMAGE") ;; \
esac

# Install extra dependencies if necessary here.
#
# Do not forget to run `apt update` on Ubuntu/bionic.
# Do not forget to run `apt update` on Ubuntu/jammy.
# Do NOT run `yum upgrade` on RPM systems (this will unnecessarily upgrade
# existing packages)
#
RUN case $BASE_IMAGE in \
bionic*) ;; \
jammy*) ;; \
focal*) ;; \
el*|fedora*) ;; \
*) (>&2 echo "Unknown BASE_IMAGE") ;; \
Expand Down
2 changes: 1 addition & 1 deletion src/test/docker/docker-run-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PROJECT=flux-core
BASE_DOCKER_REPO=fluxrm/testenv

WORKDIR=/usr/src
IMAGE=bionic
IMAGE=jammy
JOBS=2
MOUNT_HOME_ARGS="--volume=$HOME:/home/$USER -e HOME"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:jammy

LABEL maintainer="Tom Scogland <[email protected]>"

Expand Down Expand Up @@ -41,10 +41,10 @@ RUN apt-get update \
automake \
make \
cmake \
clang-6.0 \
clang-tidy \
gcc-8 \
g++-8 \
clang-15 \
clang-tools-15 \
gcc-12 \
g++-12 \
&& rm -rf /var/lib/apt/lists/*

# Python
Expand All @@ -56,14 +56,13 @@ RUN apt-get update \
&& apt-get -qq install -y --no-install-recommends \
libffi-dev \
python3-dev \
python3.7-dev \
python3.8-dev \
python3.11-dev \
python3-pip \
python3-setuptools \
python3-wheel \
&& rm -rf /var/lib/apt/lists/*

RUN for PY in python3.6 python3.7 python3.8 ; do \
RUN for PY in python3.10 python3.11 ; do \
sudo $PY -m pip install --upgrade --ignore-installed \
"markupsafe==2.0.0" \
coverage cffi ply six pyyaml "jsonschema>=2.6,<4.0" \
Expand Down Expand Up @@ -103,7 +102,7 @@ RUN apt-get update \
libfaketime \
pylint \
cppcheck \
enchant \
enchant-2 \
aspell \
aspell-en \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -119,7 +118,7 @@ RUN mkdir caliper \
&& wget -O - https://github.com/LLNL/Caliper/archive/v1.7.0.tar.gz | tar xvz --strip-components 1 \
&& mkdir build \
&& cd build \
&& CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
&& CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_GOTCHA=Off \
&& make -j 4 \
&& make install \
&& cd ../.. \
Expand Down
20 changes: 10 additions & 10 deletions src/test/generate-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def env_add_s3(self, args, env):
def add_build(
self,
name=None,
image="bionic",
image="jammy",
args=default_args,
jobs=4,
env=None,
Expand Down Expand Up @@ -137,20 +137,20 @@ def __str__(self):
matrix = BuildMatrix()

# Ubuntu: no args
matrix.add_build(name="bionic")
matrix.add_build(name="jammy")

# Ubuntu: 32b
matrix.add_build(
name="bionic - 32 bit",
name="jammy - 32 bit",
platform="linux/386",
)

# Ubuntu: gcc-8, content-s3, distcheck
# Ubuntu: gcc-12, content-s3, distcheck
matrix.add_build(
name="bionic - gcc-8,content-s3,distcheck",
name="jammy - gcc-12,content-s3,distcheck",
env=dict(
CC="gcc-8",
CXX="g++8",
CC="gcc-12",
CXX="g++12",
DISTCHECK="t",
),
args="--with-flux-security --enable-caliper",
Expand All @@ -159,7 +159,7 @@ def __str__(self):

# Ubuntu: py3.7,clang-6.0
matrix.add_build(
name="bionic - py3.7,clang-6.0",
name="jammy - py3.7,clang-6.0",
env=dict(
CC="clang-6.0",
CXX="clang++-6.0",
Expand All @@ -182,7 +182,7 @@ def __str__(self):

# Ubuntu: TEST_INSTALL
matrix.add_build(
name="bionic - test-install",
name="jammy - test-install",
env=dict(
TEST_INSTALL="t",
),
Expand Down Expand Up @@ -269,7 +269,7 @@ def __str__(self):
# inception
matrix.add_build(
name="inception",
image="bionic",
image="jammy",
command_args="--inception",
)

Expand Down

0 comments on commit 84e76e6

Please sign in to comment.