-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Support for using Ansible playbooks for installing model components #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sdelliot
wants to merge
26
commits into
sandialabs:main
Choose a base branch
from
sdelliot:ansible-playbooks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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 removes the `--no-clone` option in favor of requiring that repositories already be installed. Instead, a user will specify only whether or not to install in development mode, where in development mode repositories are installed as editable from the `MC_DIR` and otherwise they are installed directly using extras in the `pyproject.toml`
…le playbooks to install FIREWHEEL model components.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Primary Benefits
There are several primary motivators for this change:
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.Key Changes
ansible
where there is a subkeycache_type="online"
. That is, by default assume that the system is online and will not pull from any kind of cached system. This top-level option will enable users to add other values (URLs, API Keys, etc.) for getting the various cached files.model_component_install.py
to check and see if theINSTALL
script is a valid Ansible playbook. If it is, then we will use ansible-runner to execute the script. Otherwise, the existing behavior is maintained.Pending Tasks