Skip to content

Commit 30af2e1

Browse files
committed
Add ubuntu2404.v2 and rocky9.v1 for ACS 4.22
1 parent 92536fa commit 30af2e1

File tree

7 files changed

+172
-1
lines changed

7 files changed

+172
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ Contents
1919

2020
| **Docker image** | **CloudStack versions** | **Software Versions** | **Note** |
2121
|---------------------|-------------------------------|-----------------------|----------------------|
22-
| **ubuntu2404.v1** | 4.18.x, 4.19.x | JDK 11, nodejs 16 | DEB packages for Ubuntu distros |
22+
| **ubuntu2404.v2** | 4.22.x | JDK 17, nodejs 20 | DEB packages for Ubuntu distros |
23+
| **rocky9.v1** | 4.22.x | JDK 17, nodejs 20 | RPM packages for RHEL/Rocky Linux/AlmaLinux/OracleLinux 8/9/10 distros |
24+
| **ubuntu2404.v1** | 4.18.x, 4.19.x, 4.20.x, 4.21 | JDK 11, nodejs 16 | DEB packages for Ubuntu distros |
2325
| **ubuntu2204.v1** | 4.18.x, 4.19.x | JDK 11, nodejs 14 | DEB packages for Ubuntu distros |
2426
| **rocky8.v1** | 4.18.x, 4.19.x | JDK 11, nodejs 14 | RPM packages for RHEL/Rocky Linux/AlmaLinux/OracleLinux 8/9 distros |
2527
| **centos7.v1** | 4.18.x, 4.19.x | JDK 11, nodejs 14 | RPM packages for RHEL 7 / CentOS 7 distros |

config.rocky9.v1.sample

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# The repository of the image. Default is weizhouapache/cloudstack-builder
3+
REPO=weizhouapache/cloudstack-builder
4+
5+
# The name of the image
6+
IMAGE=rocky9.v1
7+
8+
# The source directory or git repository
9+
# This will be mounted or cloned to /source the docker container.
10+
SOURCE=https://github.com/apache/cloudstack.git
11+
12+
# The directory where the packages will be.
13+
# This will be mounted to /output the docker container.
14+
OUTPUT=/tmp
15+
16+
# The CloudStack version, branch name or commit SHA.
17+
VERSION=4.22.0.0
18+
19+
# The build options.
20+
# The default value for is "-Dnoredist -DskipTests -Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware"
21+
# Please refer to https://github.com/weizhouapache/docker-cloudstack-builder/blob/main/README.md
22+
BUILD_OPTS="-DskipTests"
23+
24+
# The options for `package.sh` (RPM only)
25+
# Please refer to https://github.com/apache/cloudstack/blob/main/packaging/package.sh
26+
PACKAGE_OPTS=
27+
28+
# Please set to sudo if use a non-root user
29+
SUDO=

config.ubuntu2404.v2.sample

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# The repository of the image. Default is weizhouapache/cloudstack-builder
3+
REPO=weizhouapache/cloudstack-builder
4+
5+
# The name of the image
6+
IMAGE=ubuntu2404.v2
7+
8+
# The source directory or git repository
9+
# This will be mounted or cloned to /source the docker container.
10+
SOURCE=https://github.com/weizhouapache/cloudstack.git
11+
12+
# The directory where the packages will be.
13+
# This will be mounted to /output the docker container.
14+
OUTPUT=/tmp
15+
16+
# The CloudStack version, branch name or commit SHA.
17+
VERSION=4.22-fix-build-on-ubuntu24
18+
19+
# The build options.
20+
# The default value for is "-Dnoredist -DskipTests -Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware"
21+
# Please refer to https://github.com/weizhouapache/docker-cloudstack-builder/blob/main/README.md
22+
BUILD_OPTS="-DskipTests"
23+
24+
# Please set to sudo if use a non-root user
25+
SUDO=

rocky9.v1/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM rockylinux:9
2+
MAINTAINER Wei Zhou <weizhou@apache.org>
3+
4+
RUN yum install -y which mlocate java-17-openjdk java-17-openjdk-devel maven rpm-build \
5+
&& yum install -y gcc glibc-devel mkisofs python3 python3-pip python3-setuptools wget curl git --allowerasing \
6+
&& alternatives --set java java-17-openjdk.x86_64 \
7+
&& alternatives --set javac java-17-openjdk.x86_64
8+
9+
RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash - \
10+
&& yum install -y nodejs
11+
12+
COPY entrypoint.sh /entrypoint.sh
13+
14+
ENTRYPOINT ["/entrypoint.sh"]

