Skip to content

Commit

Permalink
CentOS 7 ARM build
Browse files Browse the repository at this point in the history
  • Loading branch information
Fydon committed Apr 11, 2024
1 parent 406e232 commit c92fc04
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 99 deletions.
184 changes: 92 additions & 92 deletions .github/workflows/webserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,34 +99,34 @@ jobs:
cp -r /build-dependencies /otel-webserver-module/; \
./gradlew assembleWebServerModule -DtargetSystem=ubuntu'
- name: unit test
run: |
docker exec apache_ubuntu_container_arm64 bash -c \
'cd /otel-webserver-module; ./gradlew runUnitTest'
# - name: unit test
# run: |
# docker exec apache_ubuntu_container_arm64 bash -c \
# 'cd /otel-webserver-module; ./gradlew runUnitTest'
- name: update cache
run: |
rm -rf /tmp/buildx-cache/apache_ubuntu_arm64
mv /tmp/buildx-cache/apache_ubuntu_arm64-new /tmp/buildx-cache/apache_ubuntu_arm64
- name: copy artifacts
id: artifacts
run: |
cd instrumentation/otel-webserver-module
mkdir -p /tmp/apache_ubuntu_arm64/
docker cp apache_ubuntu_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
/tmp/apache_ubuntu_arm64/
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: opentelemetry-webserver-sdk-arm64-linux.tgz
path: /tmp/apache_ubuntu_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
- name: run integrationtest
run: |
docker rm -f apache_ubuntu_container_arm64
cd instrumentation/otel-webserver-module
docker compose --profile ubuntu20.04 up -d
docker ps -a
sleep 30
./gradlew :test:integration:integrationTests -i
# - name: copy artifacts
# id: artifacts
# run: |
# cd instrumentation/otel-webserver-module
# mkdir -p /tmp/apache_ubuntu_arm64/
# docker cp apache_ubuntu_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
# /tmp/apache_ubuntu_arm64/
# - name: upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: opentelemetry-webserver-sdk-arm64-linux.tgz
# path: /tmp/apache_ubuntu_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
# - name: run integrationtest
# run: |
# docker rm -f apache_ubuntu_container_arm64
# cd instrumentation/otel-webserver-module
# docker compose --profile ubuntu20.04 up -d
# docker ps -a
# sleep 30
# ./gradlew :test:integration:integrationTests -i

