Skip to content

Commit fac1803

Browse files
authored
Merge pull request #301 from Venkat-Kunaparaju/ci-change
Invoke dpu-sim Kind TFT offload lanes
2 parents c6e3e7e + bedf93b commit fac1803

4 files changed

Lines changed: 25 additions & 182 deletions

File tree

.github/tft-configs/dpu-offload.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/tft-configs/full-suite.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/tft-configs/resource-limits.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ tft:
1919
server:
2020
- name: "dpu-sim-host-worker"
2121
persistent: true
22-
sriov: false
22+
sriov: true
23+
default_network: "default/ovn-primary"
2324
client:
2425
- name: "dpu-sim-host-worker2"
25-
sriov: false
26+
sriov: true
27+
default_network: "default/ovn-primary"
28+
resource_name: "dpusim.io/vf"
2629
plugins:
2730
- name: measure_cpu
2831
test_cases:

.github/workflows/kind-tft.yml

Lines changed: 20 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,146 +1,40 @@
11
name: Kind TFT
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
push:
67
branches:
78
- main
9+
- ci-change
810

911
jobs:
1012
kind-tft:
1113
strategy:
12-
# Keep every scenario running to completion so we can collect artifacts
13-
# from each leg independently when one fails.
1414
fail-fast: false
1515
matrix:
1616
include:
1717
- scenario: full-suite
18-
dpu_sim_config: config-kind.yaml
18+
dpu_sim_config: ci/config-kind-ovnk-offload.yaml
19+
tft_config: ""
20+
tft_env: ""
1921
- scenario: diverse-subset
20-
dpu_sim_config: config-kind.yaml
21-
tft_log_preamble: "false"
22+
dpu_sim_config: ci/config-kind.yaml
23+
tft_config: .github/tft-configs/diverse-subset.yaml
24+
tft_env: |
25+
TFT_LOG_PREAMBLE=false
2226
- scenario: resource-limits
23-
dpu_sim_config: config-kind.yaml
24-
- scenario: dpu-offload
25-
dpu_sim_config: config-kind-ovnk-offload.yaml
26-
runs-on: ubuntu-latest
27-
timeout-minutes: 180
28-
# Job-level concurrency so matrix.scenario is in scope; workflow-level
29-
# concurrency cannot reference matrix.* expressions.
27+
dpu_sim_config: ci/config-kind-ovnk-offload.yaml
28+
tft_config: .github/tft-configs/resource-limits.yaml
29+
tft_env: ""
3030
concurrency:
3131
group: kind-tft-${{ matrix.scenario }}-${{ github.ref }}
3232
cancel-in-progress: true
33-
steps:
34-
- name: Checkout ovn-k8s-traffic-flow-tests
35-
uses: actions/checkout@v4
36-
37-
- name: Checkout dpu-simulator
38-
uses: actions/checkout@v4
39-
with:
40-
repository: ovn-kubernetes/dpu-simulator
41-
ref: main
42-
path: dpu-simulator
43-
44-
- name: Checkout OVN-Kubernetes (master)
45-
uses: actions/checkout@v4
46-
with:
47-
repository: ovn-org/ovn-kubernetes
48-
ref: master
49-
path: dpu-simulator/ovn-kubernetes
50-
51-
- name: Set up Go
52-
uses: actions/setup-go@v5
53-
with:
54-
go-version-file: dpu-simulator/go.mod
55-
cache: true
56-
57-
- name: Install libvirt development headers
58-
run: sudo apt-get update && sudo apt-get install -y libvirt-dev
59-
60-
- name: Install Helm
61-
uses: azure/setup-helm@v4
62-
63-
- name: Set up Python for traffic flow tests
64-
uses: actions/setup-python@v5
65-
with:
66-
python-version: "3.12"
67-
68-
- name: Install kind
69-
run: |
70-
KIND_VERSION=v0.31.0
71-
curl -fsSLo /tmp/kind-linux-amd64 "https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64"
72-
curl -fsSLo /tmp/kind-linux-amd64.sha256sum "https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64.sha256sum"
73-
(cd /tmp && sha256sum -c kind-linux-amd64.sha256sum)
74-
chmod +x /tmp/kind-linux-amd64
75-
sudo mv /tmp/kind-linux-amd64 /usr/local/bin/kind
76-
77-
- name: Build dpu-sim
78-
working-directory: dpu-simulator
79-
run: make build
80-
81-
- name: Disable containerd image store
82-
# Workaround for https://github.com/kubernetes-sigs/kind/issues/3795
83-
run: |
84-
sudo mkdir -p /etc/docker
85-
[ -s "/etc/docker/daemon.json" ] && {
86-
cat "/etc/docker/daemon.json" | jq '. + {"features":{"containerd-snapshotter": false}}' | sudo tee /etc/docker/daemon.$$
87-
} || {
88-
echo '{"features":{"containerd-snapshotter": false}}' | sudo tee /etc/docker/daemon.$$
89-
}
90-
sudo mv -f /etc/docker/daemon.$$ /etc/docker/daemon.json
91-
sudo systemctl restart docker
92-
93-
- name: Deploy KIND cluster
94-
working-directory: dpu-simulator
95-
run: ./bin/dpu-sim --config ${{ matrix.dpu_sim_config }}
96-
97-
- name: Verify clusters are ready
98-
working-directory: dpu-simulator
99-
run: |
100-
kubectl wait --for=condition=Ready nodes --all \
101-
--kubeconfig kubeconfig/dpu-sim-host.kubeconfig --timeout=25m
102-
kubectl wait --for=condition=Ready nodes --all \
103-
--kubeconfig kubeconfig/dpu-sim-dpu.kubeconfig --timeout=25m
104-
105-
- name: TFT Python venv
106-
working-directory: dpu-simulator
107-
run: ./bin/dpu-sim tft venv --config ${{ matrix.dpu_sim_config }} --tft-repo-path "$GITHUB_WORKSPACE"
108-
109-
- name: Run traffic flow tests
110-
working-directory: dpu-simulator
111-
env:
112-
TFT_KUBECONFIG: ${{ github.workspace }}/dpu-simulator/kubeconfig/dpu-sim-host.kubeconfig
113-
TFT_LOG_PREAMBLE: ${{ matrix.tft_log_preamble }}
114-
run: |
115-
./bin/dpu-sim tft run \
116-
--config ${{ matrix.dpu_sim_config }} \
117-
--tft-repo-path "$GITHUB_WORKSPACE" \
118-
--tft-config "$GITHUB_WORKSPACE/.github/tft-configs/${{ matrix.scenario }}.yaml" \
119-
--check
120-
121-
- name: Export kind logs on failure
122-
if: failure()
123-
run: |
124-
kind export logs /tmp/kind-tft-logs --name dpu-sim-host 2>/dev/null || true
125-
kind export logs /tmp/kind-tft-logs --name dpu-sim-dpu 2>/dev/null || true
126-
127-
- name: Upload kind logs on failure
128-
if: failure()
129-
uses: actions/upload-artifact@v4
130-
with:
131-
name: kind-tft-${{ matrix.scenario }}-kind-logs
132-
path: /tmp/kind-tft-logs
133-
if-no-files-found: ignore
134-
135-
- name: Upload TFT results on failure
136-
if: failure()
137-
uses: actions/upload-artifact@v4
138-
with:
139-
name: kind-tft-${{ matrix.scenario }}-ft-logs
140-
path: ft-logs
141-
if-no-files-found: ignore
142-
143-
- name: Cleanup
144-
if: always()
145-
working-directory: dpu-simulator
146-
run: ./bin/dpu-sim --config ${{ matrix.dpu_sim_config }} --cleanup || true
33+
uses: ovn-kubernetes/dpu-simulator/.github/workflows/kind-tft.yml@main
34+
with:
35+
config: ${{ matrix.dpu_sim_config }}
36+
tft-config: ${{ matrix.tft_config }}
37+
tft-env: ${{ matrix.tft_env }}
38+
tft-repo-url: https://github.com/${{ github.event.pull_request.head.repo.full_name || github.repository }}
39+
tft-ref: ${{ github.event.pull_request.head.sha || github.sha }}
40+
artifact-prefix: kind-tft-${{ matrix.scenario }}

0 commit comments

Comments
 (0)