Skip to content

Commit

Permalink
Change Base Image to Ubuntu 22.04 (#370)
Browse files Browse the repository at this point in the history
* Redirect to cloudsuitetest

* Fix: memcached build result

* Update the sbt for future new Scala version

* Update MariaDB and Siege

* Define JAVA_HOME in script

* Fix the database service name

* Add javahome for web-search

* Rename docker's tag and remove old container

* Remove old version of mysql

* Fix base image building

* Remove graphite

* Fix the CI deprecated warning.
  • Loading branch information
xusine authored Feb 10, 2023
1 parent ce4cecf commit 6b01009
Show file tree
Hide file tree
Showing 32 changed files with 125 additions and 195 deletions.
12 changes: 3 additions & 9 deletions .github/scripts/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,15 @@ if (grep -q "${DF_PATH#./}" <<<$modified_files) || # Rebuild the image if any fi
DO_PUSH="--push"
fi

if ([ $image_name = "base-os" ] || [ $IMG_TAG = "openjdk11" ]); then
if ([ $image_name = "base-os" ]); then
cd $DF_PATH
for arch in amd64 arm64 riscv64; do
if [ $IMG_TAG = "openjdk11" ]; then
docker buildx build --platform=linux/${arch} -t $DH_REPO:${arch} -f Dockerfile --build-arg EXTERNAL_ARG="/usr/lib/jvm/java-11-openjdk-${arch}/" $DO_PUSH .
else
docker buildx build --platform=linux/${arch} -t $DH_REPO:${arch} -f Dockerfile.${arch} $DO_PUSH .
fi

docker buildx build --platform=linux/${arch} -t $DH_REPO:${arch} -f Dockerfile.${arch} $DO_PUSH .
if [ $? != "0" ]; then
exit 1
fi
if [ -n "$DO_PUSH" ]; then
docker manifest create --amend $DH_REPO:$IMG_TAG $DH_REPO:amd64 $DH_REPO:arm64 $DH_REPO:riscv64
docker manifest push $DH_REPO:$IMG_TAG
docker buildx imagetools create -t $DH_REPO:$IMG_TAG $DH_REPO:amd64 $DH_REPO:arm64 $DH_REPO:riscv64
fi
done
else
Expand Down
83 changes: 27 additions & 56 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
is_parent_modified: ${{ steps.set_is_parent_modified.outputs.is_parent_modified }}
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build and push
run: "./.github/scripts/build-images.sh"
env:
IMG_TAG: "debian"
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

java:
runs-on: ubuntu-latest
Expand All @@ -47,13 +47,11 @@ jobs:
strategy:
matrix:
include:
- tag: "adoptopenjdk8"
platform: "linux/amd64,linux/arm64"
- tag: "openjdk11"
platform: "linux/amd64,linux/arm64,linux/riscv64"
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
Expand All @@ -65,7 +63,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

mysql:
runs-on: ubuntu-latest
Expand All @@ -76,11 +74,11 @@ jobs:
is_parent_modified: ${{ steps.set_is_parent_modified.outputs.is_parent_modified }}
strategy:
matrix:
tag: ["mariadb-10.3"]
tag: ["mariadb-10.6"]
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
Expand All @@ -92,7 +90,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

memcached:
runs-on: ubuntu-latest
Expand All @@ -107,7 +105,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
Expand All @@ -119,34 +117,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"

graphite-statsd:
runs-on: ubuntu-latest
needs: base-os
env:
DH_REPO: "cloudsuite/${{ github.job }}"
outputs:
is_parent_modified: ${{ steps.set_is_parent_modified.outputs.is_parent_modified }}
strategy:
matrix:
tag: ["0.9.15"]
platform: ["linux/amd64,linux/arm64"]
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
run: echo "IS_PARENT_MODIFIED=true" >> $GITHUB_ENV
- name: build and push
run: "./.github/scripts/build-images.sh"
env:
IMG_TAG: "${{ matrix.tag }}"
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

faban:
runs-on: ubuntu-latest
Expand All @@ -161,7 +132,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.java.outputs.is_parent_modified == 'true' }}
Expand All @@ -173,7 +144,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

spark:
runs-on: ubuntu-latest
Expand All @@ -188,7 +159,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.java.outputs.is_parent_modified == 'true' }}
Expand All @@ -200,7 +171,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

cassandra:
runs-on: ubuntu-latest
Expand All @@ -215,7 +186,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.java.outputs.is_parent_modified == 'true' }}
Expand All @@ -227,7 +198,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

hadoop:
runs-on: ubuntu-latest
Expand All @@ -242,7 +213,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.java.outputs.is_parent_modified == 'true' }}
Expand All @@ -254,7 +225,7 @@ jobs:
DF_PATH: "./commons/${{ github.job }}/${{ matrix.tag }}"
DBX_PLATFORM: ${{ matrix.platform }}
- id: set_is_parent_modified
run: echo "::set-output name=is_parent_modified::${MODIFIED}"
run: echo "is_parent_modified=${MODIFIED}" >> $GITHUB_OUTPUT

data-analytics:
runs-on: ubuntu-latest
Expand All @@ -267,7 +238,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.hadoop.outputs.is_parent_modified == 'true' }}
Expand All @@ -293,7 +264,7 @@ jobs:
platform: "linux/amd64,linux/arm64,linux/riscv64"
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.memcached.outputs.is_parent_modified == 'true' }}
Expand All @@ -316,7 +287,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.cassandra.outputs.is_parent_modified == 'true' }}
Expand All @@ -339,7 +310,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.spark.outputs.is_parent_modified == 'true' }}
Expand All @@ -363,7 +334,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.spark.outputs.is_parent_modified == 'true' }}
Expand All @@ -386,7 +357,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
Expand All @@ -409,7 +380,7 @@ jobs:
platform: ["linux/amd64,linux/arm64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.faban.outputs.is_parent_modified == 'true' }}
Expand All @@ -432,7 +403,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.faban.outputs.is_parent_modified == 'true' ||
Expand All @@ -457,7 +428,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
Expand All @@ -480,7 +451,7 @@ jobs:
platform: ["linux/amd64,linux/arm64,linux/riscv64"]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- if: ${{ needs.base-os.outputs.is_parent_modified == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/data-caching/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudsuite/base-os:debian
FROM cloudsuite/base-os:ubuntu

# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r memcache && useradd -r -g memcache memcache
Expand Down
17 changes: 10 additions & 7 deletions benchmarks/graph-analytics/4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM --platform=linux/amd64 cloudsuite/spark:2.4.5 as build

# Build the benchmark using sbt
RUN apt-get update \
&& apt-get install gnupg curl -y --no-install-recommends \
&& echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list \
&& curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add \
RUN set -ex \
&& apt-get update \
&& apt-get install apt-transport-https curl gnupg -y --no-install-recommends \
&& echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list \
&& echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list \
&& curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import \
&& chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg \
&& apt-get update -y \
&& apt-get install -y sbt \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y --no-install-recommends sbt \
&& rm -rf /var/lib/apt/lists/*

# Copy files
COPY benchmark /root/benchmark
Expand All @@ -21,7 +24,7 @@ RUN cd /root/benchmark \
RUN mv /root/benchmark/target/scala-2.11/*.jar /root/benchmark/run_benchmark.sh /benchmarks \
&& rm -r /root/benchmark \
&& apt-get purge -y --auto-remove sbt \
&& rm -r /root/.sbt /root/.ivy2 \
&& rm -r /root/.sbt /root/.cache \
&& chmod +x /root/entrypoint.sh

FROM cloudsuite/spark:2.4.5
Expand Down
14 changes: 9 additions & 5 deletions benchmarks/in-memory-analytics/4.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ WORKDIR /root
# Build the benchmark using sbt
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends gnupg curl \
&& echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list \
&& curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add \
&& apt-get update -y && apt-get install -y --no-install-recommends sbt \
&& apt-get install apt-transport-https curl gnupg -y --no-install-recommends \
&& echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list \
&& echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list \
&& curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import \
&& chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends sbt \
&& rm -rf /var/lib/apt/lists/*


RUN cd /root/movielens-als \
&& sbt package \
&& mkdir -p /benchmarks/movielens-als \
&& mv /root/movielens-als/target/scala-2.11/*.jar /root/movielens-als/run_benchmark.sh /benchmarks/movielens-als \
&& rm -r /root/movielens-als \
&& apt-get purge -y --auto-remove sbt \
&& rm -r /root/.sbt /root/.ivy2
&& rm -r /root/.sbt /root/.cache

COPY files /root/

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/media-streaming/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudsuite/base-os:debian
FROM cloudsuite/base-os:ubuntu

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/media-streaming/dataset/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudsuite/base-os:debian
FROM cloudsuite/base-os:ubuntu

ENV DEBIAN_FRONTEND noninteractive

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/media-streaming/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudsuite/base-os:debian
FROM cloudsuite/base-os:ubuntu

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends nginx openssl \
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/web-search/client/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export SCALE=$2 \
&& export RAMP_DOWN=$4 \
&& export STEADY_STATE=$5

export JAVA_HOME=`ls -d $JAVA_HOME`
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
export SOLR_JAVA_HOME=$JAVA_HOME
#PREPARE
$FABAN_HOME/master/bin/startup.sh

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/web-search/dataset/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudsuite/base-os:debian
FROM cloudsuite/base-os:ubuntu

RUN BUILD_DEPS="wget curl ca-certificates" \
&& set -x \
Expand Down
Loading

0 comments on commit 6b01009

Please sign in to comment.