rocky9.v1/entrypoint.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash -x
2+
3+
# Print system information
4+
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk/
5+
mvn -version
6+
java --version
7+
javac -version
8+
9+
SOURCE_DIR=/source/
10+
OUTPUT_DIR=/output/
11+
BUILD_OPTS_DEFAULT="-Dnoredist -DskipTests -Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware -T2"
12+
13+
SOURCE=${SOURCE:-}
14+
VERSION=${VERSION:-}
15+
BUILD_OPTS=${BUILD_OPTS:-$BUILD_OPTS_DEFAULT}
16+
PACKAGE_OPTS=${PACKAGE_OPTS:-}
17+
18+
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
19+
if [ -d "$SOURCE_DIR" ]; then
20+
echo "$SOURCE_DIR already exists in the container"
21+
exit 1
22+
fi
23+
git clone $SOURCE $SOURCE_DIR
24+
elif [ -z "$SOURCE_DIR" ] || [ ! -d "$SOURCE_DIR" ] || [ ! -f "$SOURCE_DIR/pom.xml" ]; then
25+
echo "Source $SOURCE_DIR does not exist in the container"
26+
exit 1
27+
fi
28+
if [ ! -d "$OUTPUT_DIR" ]; then
29+
echo "$OUTPUT_DIR does not exist in the container"
30+
exit 1
31+
fi
32+
33+
cd $SOURCE_DIR
34+
if [ ! -z "$VERSION" ]; then
35+
git checkout $VERSION
36+
fi
37+
38+
# Packaging
39+
NODE_OPTIONS=--openssl-legacy-provider FLAGS=$BUILD_OPTS packaging/package.sh -d centos8 $PACKAGE_OPTS
40+
41+
mv $SOURCE_DIR/dist/rpmbuild/RPMS/x86_64/cloudstack-*.rpm $OUTPUT_DIR
42+
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
43+
rm -rf $SOURCE_DIR
44+
fi

ubuntu2404.v2/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM ubuntu:24.04
2+
MAINTAINER Wei Zhou <weizhou@apache.org>
3+
4+
ENV DEBIAN_FRONTEND noninteractive
5+
6+
RUN apt update -qq && \
7+
apt upgrade -y && \
8+
apt-get install -y dpkg-dev python3 debhelper openjdk-17-jdk genisoimage python3-mysql.connector maven lsb-release devscripts python3-setuptools git wget curl jq
9+
10+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11+
&& apt-get install -y nodejs
12+
13+
COPY entrypoint.sh /entrypoint.sh
14+
15+
ENTRYPOINT ["/entrypoint.sh"]

ubuntu2404.v2/entrypoint.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash -x
2+
3+
# Print system information
4+
mvn -version
5+
java --version
6+
javac -version
7+
8+
SOURCE_DIR=/source/
9+
OUTPUT_DIR=/output/
10+
BUILD_OPTS_DEFAULT="-Dnoredist -DskipTests -Dsystemvm-kvm -Dsystemvm-xen -Dsystemvm-vmware -T2"
11+
12+
SOURCE=${SOURCE:-}
13+
VERSION=${VERSION:-}
14+
BUILD_OPTS=${BUILD_OPTS:-$BUILD_OPTS_DEFAULT}
15+
16+
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
17+
if [ -d "$SOURCE_DIR" ]; then
18+
echo "$SOURCE_DIR already exists in the container"
19+
exit 1
20+
fi
21+
git clone $SOURCE $SOURCE_DIR
22+
elif [ -z "$SOURCE_DIR" ] || [ ! -d "$SOURCE_DIR" ] || [ ! -f "$SOURCE_DIR/pom.xml" ]; then
23+
echo "Source $SOURCE_DIR does not exist in the container"
24+
exit 1
25+
fi
26+
if [ ! -d "$OUTPUT_DIR" ]; then
27+
echo "$OUTPUT_DIR does not exist in the container"
28+
exit 1
29+
fi
30+
31+
cd $SOURCE_DIR
32+
if [ ! -z "$VERSION" ]; then
33+
git checkout $VERSION
34+
fi
35+
36+
# Packaging
37+
NODE_OPTIONS=--openssl-legacy-provider ACS_BUILD_OPTS=$BUILD_OPTS packaging/build-deb.sh
38+
39+
mv $SOURCE_DIR/../cloudstack-*.deb $OUTPUT_DIR
40+
if [[ $SOURCE =~ http.* ]] || [[ $SOURCE =~ git.* ]]; then
41+
rm -rf $SOURCE_DIR
42+
fi

0 commit comments

Comments
 (0)