Skip to content

feat: New features for bare-metal deployment#10545

Open
frankdavid wants to merge 3 commits into
masterfrom
frankdavid/bare-metal-improvements
Open

feat: New features for bare-metal deployment#10545
frankdavid wants to merge 3 commits into
masterfrom
frankdavid/bare-metal-improvements

Conversation

@frankdavid

Copy link
Copy Markdown
Contributor
  • Support deploying a GuestOS upgrade image to the selected target boot alternative. Optionally enable wiping the corresponding var partition. Previously, only full GuestOS disk images could be deployed thereby overwriting all (including the data) partition.
  • Support deploying a released HostOS/GuestOS version by specifying the 40-char git hash.
  • Some fixes, e.g. don't mount over the entire /opt/ic/bin library (this led to some issues previously), only the necessary binaries/scripts.

- Support deploying a GuestOS *upgrade image* to the selected target boot alternative. Optionally enable wiping the corresponding var partition. Previously, only full GuestOS disk images could be deployed thereby overwriting all (including the data) partition.
- Support deploying a released HostOS/GuestOS version by specifying the 40-char git hash.
- Some fixes, e.g. don't mount over the entire /opt/ic/bin library (this led to some issues previously), only the necessary binaries/scripts.
@zeropath-ai

zeropath-ai Bot commented Jun 23, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 307eac5.

Security Overview
Detected Code Changes
Change Type Relevant files
Configuration changes ► Cargo.lock
    Add grub dependency
► ic-os/testing/BUILD.bazel
    Add setupos scripts to all_component_files
► ic-os/testing/reload_icos.sh
    Add GuestOS upgrade deployment options
    Add GuestOS recovery stage directory
    Add staging GuestOS upgrade artifacts
    Add mount for GuestOS recovery stage directory
    Update usage instructions
    Use more descriptive variable names
► rs/ic_os/dev_test_tools/bare_metal_deployment/BUILD.bazel
    Add grub dependency to bare_metal_deployment and bare_metal_deployment_test
► rs/ic_os/dev_test_tools/bare_metal_deployment/Cargo.toml
    Add grub dependency
► rs/ic_os/dev_test_tools/bare_metal_deployment/src/deploy.rs
    Add GuestOS deployment configuration struct
    Add GuestOS deployment mode enum
    Add support for GuestOS upgrade images
    Add support for multiple GuestOS deployment options
    Add logic to prepare image source for reload_icos
    Update to use GuestOS deployment configuration
► rs/ic_os/dev_test_tools/bare_metal_deployment/src/main.rs
    Add GuestOS mode and target boot alternative arguments
    Add GuestOS wipe var partition argument
    Add logic to get GuestOS deployment configuration
    Update deployment config to use GuestOS config
► rs/tests/driver/src/driver/bootstrap.rs
    Update GuestOS image source to use GuestOsDeploymentConfig::full
Enhancement ► ic-os/testing/BUILD.bazel
    Add setupos scripts to all_component_files
► ic-os/testing/reload_icos.sh
    Add GuestOS upgrade deployment options
    Add GuestOS recovery stage directory
    Add staging GuestOS upgrade artifacts
    Add mount for GuestOS recovery stage directory
    Update usage instructions
    Use more descriptive variable names
► rs/ic_os/dev_test_tools/bare_metal_deployment/BUILD.bazel
    Add grub dependency to bare_metal_deployment and bare_metal_deployment_test
► rs/ic_os/dev_test_tools/bare_metal_deployment/Cargo.toml
    Add grub dependency
► rs/ic_os/dev_test_tools/bare_metal_deployment/src/deploy.rs
    Add GuestOS deployment configuration struct
    Add GuestOS deployment mode enum
    Add support for GuestOS upgrade images
    Add support for multiple GuestOS deployment options
    Add logic to prepare image source for reload_icos
    Update to use GuestOS deployment configuration
► rs/ic_os/dev_test_tools/bare_metal_deployment/src/main.rs
    Add GuestOS mode and target boot alternative arguments
    Add GuestOS wipe var partition argument
    Add logic to get GuestOS deployment configuration
    Update deployment config to use GuestOS config
► rs/tests/driver/src/driver/bootstrap.rs
    Update GuestOS image source to use GuestOsDeploymentConfig::full

@basvandijk basvandijk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rs/tests/driver/src/driver/bootstrap.rs LGTM

@github-actions github-actions Bot added the @node label Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the bare-metal deployment tooling to support more flexible HostOS/GuestOS rollout scenarios, including deploying GuestOS upgrade images to a specific A/B boot alternative and downloading released images by git revision.

Changes:

  • Introduce a richer GuestOS deployment configuration supporting “full” vs “upgrade” modes (with target boot alternative + optional var wipe).
  • Extend the bare_metal_deployment CLI to accept environment specs or 40-char git hashes (download from download.dfinity.systems) where supported.
  • Update reload_icos.sh staging/mounting to avoid bind-mounting the entire /opt/ic/bin and add GuestOS upgrade-image flow.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rs/tests/driver/src/driver/bootstrap.rs Adapts bare-metal test bootstrap to the new GuestOS deployment config API.
rs/ic_os/dev_test_tools/bare_metal_deployment/src/main.rs Adds CLI flags and image resolution logic for GuestOS mode + released-image-by-hash support.
rs/ic_os/dev_test_tools/bare_metal_deployment/src/deploy.rs Adds GuestOsDeploymentConfig / mode handling and wires new reload_icos flags.
rs/ic_os/dev_test_tools/bare_metal_deployment/Cargo.toml Adds grub dependency for BootAlternative.
rs/ic_os/dev_test_tools/bare_metal_deployment/BUILD.bazel Adds grub dep and introduces rust_test targets for the tool crates.
ic-os/testing/reload_icos.sh Implements GuestOS upgrade-image deployment and stages only required /opt/ic/bin files.
ic-os/testing/BUILD.bazel Updates the packaged component set for reload_icos_cmd and documents the sync requirement.
Cargo.lock Records the added grub dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rs/ic_os/dev_test_tools/bare_metal_deployment/src/main.rs Outdated
Comment thread rs/ic_os/dev_test_tools/bare_metal_deployment/src/main.rs
Comment thread ic-os/testing/BUILD.bazel
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants