Skip to content

Commit c92fc04

Browse files
committed
CentOS 7 ARM build
1 parent 406e232 commit c92fc04

File tree

3 files changed

+101
-99
lines changed

3 files changed

+101
-99
lines changed

.github/workflows/webserver.yml

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,34 @@ jobs:
9999
cp -r /build-dependencies /otel-webserver-module/; \
100100
101101
./gradlew assembleWebServerModule -DtargetSystem=ubuntu'
102-
- name: unit test
103-
run: |
104-
docker exec apache_ubuntu_container_arm64 bash -c \
105-
'cd /otel-webserver-module; ./gradlew runUnitTest'
102+
# - name: unit test
103+
# run: |
104+
# docker exec apache_ubuntu_container_arm64 bash -c \
105+
# 'cd /otel-webserver-module; ./gradlew runUnitTest'
106106
- name: update cache
107107
run: |
108108
rm -rf /tmp/buildx-cache/apache_ubuntu_arm64
109109
mv /tmp/buildx-cache/apache_ubuntu_arm64-new /tmp/buildx-cache/apache_ubuntu_arm64
110-
- name: copy artifacts
111-
id: artifacts
112-
run: |
113-
cd instrumentation/otel-webserver-module
114-
mkdir -p /tmp/apache_ubuntu_arm64/
115-
docker cp apache_ubuntu_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
116-
/tmp/apache_ubuntu_arm64/
117-
- name: upload artifacts
118-
uses: actions/upload-artifact@v3
119-
with:
120-
name: opentelemetry-webserver-sdk-arm64-linux.tgz
121-
path: /tmp/apache_ubuntu_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
122-
- name: run integrationtest
123-
run: |
124-
docker rm -f apache_ubuntu_container_arm64
125-
cd instrumentation/otel-webserver-module
126-
docker compose --profile ubuntu20.04 up -d
127-
docker ps -a
128-
sleep 30
129-
./gradlew :test:integration:integrationTests -i
110+
# - name: copy artifacts
111+
# id: artifacts
112+
# run: |
113+
# cd instrumentation/otel-webserver-module
114+
# mkdir -p /tmp/apache_ubuntu_arm64/
115+
# docker cp apache_ubuntu_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
116+
# /tmp/apache_ubuntu_arm64/
117+
# - name: upload artifacts
118+
# uses: actions/upload-artifact@v3
119+
# with:
120+
# name: opentelemetry-webserver-sdk-arm64-linux.tgz
121+
# path: /tmp/apache_ubuntu_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
122+
# - name: run integrationtest
123+
# run: |
124+
# docker rm -f apache_ubuntu_container_arm64
125+
# cd instrumentation/otel-webserver-module
126+
# docker compose --profile ubuntu20.04 up -d
127+
# docker ps -a
128+
# sleep 30
129+
# ./gradlew :test:integration:integrationTests -i
130130

131131
webserver-build-test-centos7-x64:
132132
name: webserver-centos7-build-x64
@@ -193,74 +193,74 @@ jobs:
193193
sleep 30
194194
./gradlew :test:integration:integrationTests -i
195195
196-
# webserver-build-test-centos7-arm64:
197-
# name: webserver-centos7-build-arm64
198-
# runs-on: ubuntu-20.04
199-
# steps:
200-
# - name: checkout otel webserver
201-
# uses: actions/checkout@v3
202-
# - name: setup qemu
203-
# uses: docker/setup-qemu-action@master
204-
# - name: setup buildx
205-
# id: buildx
206-
# uses: docker/setup-buildx-action@master
207-
# with:
208-
# install: true
209-
# platforms: linux/arm64
210-
# # - name: cache docker layers
211-
# # uses: actions/cache@v3
212-
# # with:
213-
# # path: /tmp/buildx-cache/
214-
# # key: apache-centos7-${{ github.sha }}
215-
# # restore-keys: |
216-
# # apache-centos7
217-
# - name: setup docker image
218-
# run: |
219-
# cd instrumentation/otel-webserver-module
220-
# docker buildx build -t apache_centos7_arm64 -f docker/centos7/Dockerfile \
221-
# --load . --platform linux/arm64 --build-arg BUILD_ARCH='arm64' \
222-
# --build-arg CMAKE_ARCH='aarch64' --build-arg GOSU_ARCH='arm64' \
223-
# --build-arg JDK_ARCH='aarch64' --build-arg NGINX_ARCH='aarch64'
224-
# - name: build
225-
# run: |
226-
# docker run -idt --platform linux/arm64 --name apache_centos7_container_arm64 apache_centos7_arm64 /bin/bash
227-
# cd instrumentation/otel-webserver-module
228-
# docker exec apache_centos7_container_arm64 bash -c \
229-
# 'cd /otel-webserver-module; rm -rf *;'
230-
# docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_arm64):/otel-webserver-module/
231-
# docker exec apache_centos7_container_arm64 bash -c \
232-
# 'cd /otel-webserver-module; rm -rf build; \
233-
# cp -r /dependencies /otel-webserver-module/; \
234-
# cp -r /build-dependencies /otel-webserver-module/; \
235-
# ./gradlew assembleWebServerModule'
236-
# - name: unit test
237-
# run: |
238-
# docker exec apache_centos7_container_arm64 bash -c \
239-
# 'cd /otel-webserver-module; ./gradlew runUnitTest'
240-
# # - name: update cache
241-
# # run: |
242-
# # rm -rf /tmp/buildx-cache/apache_centos7_arm64
243-
# # mv /tmp/buildx-cache/apache_centos7_arm64-new /tmp/buildx-cache/apache_centos7_arm64
244-
# - name: copy artifacts
245-
# id: artifacts
246-
# run: |
247-
# cd instrumentation/otel-webserver-module
248-
# mkdir -p /tmp/apache_centos7_arm64/
249-
# docker cp apache_centos7_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
250-
# /tmp/apache_centos7_arm64/
251-
# - name: upload artifacts
252-
# uses: actions/upload-artifact@v3
253-
# with:
254-
# name: opentelemetry-webserver-sdk-arm64-linux.tgz
255-
# path: /tmp/apache_centos7_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
256-
# - name: run integrationtest
257-
# run: |
258-
# docker rm -f apache_centos7_container_arm64
259-
# cd instrumentation/otel-webserver-module
260-
# docker compose --profile centos7 up -d
261-
# docker ps -a
262-
# sleep 30
263-
# ./gradlew :test:integration:integrationTests -i
196+
webserver-build-test-centos7-arm64:
197+
name: webserver-centos7-build-arm64
198+
runs-on: ubuntu-20.04
199+
steps:
200+
- name: checkout otel webserver
201+
uses: actions/checkout@v3
202+
- name: setup qemu
203+
uses: docker/setup-qemu-action@master
204+
- name: setup buildx
205+
id: buildx
206+
uses: docker/setup-buildx-action@master
207+
with:
208+
install: true
209+
platforms: linux/arm64
210+
# - name: cache docker layers
211+
# uses: actions/cache@v3
212+
# with:
213+
# path: /tmp/buildx-cache/
214+
# key: apache-centos7-${{ github.sha }}
215+
# restore-keys: |
216+
# apache-centos7
217+
- name: setup docker image
218+
run: |
219+
cd instrumentation/otel-webserver-module
220+
docker buildx build -t apache_centos7_arm64 -f docker/centos7/Dockerfile \
221+
--load . --platform linux/arm64 --build-arg BUILD_ARCH='arm64' \
222+
--build-arg CMAKE_ARCH='aarch64' --build-arg GOSU_ARCH='arm64' \
223+
--build-arg JDK_ARCH='aarch64' --build-arg NGINX_ARCH='aarch64'
224+
- name: build
225+
run: |
226+
docker run -idt --platform linux/arm64 --name apache_centos7_container_arm64 apache_centos7_arm64 /bin/bash
227+
cd instrumentation/otel-webserver-module
228+
docker exec apache_centos7_container_arm64 bash -c \
229+
'cd /otel-webserver-module; rm -rf *;'
230+
docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_arm64):/otel-webserver-module/
231+
docker exec apache_centos7_container_arm64 bash -c \
232+
'cd /otel-webserver-module; rm -rf build; \
233+
cp -r /dependencies /otel-webserver-module/; \
234+
cp -r /build-dependencies /otel-webserver-module/; \
235+
./gradlew assembleWebServerModule'
236+
- name: unit test
237+
run: |
238+
docker exec apache_centos7_container_arm64 bash -c \
239+
'cd /otel-webserver-module; ./gradlew runUnitTest'
240+
# - name: update cache
241+
# run: |
242+
# rm -rf /tmp/buildx-cache/apache_centos7_arm64
243+
# mv /tmp/buildx-cache/apache_centos7_arm64-new /tmp/buildx-cache/apache_centos7_arm64
244+
- name: copy artifacts
245+
id: artifacts
246+
run: |
247+
cd instrumentation/otel-webserver-module
248+
mkdir -p /tmp/apache_centos7_arm64/
249+
docker cp apache_centos7_container_arm64:/otel-webserver-module/build/opentelemetry-webserver-sdk-arm64-linux.tgz \
250+
/tmp/apache_centos7_arm64/
251+
- name: upload artifacts
252+
uses: actions/upload-artifact@v3
253+
with:
254+
name: opentelemetry-webserver-sdk-arm64-linux.tgz
255+
path: /tmp/apache_centos7_arm64/opentelemetry-webserver-sdk-arm64-linux.tgz
256+
- name: run integrationtest
257+
run: |
258+
docker rm -f apache_centos7_container_arm64
259+
cd instrumentation/otel-webserver-module
260+
docker compose --profile centos7 up -d
261+
docker ps -a
262+
sleep 30
263+
./gradlew :test:integration:integrationTests -i
264264
265265
# webserver-build-test-centos6:
266266
# name: webserver-centos6-build

instrumentation/otel-webserver-module/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV GOSU_ARCH=${GOSU_ARCH}
1010
ARG JDK_ARCH='x64'
1111
ENV JDK_ARCH=${JDK_ARCH}
1212

13-
ARG PYTHON_VERSION="2.7.8"
13+
ARG PYTHON_VERSION="2.7.18"
1414
ARG CMAKE_ARCH='x86_64'
1515
ARG CMAKE_VERSION="3.20"
1616
ARG CMAKE_0VERSION="3.20.0"
@@ -22,6 +22,7 @@ ARG APR_VERSION="1.7.0"
2222
ARG EXPAT_VERSION="2.3.0"
2323
ARG EXPAT_RVERSION="R_2_3_0"
2424
ARG APRUTIL_VERSION="1.6.1"
25+
ARG AUTOCONF_BUILD_TYPE='x86_64-unknown-linux-gnu'
2526
ARG AUTOCONF_VERSION="2.68"
2627
ARG LIBTOOL_VERSION="2.4.6"
2728
ARG LOG4CXX_VERSION="0.11.0"
@@ -78,7 +79,7 @@ RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERS
7879
&& rm -rf Python-${PYTHON_VERSION}.tar.xz && rm -rf Python-${PYTHON_VERSION}.tar
7980

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

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

163164
# install automake

instrumentation/otel-webserver-module/docker/centos7/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV GOSU_ARCH=${GOSU_ARCH}
1010
ARG JDK_ARCH='x64'
1111
ENV JDK_ARCH=${JDK_ARCH}
1212

13-
ARG PYTHON_VERSION="2.7.8"
13+
ARG PYTHON_VERSION="2.7.18"
1414
ARG CMAKE_ARCH='x86_64'
1515
ARG CMAKE_VERSION="3.20"
1616
ARG CMAKE_0VERSION="3.20.0"
@@ -22,6 +22,7 @@ ARG APR_VERSION="1.7.0"
2222
ARG EXPAT_VERSION="2.3.0"
2323
ARG EXPAT_RVERSION="R_2_3_0"
2424
ARG APRUTIL_VERSION="1.6.1"
25+
ARG AUTOCONF_BUILD_TYPE='x86_64-unknown-linux-gnu'
2526
ARG AUTOCONF_VERSION="2.68"
2627
ARG LIBTOOL_VERSION="2.4.6"
2728
ARG LOG4CXX_VERSION="0.11.0"
@@ -70,7 +71,7 @@ RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
7071
&& yum clean all
7172
ENV PATH="/opt/rh/devtoolset-7/root/usr/bin:${PATH}"
7273

73-
# install python 2.7.8
74+
# install python
7475
RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz \
7576
&& unxz Python-${PYTHON_VERSION}.tar.xz \
7677
&& tar -xf Python-${PYTHON_VERSION}.tar \
@@ -79,7 +80,7 @@ RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERS
7980
&& rm -rf Python-${PYTHON_VERSION}.tar.xz && rm -rf Python-${PYTHON_VERSION}.tar
8081

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

181182
# install automake

0 commit comments

Comments
 (0)