webserver-build-test-centos7-x64:
name: webserver-centos7-build-x64
Expand Down Expand Up @@ -193,74 +193,74 @@ jobs:
sleep 30
./gradlew :test:integration:integrationTests -i
# webserver-build-test-centos7-arm64:
# name: webserver-centos7-build-arm64
# runs-on: ubuntu-20.04
# steps:
# - name: checkout otel webserver
# uses: actions/checkout@v3
# - name: setup qemu
# uses: docker/setup-qemu-action@master
# - name: setup buildx
# id: buildx
# uses: docker/setup-buildx-action@master
# with:
# install: true
# platforms: linux/arm64
# # - name: cache docker layers
# # uses: actions/cache@v3
# # with:
# # path: /tmp/buildx-cache/
# # key: apache-centos7-${{ github.sha }}
# # restore-keys: |
# # apache-centos7
# - name: setup docker image
# run: |
# cd instrumentation/otel-webserver-module
# docker buildx build -t apache_centos7_arm64 -f docker/centos7/Dockerfile \
# --load . --platform linux/arm64 --build-arg BUILD_ARCH='arm64' \
# --build-arg CMAKE_ARCH='aarch64' --build-arg GOSU_ARCH='arm64' \
# --build-arg JDK_ARCH='aarch64' --build-arg NGINX_ARCH='aarch64'
# - name: build
# run: |
# docker run -idt --platform linux/arm64 --name apache_centos7_container_arm64 apache_centos7_arm64 /bin/bash
# cd instrumentation/otel-webserver-module
# docker exec apache_centos7_container_arm64 bash -c \
# 'cd /otel-webserver-module; rm -rf *;'
# docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_arm64):/otel-webserver-module/
# docker exec apache_centos7_container_arm64 bash -c \
# 'cd /otel-webserver-module; rm -rf build; \
# cp -r /dependencies /otel-webserver-module/; \
# cp -r /build-dependencies /otel-webserver-module/; \
# ./gradlew assembleWebServerModule'
# - name: unit test
# run: |
# docker exec apache_centos7_container_arm64 bash -c \
# 'cd /otel-webserver-module; ./gradlew runUnitTest'
# # - name: update cache
# # run: |
# # rm -rf /tmp/buildx-cache/apache_centos7_arm64
# # mv /tmp/buildx-cache/apache_centos7_arm64-new /tmp/buildx-cache/apache_centos7_arm64
# - name: copy artifacts
# id: artifacts
# run: |
# cd instrumentation/otel-webserver-module
# mkdir -p /tmp/apache_centos7_arm64/
# docker cp apache_centos7_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
# /tmp/apache_centos7_arm64/
# - name: upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: opentelemetry-webserver-sdk-arm64-linux.tgz
# path: /tmp/apache_centos7_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
# - name: run integrationtest
# run: |
# docker rm -f apache_centos7_container_arm64
# cd instrumentation/otel-webserver-module
# docker compose --profile centos7 up -d
# docker ps -a
# sleep 30
# ./gradlew :test:integration:integrationTests -i
webserver-build-test-centos7-arm64:
name: webserver-centos7-build-arm64
runs-on: ubuntu-20.04
steps:
- name: checkout otel webserver
uses: actions/checkout@v3
- name: setup qemu
uses: docker/setup-qemu-action@master
- name: setup buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true
platforms: linux/arm64
# - name: cache docker layers
# uses: actions/cache@v3
# with:
# path: /tmp/buildx-cache/
# key: apache-centos7-${{ github.sha }}
# restore-keys: |
# apache-centos7
- name: setup docker image
run: |
cd instrumentation/otel-webserver-module
docker buildx build -t apache_centos7_arm64 -f docker/centos7/Dockerfile \
--load . --platform linux/arm64 --build-arg BUILD_ARCH='arm64' \
--build-arg CMAKE_ARCH='aarch64' --build-arg GOSU_ARCH='arm64' \
--build-arg JDK_ARCH='aarch64' --build-arg NGINX_ARCH='aarch64'
- name: build
run: |
docker run -idt --platform linux/arm64 --name apache_centos7_container_arm64 apache_centos7_arm64 /bin/bash
cd instrumentation/otel-webserver-module
docker exec apache_centos7_container_arm64 bash -c \
'cd /otel-webserver-module; rm -rf *;'
docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_arm64):/otel-webserver-module/
docker exec apache_centos7_container_arm64 bash -c \
'cd /otel-webserver-module; rm -rf build; \
cp -r /dependencies /otel-webserver-module/; \
cp -r /build-dependencies /otel-webserver-module/; \
./gradlew assembleWebServerModule'
- name: unit test
run: |
docker exec apache_centos7_container_arm64 bash -c \
'cd /otel-webserver-module; ./gradlew runUnitTest'
# - name: update cache
# run: |
# rm -rf /tmp/buildx-cache/apache_centos7_arm64
# mv /tmp/buildx-cache/apache_centos7_arm64-new /tmp/buildx-cache/apache_centos7_arm64
- name: copy artifacts
id: artifacts
run: |
cd instrumentation/otel-webserver-module
mkdir -p /tmp/apache_centos7_arm64/
docker cp apache_centos7_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
/tmp/apache_centos7_arm64/
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: opentelemetry-webserver-sdk-arm64-linux.tgz
path: /tmp/apache_centos7_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
- name: run integrationtest
run: |
docker rm -f apache_centos7_container_arm64
cd instrumentation/otel-webserver-module
docker compose --profile centos7 up -d
docker ps -a
sleep 30
./gradlew :test:integration:integrationTests -i
# webserver-build-test-centos6:
# name: webserver-centos6-build
Expand Down
7 changes: 4 additions & 3 deletions instrumentation/otel-webserver-module/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV GOSU_ARCH=${GOSU_ARCH}
ARG JDK_ARCH='x64'
ENV JDK_ARCH=${JDK_ARCH}

ARG PYTHON_VERSION="2.7.8"
ARG PYTHON_VERSION="2.7.18"
ARG CMAKE_ARCH='x86_64'
ARG CMAKE_VERSION="3.20"
ARG CMAKE_0VERSION="3.20.0"
Expand All @@ -22,6 +22,7 @@ ARG APR_VERSION="1.7.0"
ARG EXPAT_VERSION="2.3.0"
ARG EXPAT_RVERSION="R_2_3_0"
ARG APRUTIL_VERSION="1.6.1"
ARG AUTOCONF_BUILD_TYPE='x86_64-unknown-linux-gnu'
ARG AUTOCONF_VERSION="2.68"
ARG LIBTOOL_VERSION="2.4.6"
ARG LOG4CXX_VERSION="0.11.0"
Expand Down Expand Up @@ -78,7 +79,7 @@ RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERS
&& rm -rf Python-${PYTHON_VERSION}.tar.xz && rm -rf Python-${PYTHON_VERSION}.tar

# install gosu for easy step-down from root (from https://github.com/tianon/gosu/blob/master/INSTALL.md#from-centos)
ENV GOSU_VERSION=1.10
ENV GOSU_VERSION=1.11

RUN curl -o /usr/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}" \
&& chmod +x /usr/bin/gosu \
Expand Down Expand Up @@ -157,7 +158,7 @@ RUN yum install m4 -y
RUN wget --no-check-certificate https://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.gz \
&& tar xzf autoconf-${AUTOCONF_VERSION}.tar.gz \
&& cd autoconf-${AUTOCONF_VERSION} \
&& ./configure --prefix=/usr/ && make -j && make install && autoconf -V \
&& ./configure --prefix=/usr/ --build=${AUTOCONF_BUILD_TYPE} && make -j && make install && autoconf -V \
&& cd .. && rm -rf autoconf-${AUTOCONF_VERSION}.tar.gz

# install automake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV GOSU_ARCH=${GOSU_ARCH}
ARG JDK_ARCH='x64'
ENV JDK_ARCH=${JDK_ARCH}

ARG PYTHON_VERSION="2.7.8"
ARG PYTHON_VERSION="2.7.18"
ARG CMAKE_ARCH='x86_64'
ARG CMAKE_VERSION="3.20"
ARG CMAKE_0VERSION="3.20.0"
Expand All @@ -22,6 +22,7 @@ ARG APR_VERSION="1.7.0"
ARG EXPAT_VERSION="2.3.0"
ARG EXPAT_RVERSION="R_2_3_0"
ARG APRUTIL_VERSION="1.6.1"
ARG AUTOCONF_BUILD_TYPE='x86_64-unknown-linux-gnu'
ARG AUTOCONF_VERSION="2.68"
ARG LIBTOOL_VERSION="2.4.6"
ARG LOG4CXX_VERSION="0.11.0"
Expand Down Expand Up @@ -70,7 +71,7 @@ RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
&& yum clean all
ENV PATH="/opt/rh/devtoolset-7/root/usr/bin:${PATH}"

# install python 2.7.8
# install python
RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz \
&& unxz Python-${PYTHON_VERSION}.tar.xz \
&& tar -xf Python-${PYTHON_VERSION}.tar \
Expand All @@ -79,7 +80,7 @@ RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERS
&& rm -rf Python-${PYTHON_VERSION}.tar.xz && rm -rf Python-${PYTHON_VERSION}.tar

# install gosu for easy step-down from root (from https://github.com/tianon/gosu/blob/master/INSTALL.md#from-centos)
ENV GOSU_VERSION=1.10
ENV GOSU_VERSION=1.11
#RUN gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
# && curl -o /usr/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}" \
# && curl -o /usr/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCH}.asc" \
Expand Down Expand Up @@ -175,7 +176,7 @@ ENV PATH=$HOME/localperl/bin:$PATH
RUN wget --no-check-certificate https://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.gz \
&& tar xzf autoconf-${AUTOCONF_VERSION}.tar.gz \
&& cd autoconf-${AUTOCONF_VERSION} \
&& ./configure --prefix=/usr/ && make -j && make install && autoconf -V \
&& ./configure --prefix=/usr/ --build=${AUTOCONF_BUILD_TYPE} && make -j && make install && autoconf -V \
&& cd .. && rm -rf autoconf-${AUTOCONF_VERSION}.tar.gz

# install automake
Expand Down

0 comments on commit c92fc04

Please sign in to comment.