-
Notifications
You must be signed in to change notification settings - Fork 13
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: implement aws terraform modules and infrastructure example #143
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Gabor Boros <[email protected]>
Thanks for the pull request, @gabor-boros! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf 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 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
registry_credentials = var.docker_registry_credentials | ||
|
||
worker_node_ssh_key_name = var.worker_node_ssh_key_name | ||
worker_node_instance_types = ["m6i.large"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be configurable or is this a pretty good node size for most setups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just an example, the module is configurable. But it is a good node size too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. That kind of answers my question about the s3 bucket too. Maybe rename this to main.example.tf
then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the whole code is within "infra-examples" I feel that would be repetitive. However, we could drop a readme in the directory to explain the purpose and clarify the expectations about that piece of code.
| <a name="input_database_storage_ipos"></a> [database\_storage\_ipos](#input\_database\_storage\_ipos) | The disk IOPS to have for the database instance | `number` | `null` | no | | ||
| <a name="input_database_storage_size"></a> [database\_storage\_size](#input\_database\_storage\_size) | The storage assigned to the database instance | `number` | `null` | no | | ||
| <a name="input_database_storage_type"></a> [database\_storage\_type](#input\_database\_storage\_type) | The storage type to use for the database instance | `string` | `null` | no | | ||
| <a name="input_database_users"></a> [database\_users](#input\_database\_users) | Map of overrides for the user and database names. | <pre>map(object({<br/> username = string<br/> database = string<br/> forum_database = string<br/> }))</pre> | `{}` | no | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would these database_users
typically be left empty {}
as in the default shown? What's the use case for specifying some?
I'm hoping this is only for admin/analytics style access to the whole cluster, and generally per-instance databases are created by Tutor [plugins].
Does MongoDB not have an equivalent of rds_root_username
?
Also, we won't be using MongoDB for the forum in Sumac / Tutor 19 / master, so will anything break if forum_database
is ""
?
@@ -0,0 +1,65 @@ | |||
## Requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these files auto-generated somehow or are you manually creating them and keeping them in sync with variables.tf
etc.?
|
||
module "bucket" { | ||
source = "../../terraform/modules/aws/s3" | ||
|
||
environment = var.environment | ||
bucket_prefix = "my-institute" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if I understand correctly, this creates an S3 bucket called my-institute
? Is there a use case for that? Why do we even have the s3
module at all?
|
||
variable "kubernetes_cluster_name" { | ||
type = string | ||
description = "Name of the DigitalOcean Kubernetes cluster to create." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "Name of the DigitalOcean Kubernetes cluster to create." | |
description = "Name of the Kubernetes cluster to create." |
public_subnet_tags = { | ||
"Tier" = "Public" | ||
"kubernetes.io/cluster/${local.cluster_name}" = "shared" | ||
"kubernetes.io/role/elb" = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this only works if you are also using aws-load-balancer-controller
or am I missing an additional step?. I tried using only the ingress-nginx controller and the controller service stays "pending" with the message:
Warning SyncLoadBalancerFailed 5m22s (x19 over 70m) service-controller Error syncing load balancer: failed to ensure load balancer: could not find any suitable subnets for creating the ELB
This PR implements terraform modules for AWS that allows anyone to create a production-grade infrastructure for hosting Open edX instances using Tutor and Harmony.
The PR includes a reference implementation as a usage example.