Skip to content

Conversation

pleoxconfusa
Copy link
Contributor

Current State

Currently, some Model Components may require additional data to be downloaded (e.g., VM resources, etc.) that cannot or should not be stored within the MC repo package. In this case, the Model Components can have an INSTALL file, which can be any executable script (as denoted by a shebang line). See: Model Component INSTALL file.

This PR enables using Ansible playbooks in lieu of using a bash-based script in line with the ansible update to firewheel (see here).


Primary Benefits

There are several primary motivators for this change:

  • Idempotence - By design, it is significantly easier to design Ansible playbooks that can be run multiple times without changing the final state. Specifically, this is necessary when installation fails and needs to be re-run. While other scripts can have this property, Ansible makes it significantly easier to do so.
  • Readability - INSTALL files that are written with Shell scripts are significantly harder to read/understand than Ansible-based YAML. This not only impacts maintainability, but also the security as reviewing shell code for issues is more difficult.
  • Pulling Cached Files - Downloading files and creating VM Resources or images each time FIREWHEEL is installed is time consuming and, in the case of offline installations, impractical. The common solution for this is to perform this action once and cache the resulting files. By using Ansible, FIREWHEEL can provide a few common ways to retrieve these cached files. When combined with the Idempotence of Ansible scripts, this will further reduce installation errors and speed new installs.

Key Changes

A new Ansible install playbook directory for this model component in place of the previous install bash script.

- Removed redundant checks for installation status and required files, as these are handled by Firewheel.
- Retained core functionality for creating directories, downloading files, generating SSH keys, and compressing profiles.
- Simplified logic to streamline the playbook and avoid unnecessary complexity.
- Ignored validation for tmux-cssh, as it is not explicitly checked in the original Bash script.
- Ensured alignment with the original Bash script while meeting pull request requirements.
…cts based on MANIFEST constraints

- Updated required_files lists for Ubuntu Jammy, Ubuntu Trusty, and Linux Base Objects based on MANIFEST specifications and vm_resources directory contents.
- Ensured alignment with MANIFEST constraints (e.g., *.py, *.sh, *.tgz, vm_resources/*).
- Removed redundant checks for installation status and required files, as these are handled by Firewheel.
- Retained core functionality for creating directories, downloading files, compressing tarballs, and cleaning up.
- Simplified logic to streamline the playbooks and avoid unnecessary complexity.
@sdelliot sdelliot merged commit b0efada into sandialabs:main Sep 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants