Skip to content

Conversation

@dgchinner
Copy link

@dgchinner dgchinner commented Jan 21, 2026

Define the directory heirarchy for cloud specific tools, scripts resources and tests and encode them into variables for common usage.

The structure we want to use for static files follows this template:

/opt/hpc/<cloud-vendor>/bin/		# one-off binaries and scripts
/opt/hpc/<cloud-vendor>/lib/...	# resources and libraries
/opt/hpc/<cloud-vendor>/tools/...	# standalone tools
/opt/hpc/<cloud-vendor>/tests/		# test scripts for local/CI testing

For runtime files (e.g. configuration files set up by boot services), we will store them in:

/var/hpc/<cloud-vendor>/....

These common directories will be defined by the following set of variables:

__hpc_<cloud>_resource_dir		# /opt/hpc/<cloud-vendor>/
__hpc_<cloud>_tools_dir			# /opt/hpc/<cloud-vendor>/tools/
__hpc_<cloud>_tests_dir			# /opt/hpc/<cloud-vendor>/tests/
__hpc_<cloud>_runtime_dir		# /var/hpc/<cloud-vendor>/

Summary by Sourcery

Add shared variables for Azure-specific HPC resource, tools, tests, and runtime directories under /opt/hpc/azure and /var/hpc/azure for consistent usage across the project.

Enhancements:

  • Introduce variables defining standard locations for Azure HPC scripts, tools, tests, and resources.
  • Define a dedicated runtime directory variable for Azure HPC configuration and state files.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 21, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Defines standard Azure-specific HPC resource, tools, tests, and runtime directory variables under /opt/hpc/azure and /var/hpc/azure for consistent reuse in Ansible roles and playbooks.

File-Level Changes

Change Details Files
Introduce Azure-specific HPC directory variables for static resources, tools, tests, and runtime files.
  • Add __hpc_azure_resource_dir based on the common install prefix for Azure-specific content under /opt/hpc/azure
  • Add __hpc_azure_tools_dir and __hpc_azure_tests_dir as subdirectories of the Azure resource root for tools and tests
  • Add __hpc_azure_runtime_dir pointing to /var/hpc/azure for runtime-selected Azure resources
vars/main.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Collaborator

@spetrosi spetrosi left a comment

Choose a reason for hiding this comment

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

What's the point of defining these variables without using them in the role? Do you plan to use them later? I am worried about some of them remaining unused.

vars/main.yml Outdated
__hpc_azure_tests_dir: "{{ __hpc_azure_resource_dir }}/tests"

# location for runtime selected azure resources
__hpc_azure_runtime_dir: "/var/hpc/azure"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
__hpc_azure_runtime_dir: "/var/hpc/azure"
__hpc_azure_runtime_dir: /var/hpc/azure

Copy link
Author

Choose a reason for hiding this comment

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

I split them out of the sku customisation feature that uses them all, so Gaurav doesn't have to wait for me to finish the sku customisation feature to be able to update the monitoring tool installation to use these locations. See dgchinner@0620b94 for the WIP changes.

Define the directory hierarchy for cloud specific tools, scripts
resources and tests and encode them into variables for common usage.

The structure we want to use for static files follows this template:

/opt/hpc/<cloud-vendor>/bin/		# one-off binaries and scripts
/opt/hpc/<cloud-vendor>/lib/...		# resources and libraries
/opt/hpc/<cloud-vendor>/tools/...	# standalone tools
/opt/hpc/<cloud-vendor>/tests/		# test scripts for local/CI testing

For runtime files (e.g. configuration files set up by boot
services), we will store them in:

/var/hpc/<cloud-vendor>/....

These common directories will be defined by the following set of
variables:

__hpc_<cloud>_resource_dir		# /opt/hpc/<cloud-vendor>/
__hpc_<cloud>_tools_dir			# /opt/hpc/<cloud-vendor>/tools/
__hpc_<cloud>_tests_dir			# /opt/hpc/<cloud-vendor>/tests/
__hpc_<cloud>_runtime_dir		# /var/hpc/<cloud-vendor>/

At the moment we only support Azure, so only those variables are
defined.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
@dgchinner dgchinner force-pushed the azure-dirs branch 4 times, most recently from 96eb110 to 54a6c88 Compare January 21, 2026 23:06
@dgchinner
Copy link
Author

Sorry, screwed up a test branch push and it landed here, I've reverted the azure-dirs branch back to 54a6c88 where it should be for this PR.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
This was referenced Jan 22, 2026
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