Skip to content

Move cookiecutter Tofu to new site environment #751

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

Merged
merged 7 commits into from
Aug 7, 2025
Merged

Move cookiecutter Tofu to new site environment #751

merged 7 commits into from
Aug 7, 2025

Conversation

wtripp180901
Copy link
Contributor

@wtripp180901 wtripp180901 commented Aug 6, 2025

  • Added new site environment to serve as a base environment for all new cookiecutter environments by default.
  • Tofu configuration previously in cookiecutter has been moved to site to receive upgrades from the upstream Tofu.
  • Moved ./environments/skeleton to ./cookiecutter.
  • Removed environments/common/layouts, the everything templates is now the groups file of the site environment.
  • Cookiecutter-defined environments now have site as a "parent" in their ansible.cfg by default. Their Tofu configuration is a module pointing at the site Tofu and they no longer define a groups file (deferred to site).
  • .stackhpc environment now based on the site environment.

Note: topology aware scheduling is also now off by default, guidance on re-enabling has been added to the production docs

Warning

Will cause merge conflicts with existing site environments. To resolve:

  • For divergent default values for variables in environments/site/tofu/variables.tf, changes should generally be rejected
  • All other Tofu changes in environments/site/tofu should generally be accepted (unless site specific resources have previously been defined)
  • The contents of environments/site/inventory/group_vars/all should be your existing yaml files
  • Changes to the :children of existing groups in environments/site/inventory/groups should generally be rejected. New groups which have been added should generally be accepted, unless the feature the group enables is not desired

@wtripp180901 wtripp180901 requested a review from a team as a code owner August 6, 2025 12:14
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

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

Few comments, looks structurally sound though!

wtripp180901 and others added 2 commits August 7, 2025 08:13
@wtripp180901 wtripp180901 requested a review from sjpb August 7, 2025 08:45
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

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

Typo, query, no need to rerun CI.

Co-authored-by: Steve Brasier <[email protected]>
@wtripp180901
Copy link
Contributor Author

looks like it has here https://github.com/stackhpc/ansible-slurm-appliance/blob/feat/site-tofu/cookiecutter/%7B%7Bcookiecutter.environment%7D%7D/ansible.cfg, probably some github diff weirdness

@sjpb sjpb self-requested a review August 7, 2025 10:10
Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

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

From merge test:

  • topology: lets remove from site/groups, and add a note in production to say consider turning this on if cluster is VMs AND its either in one AZ or AZ is configured by rack, and point to docs.

Other than that looks fine

Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

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

LGTM

@sjpb sjpb merged commit 2b562a8 into main Aug 7, 2025
0 of 2 checks passed
@sjpb sjpb deleted the feat/site-tofu branch August 7, 2025 11:09
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