-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): make libbpf as the default attacher (#1077)
* chore(ci): make libbpf image as the default image - tag existing 'latest' image as 'latest-bcc' - tag existing 'latest-libbpf' as 'latest' - make libbpf image as default released image - use libbpf as attacher for PR image - make unit_test run with libbpf attacher - updated unit_test workflow to install libbpf from source - build kepler with libbpf attacher for rpm build - rename integration_test to integration_test_bcc - rename integration_test_libbpf to integration_test Signed-off-by: Vimal Kumar <[email protected]> * fix(build): use correct cpus data file Updated following files to not use normalized_cpu_arch.csv, and use cpus.yaml - updated build/Dockerfile - doc/dev/prepare_dev_env.sh Signed-off-by: Vimal Kumar <[email protected]> --------- Signed-off-by: Vimal Kumar <[email protected]>
- Loading branch information
Showing
11 changed files
with
51 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
|
||
env: | ||
OUTPUT_DIR: "_output/" | ||
FILE_NAME: "kepler.tar.gz" | ||
FILE_NAME: "kepler_libbpf.tar.gz" | ||
ARTIFACT_DIR: "/tmp/artifacts" | ||
|
||
jobs: | ||
|
@@ -24,29 +24,29 @@ jobs: | |
- name: install libbpf | ||
uses: sustainable-computing-io/[email protected] | ||
with: | ||
ebpfprovider: bcc | ||
ebpfprovider: libbpf | ||
# build kepler image | ||
- name: build and export Kepler image | ||
run: | | ||
make build_containerized | ||
make save-image | ||
env: | ||
IMAGE_REPO: "localhost:5001" | ||
IMAGE_TAG: "devel" | ||
IMAGE_NAME: "kepler" | ||
IMAGE_TAG: "devel" | ||
CTR_CMD: docker | ||
IMAGE_OUTPUT_PATH: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}} | ||
# save kepler image | ||
- name: save Kepler image as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: kepler | ||
name: keplerlibbpf | ||
path: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}} | ||
retention-days: 1 | ||
# ref https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts | ||
# as PR or Push event, we don't keep artifact in 90 days hence use 1 day here to save resources. | ||
|
||
integration_test: | ||
integration_test_with_libbpf: | ||
needs: [build-kepler] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -59,7 +59,7 @@ jobs: | |
- name: download Kepler image artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: kepler | ||
name: keplerlibbpf | ||
|
||
- name: build manifest | ||
run: make build-manifest OPTS="CI_DEPLOY" | ||
|
@@ -81,7 +81,7 @@ jobs: | |
- name: use Kepler action to deploy cluster | ||
uses: sustainable-computing-io/[email protected] | ||
with: | ||
ebpfprovider: bcc | ||
ebpfprovider: libbpf | ||
cluster_provider: ${{matrix.cluster_provider}} | ||
local_dev_cluster_version: v0.0.3 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
name: Integration test with libbpf | ||
name: Integration test with bcc | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
OUTPUT_DIR: "_output/" | ||
FILE_NAME: "kepler_libbpf.tar.gz" | ||
FILE_NAME: "kepler-bcc.tar.gz" | ||
ARTIFACT_DIR: "/tmp/artifacts" | ||
|
||
jobs: | ||
build-kepler_with_libbpf: | ||
build-kepler-with-bcc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout source code | ||
|
@@ -21,33 +21,33 @@ jobs: | |
with: | ||
go-version-file: go.mod | ||
# set up ebpf | ||
- name: install libbpf | ||
- name: install bcc | ||
uses: sustainable-computing-io/[email protected] | ||
with: | ||
ebpfprovider: libbpf | ||
ebpfprovider: bcc | ||
# build kepler image | ||
- name: build and export Kepler image | ||
run: | | ||
make build_containerized | ||
make save-image | ||
env: | ||
IMAGE_REPO: "localhost:5001" | ||
IMAGE_NAME: "kepler" | ||
IMAGE_TAG: "devel" | ||
IMAGE_NAME: "kepler" | ||
CTR_CMD: docker | ||
IMAGE_OUTPUT_PATH: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}} | ||
# save kepler image | ||
- name: save Kepler image as artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: keplerlibbpf | ||
name: kepler | ||
path: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}} | ||
retention-days: 1 | ||
# ref https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts | ||
# as PR or Push event, we don't keep artifact in 90 days hence use 1 day here to save resources. | ||
|
||
integration_test_with_libbpf: | ||
needs: [build-kepler_with_libbpf] | ||
integration_test: | ||
needs: [build-kepler-with-bcc] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -59,7 +59,7 @@ jobs: | |
- name: download Kepler image artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: keplerlibbpf | ||
name: kepler | ||
|
||
- name: build manifest | ||
run: make build-manifest OPTS="CI_DEPLOY" | ||
|
@@ -81,7 +81,7 @@ jobs: | |
- name: use Kepler action to deploy cluster | ||
uses: sustainable-computing-io/[email protected] | ||
with: | ||
ebpfprovider: libbpf | ||
ebpfprovider: bcc | ||
cluster_provider: ${{matrix.cluster_provider}} | ||
local_dev_cluster_version: v0.0.3 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,18 +27,27 @@ jobs: | |
env: | ||
GOPATH: /home/runner/go | ||
GOBIN: /home/runner/go/bin | ||
- name: install bcc | ||
- name: install libbpf | ||
uses: sustainable-computing-io/[email protected] | ||
with: | ||
ebpfprovider: bcc | ||
ebpfprovider: libbpf | ||
- name: Prepare environment | ||
run: | | ||
sudo apt-get install -y cpuid | ||
cd doc/ && sudo ./dev/prepare_dev_env.sh && cd - | ||
git config --global --add safe.directory /kepler | ||
- name: Run | ||
run: | | ||
make test-verbose | ||
sudo apt remove libbpf-dev | ||
mkdir temp-libbpf | ||
cd temp-libbpf | ||
git clone https://github.com/libbpf/libbpf | ||
cd libbpf/src | ||
sudo make install_headers | ||
sudo make install_uapi_headers | ||
sudo prefix=/usr BUILD_STATIC_ONLY=y make install | ||
cd ../../../ | ||
ATTACHER_TAG=libbpf make test-verbose | ||
go tool cover -func=coverage.out -o=coverage.out | ||
- name: Go Coverage Badge # Pass the `coverage.out` output to this action | ||
uses: tj-actions/coverage-badge-go@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters