Skip to content

Commit

Permalink
fix: [NODE-1502] Fixup bare metal tests (#2068)
Browse files Browse the repository at this point in the history
Co-authored-by: IDX GitHub Automation <IDX GitHub Automation>
  • Loading branch information
Bownairo authored and DFINITYManu committed Oct 16, 2024
1 parent bce907b commit c104b18
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 112 deletions.
86 changes: 43 additions & 43 deletions .github/workflows-source/schedule-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,51 +63,51 @@ anchors:
jobs:

# bazel-test-bare-metal:
# name: Bazel Test Bare Metal
# <<: *dind-large-setup
# timeout-minutes: 120
# runs-on:
# group: zh1
# labels: dind-large
# steps:
# - <<: *checkout
# - <<: *before-script
# - <<: *docker-login
# - name: Run Bazel Launch Bare Metal
# shell: bash
# run: |
# echo "$ZH2_DLL01_CSV_SECRETS" > file1
# echo "$ZH2_FILE_SHARE_KEY" > file2 && chmod 400 file2
bazel-test-bare-metal:
name: Bazel Test Bare Metal
<<: *dind-large-setup
timeout-minutes: 120
runs-on:
group: zh1
labels: dind-large
steps:
- <<: *checkout
- <<: *before-script
- <<: *docker-login
- name: Run Bazel Launch Bare Metal
shell: bash
run: |
echo "$ZH2_DLL01_CSV_SECRETS" > file1
echo "$ZH2_FILE_SHARE_KEY" > file2 && chmod 400 file2
# # Run bare metal installation test
# # shellcheck disable=SC2046,SC2086
# bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
# //ic-os/setupos/envs/dev:launch_bare_metal -- \
# --config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
# --csv_filename "$(realpath file1)" \
# --file_share_ssh_key "$(realpath file2)" \
# --inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
# --file_share_username ci_interim \
# --ci_mode
# Run bare metal installation test
# shellcheck disable=SC2046,SC2086
bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
//ic-os/setupos/envs/dev:launch_bare_metal -- \
--config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
--csv_filename "$(realpath file1)" \
--file_share_ssh_key "$(realpath file2)" \
--inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
--file_share_username ci_interim \
--ci_mode
# # Run bare metal node performance benchmarks
# # shellcheck disable=SC2046,SC2086
# bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
# //ic-os/setupos/envs/dev:launch_bare_metal -- \
# --config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
# --csv_filename "$(realpath file1)" \
# --file_share_ssh_key "$(realpath file2)" \
# --inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
# --file_share_username ci_interim \
# --ci_mode \
# --benchmark
# bazel clean
# env:
# BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/"
# BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
# ZH2_DLL01_CSV_SECRETS: "${{ secrets.ZH2_DLL01_CSV_SECRETS }}"
# ZH2_FILE_SHARE_KEY: "${{ secrets.ZH2_FILE_SHARE_KEY }}"
# Run bare metal node performance benchmarks
# shellcheck disable=SC2046,SC2086
bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
//ic-os/setupos/envs/dev:launch_bare_metal -- \
--config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
--csv_filename "$(realpath file1)" \
--file_share_ssh_key "$(realpath file2)" \
--inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
--file_share_username ci_interim \
--ci_mode \
--benchmark
bazel clean
env:
BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/"
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
ZH2_DLL01_CSV_SECRETS: "${{ secrets.ZH2_DLL01_CSV_SECRETS }}"
ZH2_FILE_SHARE_KEY: "${{ secrets.ZH2_FILE_SHARE_KEY }}"

fi-tests-nightly:
name: Bazel Test FI Nightly
Expand Down
99 changes: 56 additions & 43 deletions .github/workflows/schedule-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,64 @@ env:
CI_RUN_ID: ${{ github.run_id }}
BUILDEVENT_DATASET: "github-ci-dfinity"
jobs:
# bazel-test-bare-metal:
# name: Bazel Test Bare Metal
# <<: *dind-large-setup
# timeout-minutes: 120
# runs-on:
# group: zh1
# labels: dind-large
# steps:
# - <<: *checkout
# - <<: *before-script
# - <<: *docker-login
# - name: Run Bazel Launch Bare Metal
# shell: bash
# run: |
# echo "$ZH2_DLL01_CSV_SECRETS" > file1
# echo "$ZH2_FILE_SHARE_KEY" > file2 && chmod 400 file2
bazel-test-bare-metal:
name: Bazel Test Bare Metal
container:
image: ghcr.io/dfinity/ic-build@sha256:2c6fc0aa92ada647e42790cbdac3199b27a1407d9e90ff6e5a97a69acac24041
options: >-
-e NODE_NAME --privileged --cgroupns host -v /cache:/cache -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp
timeout-minutes: 120
runs-on:
group: zh1
labels: dind-large
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Before script
id: before-script
shell: bash
run: |
[ -n "${NODE_NAME:-}" ] && echo "Node: $NODE_NAME"
- name: Login to Dockerhub
shell: bash
run: ./ci/scripts/docker-login.sh
env:
DOCKER_HUB_USER: ${{ vars.DOCKER_HUB_USER }}
DOCKER_HUB_PASSWORD_RO: ${{ secrets.DOCKER_HUB_PASSWORD_RO }}
- name: Run Bazel Launch Bare Metal
shell: bash
run: |
echo "$ZH2_DLL01_CSV_SECRETS" > file1
echo "$ZH2_FILE_SHARE_KEY" > file2 && chmod 400 file2
# # Run bare metal installation test
# # shellcheck disable=SC2046,SC2086
# bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
# //ic-os/setupos/envs/dev:launch_bare_metal -- \
# --config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
# --csv_filename "$(realpath file1)" \
# --file_share_ssh_key "$(realpath file2)" \
# --inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
# --file_share_username ci_interim \
# --ci_mode
# Run bare metal installation test
# shellcheck disable=SC2046,SC2086
bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
//ic-os/setupos/envs/dev:launch_bare_metal -- \
--config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
--csv_filename "$(realpath file1)" \
--file_share_ssh_key "$(realpath file2)" \
--inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
--file_share_username ci_interim \
--ci_mode
# # Run bare metal node performance benchmarks
# # shellcheck disable=SC2046,SC2086
# bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
# //ic-os/setupos/envs/dev:launch_bare_metal -- \
# --config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
# --csv_filename "$(realpath file1)" \
# --file_share_ssh_key "$(realpath file2)" \
# --inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
# --file_share_username ci_interim \
# --ci_mode \
# --benchmark
# bazel clean
# env:
# BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/"
# BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
# ZH2_DLL01_CSV_SECRETS: "${{ secrets.ZH2_DLL01_CSV_SECRETS }}"
# ZH2_FILE_SHARE_KEY: "${{ secrets.ZH2_FILE_SHARE_KEY }}"
# Run bare metal node performance benchmarks
# shellcheck disable=SC2046,SC2086
bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \
//ic-os/setupos/envs/dev:launch_bare_metal -- \
--config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \
--csv_filename "$(realpath file1)" \
--file_share_ssh_key "$(realpath file2)" \
--inject_image_pub_key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3gjE/2K5nxIBbk3ohgs8J5LW+XiObwA+kGtSaF5+4c" \
--file_share_username ci_interim \
--ci_mode \
--benchmark
bazel clean
env:
BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/"
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
ZH2_DLL01_CSV_SECRETS: "${{ secrets.ZH2_DLL01_CSV_SECRETS }}"
ZH2_FILE_SHARE_KEY: "${{ secrets.ZH2_FILE_SHARE_KEY }}"
fi-tests-nightly:
name: Bazel Test FI Nightly
runs-on:
Expand Down
8 changes: 8 additions & 0 deletions ic-os/dev-tools/bare_metal_deployment/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
load("@rules_python//python:pip.bzl", "whl_filegroup")

package(default_visibility = ["//rs:ic-os-pkg"])

exports_files([
"deploy.py",
"benchmark_runner.sh",
"benchmark_driver.sh",
])

whl_filegroup(
name = "redfish_scripts",
pattern = ".*/scripts/.*",
whl = "@python_deps//idracredfishsupport:whl",
)
4 changes: 2 additions & 2 deletions ic-os/dev-tools/bare_metal_deployment/tools.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def launch_bare_metal(name, image_zst_file):
"--upload_img",
"$(location " + image_zst_file + ")",
"--idrac_script",
"$(location @python_deps_idracredfishsupport//:IdracRedfishSupport-0.0.8.data/scripts/VirtualDiskExpansionREDFISH.py)",
"$(location //ic-os/dev-tools/bare_metal_deployment:redfish_scripts)" + "/IdracRedfishSupport-0.0.8.data/scripts/VirtualDiskExpansionREDFISH.py",
"--benchmark_driver_script",
"$(location //ic-os/dev-tools/bare_metal_deployment:benchmark_driver.sh)",
"--benchmark_runner_script",
Expand All @@ -48,7 +48,7 @@ def launch_bare_metal(name, image_zst_file):
":" + binary_name,
image_zst_file,
"//rs/ic_os/dev_test_tools/setupos-inject-configuration",
"@python_deps_idracredfishsupport//:IdracRedfishSupport-0.0.8.data/scripts/VirtualDiskExpansionREDFISH.py",
"//ic-os/dev-tools/bare_metal_deployment:redfish_scripts",
"//ic-os/dev-tools/bare_metal_deployment:benchmark_runner.sh",
"//ic-os/dev-tools/bare_metal_deployment:benchmark_driver.sh",
"//ic-os/dev-tools/hw_validation:stress.sh",
Expand Down
11 changes: 5 additions & 6 deletions ic-os/setupos/envs/dev/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load("//ic-os:defs.bzl", "icos_build")

#load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/setupos:defs.bzl", "image_deps")

# The macro contains several targets.
Expand All @@ -20,7 +19,7 @@ icos_build(
vuln_scan = False,
)

# launch_bare_metal(
# name = "launch_bare_metal",
# image_zst_file = ":disk-img.tar.zst",
# )
launch_bare_metal(
name = "launch_bare_metal",
image_zst_file = ":disk-img.tar.zst",
)
11 changes: 5 additions & 6 deletions ic-os/setupos/envs/local-base-dev/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load("//ic-os:defs.bzl", "icos_build")

#load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/setupos:defs.bzl", "image_deps")

# The macro contains several targets.
Expand All @@ -19,7 +18,7 @@ icos_build(
vuln_scan = False,
)

# launch_bare_metal(
# name = "launch_bare_metal",
# image_zst_file = ":disk-img.tar.zst",
# )
launch_bare_metal(
name = "launch_bare_metal",
image_zst_file = ":disk-img.tar.zst",
)
11 changes: 5 additions & 6 deletions ic-os/setupos/envs/local-base-prod/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load("//ic-os:defs.bzl", "icos_build")

#load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/setupos:defs.bzl", "image_deps")

# The macro contains several targets.
Expand All @@ -17,7 +16,7 @@ icos_build(
vuln_scan = False,
)

# launch_bare_metal(
# name = "launch_bare_metal",
# image_zst_file = ":disk-img.tar.zst",
# )
launch_bare_metal(
name = "launch_bare_metal",
image_zst_file = ":disk-img.tar.zst",
)
11 changes: 5 additions & 6 deletions ic-os/setupos/envs/prod/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load("//ic-os:defs.bzl", "icos_build")

#load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/dev-tools/bare_metal_deployment:tools.bzl", "launch_bare_metal")
load("//ic-os/setupos:defs.bzl", "image_deps")

# The macro contains several targets.
Expand All @@ -15,7 +14,7 @@ icos_build(
vuln_scan = False,
)

# launch_bare_metal(
# name = "launch_bare_metal",
# image_zst_file = ":disk-img.tar.zst",
# )
launch_bare_metal(
name = "launch_bare_metal",
image_zst_file = ":disk-img.tar.zst",
)

0 comments on commit c104b18

Please sign in to comment.