File tree 7 files changed +22
-16
lines changed
grout-container-app/cnfapp
testpmd-container-app/cnfapp
utils/support-images/ubi8-base-trex
7 files changed +22
-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 .
@@ -46,9 +46,10 @@ RUN dnf install -y \
46
46
vim \
47
47
&& dnf clean all
48
48
49
+ # Install TRex
49
50
RUN mkdir -p /opt/trex && cd /opt/trex && git clone --branch ${TREX_VER} ${TREX_REPO}
50
51
RUN cd /opt/trex/trex-core/linux_dpdk && \
51
- ./b configure --no-mlx --no-bxnt --new-memory && \
52
+ ./b configure --no-bnxt --new-memory && \
52
53
./b build
53
54
54
55
RUN cd /opt && git clone ${TRAFFICGEN_REPO} && mv bench-trafficgen/trafficgen . && rm -rf bench-trafficgen
@@ -79,7 +80,7 @@ RUN chmod 664 /usr/local/bin/example-cnf/trex_cfg.yaml
79
80
80
81
# Copy scripts
81
82
COPY --chmod=550 scripts /usr/local/bin
82
- COPY --chmod=550 --from=build /utils /webserver /usr/local/bin/webserver
83
+ COPY --chmod=550 --from=build /opt/app-root/src /webserver /usr/local/bin/webserver
83
84
84
85
# Move to the custom user
85
86
USER example-cnf
Original file line number Diff line number Diff line change 19
19
until [ " $n " -ge 5 ]
20
20
do
21
21
cd /opt/trex/trex-core/scripts
22
- ./_t-rex-64 --cfg /usr/local/bin/example-cnf/trex_cfg.yaml -i --no-hw-flow-stat -c $CORE_COUNT
22
+ ./_t-rex-64 --cfg /usr/local/bin/example-cnf/trex_cfg.yaml --no-ofed-check - i --no-hw-flow-stat -c $CORE_COUNT
23
23
n=$(( n+ 1 ))
24
24
sleep 5
25
25
done
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ FROM registry.access.redhat.com/ubi8/ubi:latest
4
4
RUN dnf install -y \
5
5
numactl \
6
6
numactl-devel \
7
+ rdma-core \
7
8
nfs-utils \
8
9
perf \
9
10
tcpdump \
You can’t perform that action at this time.
0 commit comments