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

feat: add complete example of infrastructure with aws #87

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

Henrrypg
Copy link
Contributor

@Henrrypg Henrrypg commented Oct 17, 2024

Add Terraform Configuration for Basic AWS EKS Cluster

This PR introduces a set of Terraform files that provide a basic example or starting point for deploying a Kubernetes cluster on AWS using Elastic Kubernetes Service (EKS). The configuration includes:

  • VPC setup: A Virtual Private Cloud (VPC) with customizable CIDR, public and private subnets, and NAT Gateway configurations.
  • EKS cluster: A basic EKS cluster with customizable Kubernetes version, instance types, and auto-scaling options.
  • Node groups: Configurable EC2 node groups with support for multiple instance types, disk size, and capacity (on-demand or spot).
  • Security and Networking: SSH access configuration and security group setup for the EKS cluster and node groups.
  • Cluster Autoscaler support: Optional enablement of cluster autoscaler.

Key Files and Features:

  • eks.tf: Core infrastructure setup for the EKS cluster.
  • vpc.tf: Core infrastructure setup for the VPC.
  • variables.tf: Parameters that allow customization of the cluster, such as instance types, cluster size, and networking options.
  • outputs.tf: Exposes key outputs like cluster name and endpoint.
  • provider.tf: Configures the AWS provider and region.

How to use:

  1. Customize the variables.tf or use a values.auto.tfvars.json file to adjust parameters like AWS region, instance types, and node group settings.
  2. Run terraform apply to deploy the infrastructure.

NOTE: Follow the readme to further information.

This setup serves as a base or example for future enhancements and can be expanded with additional features or modules as needed.

@openedx-webhooks
Copy link

openedx-webhooks commented Oct 17, 2024

Thanks for the pull request, @Henrrypg!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/openedx-k8s-harmony-maintainers. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 17, 2024
@Henrrypg Henrrypg marked this pull request as ready for review October 21, 2024 13:47
@Henrrypg
Copy link
Contributor Author

Hi, @MoisesGSalas @jfavellar90

Can you look at this?

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 21, 2024
infra-examples/aws/eks/eks.tf Outdated Show resolved Hide resolved
infra-examples/aws/eks/eks.tf Outdated Show resolved Hide resolved
infra-examples/aws/eks/versions_override.tf Outdated Show resolved Hide resolved
infra-examples/aws/eks/eks.tf Show resolved Hide resolved
@bradenmacdonald
Copy link
Contributor

@gabor-boros could you also take a look at this?

@gabor-boros
Copy link
Contributor

@bradenmacdonald Absolutely!

@gabor-boros gabor-boros self-requested a review October 29, 2024 17:35
@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Nov 20, 2024
Copy link
Contributor

@gabor-boros gabor-boros left a comment

Choose a reason for hiding this comment

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

This review is a bit delayed, sorry about that. I was thinking about this for a while now.

Overall, I think this PR is good as is -- after bumping the modules and providers to their latest version if applicable --, so I'm approving the changes here.

Besides that, this PR and the conversations we had in the working group during the meetings made me think if the file/directory structure is pointing towards the direction we want, i.e., having modules that can be used by community members in their Terraform scripts.

I would not like to block this PR from being merged on something that changed in the meantime, however, could you please open a GitHub issue as a "follow-up" to refactor the changes introduced here? I'll come up/propose a structure that in my opinion could be good, though that will be still up to the working group if we agree on that or not.

@gabor-boros gabor-boros merged commit 26e9310 into openedx:main Dec 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants