File tree 6 files changed +40
-16
lines changed
grout-container-app/cnfapp
testpmd-container-app/cnfapp
utils/support-images/ubi8-base-trex
6 files changed +40
-16
lines changed Original file line number Diff line number Diff line change 1
1
# # Image to build webserver
2
- FROM docker.io/library/golang :1.23 as build
2
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build
3
3
4
- WORKDIR /utils
4
+ WORKDIR /opt/app-root/src
5
5
COPY utils/webserver.go .
6
6
RUN go mod init webserver.go
7
7
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -53,7 +53,7 @@ RUN chmod 750 /var/log/grout
53
53
RUN chown example-cnf /var/log/grout
54
54
55
55
# Copy scripts
56
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
56
+ COPY --chmod=550 --from=build /opt/app-root/src /webserver /usr/local/bin/webserver
57
57
COPY --chmod=550 scripts/grout-wrapper /usr/local/bin/example-cnf/grout-wrapper
58
58
COPY --chmod=550 scripts/retrieve-grout-ip-addresses /usr/local/bin/example-cnf/retrieve-grout-ip-addresses
59
59
Original file line number Diff line number Diff line change 2
2
FROM quay.io/rh-nfv-int/dpdk:v0.0.1 as build
3
3
4
4
# # Image to build webserver
5
- FROM docker.io/library/golang :1.23 as build2
5
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build2
6
6
7
- WORKDIR /utils
7
+ WORKDIR /opt/app-root/src
8
8
COPY utils/webserver.go .
9
9
RUN go mod init webserver.go
10
10
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -43,7 +43,7 @@ RUN chmod 750 /var/log/testpmd
43
43
RUN chown example-cnf /var/log/testpmd
44
44
45
45
# Copy scripts
46
- COPY --chmod=550 --from=build2 /utils /webserver /usr/local/bin/webserver
46
+ COPY --chmod=550 --from=build2 /opt/app-root/src /webserver /usr/local/bin/webserver
47
47
COPY --chmod=550 --from=build /usr/local/bin/dpdk-testpmd /usr/local/bin/example-cnf/testpmd
48
48
COPY --chmod=550 scripts/testpmd-wrapper /usr/local/bin/example-cnf/testpmd-wrapper
49
49
Original file line number Diff line number Diff line change @@ -45,13 +45,17 @@ if [ -f /sys/fs/cgroup/cpuset/cpuset.cpus ]; then
45
45
elif [ -f /sys/fs/cgroup/cpuset.cpus ]; then
46
46
# Applied to latest OCP 4.16 nightlies starting from 4.16.0 ec.5
47
47
LCORES=$( cat /sys/fs/cgroup/cpuset.cpus)
48
+ elif [ -f /proc/1/status ]; then
49
+ # Applied when using a privileged pod, since /sys/fs/cgroup directory is overriden with host configuration
50
+ # Extract the list of CPUs from /proc/1/status file
51
+ LCORES=$( cat /proc/1/status | grep Cpus_allowed_list | awk ' {print $2}' )
48
52
else
49
- echo " Could not find file to extract cores, existing .."
53
+ echo " Could not find file to extract cores, exiting. .."
50
54
exit 1
51
55
fi
52
56
53
57
if [ -z $LCORES ]; then
54
- echo " Could not find cores, existing .."
58
+ echo " Could not find cores, exiting. .."
55
59
exit 1
56
60
fi
57
61
Original file line number Diff line number Diff line change 1
- FROM docker.io/library/golang :1.23 as build
1
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build
2
2
3
- WORKDIR /utils
3
+ WORKDIR /opt/app-root/src
4
4
COPY utils/webserver.go .
5
5
RUN go mod init webserver.go
6
6
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
@@ -45,7 +45,7 @@ RUN chown example-cnf:example-cnf /var/log/trex
45
45
46
46
# Copy scripts
47
47
COPY --chmod=550 scripts /usr/local/bin/
48
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
48
+ COPY --chmod=550 --from=build /opt/app-root/src /webserver /usr/local/bin/webserver
49
49
COPY --chmod=550 pyfiles /opt/pyfiles/
50
50
51
51
# Move to the custom user
Original file line number Diff line number Diff line change 1
- FROM docker.io/library/golang :1.23 as build
1
+ FROM registry.access.redhat.com/ubi9/go-toolset :1.23 as build
2
2
3
- WORKDIR /utils
3
+ WORKDIR /opt/app-root/src
4
4
COPY utils/webserver.go .
5
5
RUN go mod init webserver.go
6
6
RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
7
7
8
8
# # trex image
9
- FROM quay.io/rh-nfv-int/ubi8-base-trex:v0.0.1
9
+ FROM quay.io/rh-nfv-int/ubi8-base-trex:v0.0.2
10
10
11
11
LABEL name="NFV Example TRexServer Application" \
12
12
maintainer="telcoci" \
@@ -44,11 +44,13 @@ RUN dnf install -y \
44
44
zlib-devel \
45
45
binutils \
46
46
vim \
47
+ hostname \
47
48
&& dnf clean all
48
49
50
+ # Install TRex
49
51
RUN mkdir -p /opt/trex && cd /opt/trex && git clone --branch ${TREX_VER} ${TREX_REPO}
50
52
RUN cd /opt/trex/trex-core/linux_dpdk && \
51
- ./b configure --no-mlx --no-bxnt --new-memory && \
53
+ ./b configure --no-bnxt --new-memory && \
52
54
./b build
53
55
54
56
RUN cd /opt && git clone ${TRAFFICGEN_REPO} && mv bench-trafficgen/trafficgen . && rm -rf bench-trafficgen
@@ -79,7 +81,8 @@ RUN chmod 664 /usr/local/bin/example-cnf/trex_cfg.yaml
79
81
80
82
# Copy scripts
81
83
COPY --chmod=550 scripts /usr/local/bin
82
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
84
+ COPY --chmod=550 --from=build /opt/app-root/src /webserver /usr/local/bin/webserver
83
85
84
86
# Move to the custom user
85
87
USER example-cnf
88
+
Original file line number Diff line number Diff line change @@ -8,4 +8,21 @@ RUN dnf install -y \
8
8
perf \
9
9
tcpdump \
10
10
sudo \
11
+ bison \
12
+ wget \
11
13
&& dnf clean all
14
+
15
+ # Install doca-ofed for Mellanox support
16
+ # Check https://trex-tgn.cisco.com/trex/doc/trex_appendix_mellanox.html
17
+ # Installation steps: https://docs.nvidia.com/doca/sdk/doca-host+installation+and+upgrade/index.html
18
+ # (Check "Installing Software on Host" section)
19
+ ENV DOCA_OFED_MAJOR_VERSION 2.10.0
20
+ ENV DOCA_OFED_RPM doca-host-${DOCA_OFED_MAJOR_VERSION}-093000_25.01_rhel82.x86_64.rpm
21
+ RUN cd /opt && \
22
+ wget https://www.mellanox.com/downloads/DOCA/DOCA_v${DOCA_OFED_MAJOR_VERSION}/host/${DOCA_OFED_RPM} && \
23
+ rpm -i ${DOCA_OFED_RPM} && \
24
+ dnf clean all
25
+
26
+ RUN dnf install -y \
27
+ doca-ofed \
28
+ mlnx-fw-updater
You can’t perform that action at this time.
0 commit comments