Skip to content
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

fix: Refactoring terraform #720

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

namejsjeongkr
Copy link

@namejsjeongkr namejsjeongkr commented Jan 5, 2025

What does this PR do?

🛑 Please open an issue first to discuss any significant work and flesh out details/direction. When we triage the issues, we will add labels to the issue like "Enhancement", "Bug" which should indicate to you that this issue can be worked on and we are looking forward to your PR. We would hate for your time to be wasted.
Consult the CONTRIBUTING guide for submitting pull-requests.

Motivation

  • I'd like to suggest a consistent refactoring of terraform. In my opinion, the code currently written is inconsistent. (If you look at terraform codes of multiple services in the ai-ml folder, the code isn't written consistently for each service. local, provider and so on.)
  • The committed code is the sample I'd like to suggest. If you give me additional comments, I'd to revise the rest of the codes as well.

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Mandatory for new blueprints. Yes, I have added a example to support my blueprint PR
  • Mandatory for new blueprints. Yes, I have updated the website/docs or website/blog section for this feature
  • Yes, I ran pre-commit run -a with this PR. Link for installing pre-commit locally

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

@namejsjeongkr namejsjeongkr changed the title Refactoring terraform fix: Refactoring terraform Jan 5, 2025
@namejsjeongkr
Copy link
Author

@ratnopamc @nabuskey Do you mind if I ask you to review this one ?

@ratnopamc
Copy link
Collaborator

Thanks @namejsjeongkr for your PR. We just recently discussed on this and have an issue open to streamline some of our ML blueprints. I think it would make sense to utilize your work towards achieving that goal.
@vara-bonthu @askulkarni2 thoughts?

@namejsjeongkr
Copy link
Author

@ratnopamc Thank you for your reply. I refactored other tf codes after your positive comment. If there is anything you would like to discuss, please let me know.

@namejsjeongkr
Copy link
Author

@ratnopamc Is there any update ? I'm still looking forward your reply.

@omrishiv
Copy link
Collaborator

omrishiv commented Feb 7, 2025

Apologies for missing this PR, the approach we've been taking is:

data-on-eks/
├─ ai-ml/
│  ├─ ai-infra/
│  │  ├─ fsx-for-lustre/
│  │  │  ├─ yaml1.yaml
│  │  │  ├─ yaml2.yaml
│  │  │  ├─ yaml3.yaml
│  │  ├─ helm-values/
│  │  │  ├─ yaml1.yaml
│  │  │  ├─ yaml2.yaml
│  │  │  ├─ yaml3.yaml
│  │  ├─ monitoring/
│  │  │  ├─ yaml1.yaml
│  │  │  ├─ yaml2.yaml
│  │  │  ├─ yaml3.yaml
│  │  ├─ addons.tf
│  │  ├─ cleanup.sh
│  │  ├─ eks.tf
│  │  ├─ fsx-for-lustre.tf
│  │  ├─ install.sh
│  │  ├─ main.tf
│  │  ├─ outputs.tf
│  │  ├─ README.md
│  │  ├─ variables.tf
│  │  ├─ versions.tf
│  │  ├─ vpc.tf

Consolidating everything into one infrastructure terraform that can be deployed across blueprints. Each blueprint has its own variables for turning on certain modules and setting certain variables. That way updates only have to happen in one place.

@namejsjeongkr
Copy link
Author

@omrishiv Are you saying that you're going to manage it anew with the ai-infra folder ? (I can't find ai-infra right now.)

@omrishiv
Copy link
Collaborator

omrishiv commented Feb 8, 2025

@namejsjeongkr the folder is a common collection of resources from all the other blueprints. This feature is not quite available yet, but will get pushed to a testing branch soon.

@namejsjeongkr
Copy link
Author

namejsjeongkr commented Feb 9, 2025

@omrishiv Do I have to close this one ? I think it's valid until the blueprint being tested is reflected.

@omrishiv
Copy link
Collaborator

@namejsjeongkr Please don't close, I'm going to push the other blueprint for testing this week and we can discuss the preferred approach

@namejsjeongkr
Copy link
Author

@omrishiv Ok. Please let me know !

@omrishiv
Copy link
Collaborator

@namejsjeongkr please see #751 and see if it aligns with your thinking. Looking forward to your feedback.

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.

3 participants