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

contrib: add terraform setup for dgraph ha deployment on AWS #4400

Merged
merged 5 commits into from Jan 10, 2020

Conversation

@fristonio
Copy link
Member

fristonio commented Dec 11, 2019

  • Add terraform modules to deploy dgraph on AWS managed infrastructure
    in EC2 machines.

This change is Reviewable

@fristonio fristonio requested a review from danielmai as a code owner Dec 11, 2019
* Add terraform modules to deploy dgraph on AWS managed infrastructure
  in EC2 machines.

Signed-off-by: fristonio <deepshpathak@gmail.com>
@fristonio fristonio force-pushed the fristonio/terraform-aws-ha branch from 718f8af to ac4deb6 Dec 11, 2019
Signed-off-by: fristonio <deepshpathak@gmail.com>
@fristonio fristonio changed the title [WIP] contrib: add terraform setup for dgraph ha deployment on AWS contrib: add terraform setup for dgraph ha deployment on AWS Dec 12, 2019
@fristonio fristonio requested review from martinmr and hackintoshrao Dec 12, 2019
Copy link
Member

danielmai left a comment

Reviewable status: 0 of 47 files reviewed, 5 unresolved discussions (waiting on @danielmai, @fristonio, @hackintoshrao, and @martinmr)


contrib/config/terraform/aws/ha/terraform.tfvars.example, line 5 at r1 (raw file):

dgraph-test

I think this should be a string. Otherwise, I get an error message when I leave this alone.

$ terraform plan

Error: Variables not allowed

  on terraform.tfvars line 5:
   5: deployment_name = dgraph-test

Variables may not be used here.


Error: No value for required variable

  on variables.tf line 22:
  22: variable "deployment_name" {

The root module input variable "deployment_name" is not set, and has no
default value. Use a -var or -var-file command line argument to provide a
value for this variable.


contrib/config/terraform/aws/ha/variables.tf, line 48 at r1 (raw file):

"t3a.small"

Default values should work as-is, even if it's with minimal specs. In us-east-2 (the default region in this file) I got this error:

Error: Error launching source instance: Unsupported: Your requested instance type (t3a.small) is not supported in your requested Availability Zone (us-east-2a). Please retry your request by not specifying an Availability Zone or choosing us-east-2b, us-east-2c.
	status code: 400, request id: 8802eef5-29fa-4a23-9318-9ccffa7bc1a7

  on aws/instance/main.tf line 13, in resource "aws_instance" "dgraph":

contrib/config/terraform/aws/ha/aws/vpc/main.tf, line 6 at r1 (raw file):

isntances

instances


contrib/config/terraform/aws/ha/aws/vpc/main.tf, line 158 at r1 (raw file):

exteranl

external


contrib/config/terraform/aws/ha/aws/vpc/outputs.tf, line 23 at r1 (raw file):

auxilary

auxiliary

Signed-off-by: fristonio <deepshpathak@gmail.com>
Copy link
Member Author

fristonio left a comment

Reviewable status: 0 of 47 files reviewed, 5 unresolved discussions (waiting on @danielmai, @hackintoshrao, and @martinmr)


contrib/config/terraform/aws/ha/terraform.tfvars.example, line 5 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…
dgraph-test

I think this should be a string. Otherwise, I get an error message when I leave this alone.

$ terraform plan

Error: Variables not allowed

  on terraform.tfvars line 5:
   5: deployment_name = dgraph-test

Variables may not be used here.


Error: No value for required variable

  on variables.tf line 22:
  22: variable "deployment_name" {

The root module input variable "deployment_name" is not set, and has no
default value. Use a -var or -var-file command line argument to provide a
value for this variable.

Done.


contrib/config/terraform/aws/ha/variables.tf, line 48 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…
"t3a.small"

Default values should work as-is, even if it's with minimal specs. In us-east-2 (the default region in this file) I got this error:

Error: Error launching source instance: Unsupported: Your requested instance type (t3a.small) is not supported in your requested Availability Zone (us-east-2a). Please retry your request by not specifying an Availability Zone or choosing us-east-2b, us-east-2c.
	status code: 400, request id: 8802eef5-29fa-4a23-9318-9ccffa7bc1a7

  on aws/instance/main.tf line 13, in resource "aws_instance" "dgraph":

Done.


contrib/config/terraform/aws/ha/aws/vpc/main.tf, line 6 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…
isntances

instances

Done.


contrib/config/terraform/aws/ha/aws/vpc/main.tf, line 158 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…
exteranl

external

Done.


contrib/config/terraform/aws/ha/aws/vpc/outputs.tf, line 23 at r1 (raw file):

Previously, danielmai (Daniel Mai) wrote…
auxilary

auxiliary

Done.

Copy link
Member

danielmai left a comment

Reviewed 37 of 47 files at r1, 10 of 10 files at r2.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @danielmai, @hackintoshrao, and @martinmr)

Copy link
Member

danielmai left a comment

Add a note in the README about any known limitations with the Terraform templates in this PR (e.g., I don't think it works with t2 instance types for some reason).

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @danielmai, @hackintoshrao, and @martinmr)

Signed-off-by: fristonio <deepesh@dgraph.io>
@prashant-shahi prashant-shahi requested a review from danielmai Jan 10, 2020
Copy link
Member

prashant-shahi left a comment

Reviewable status: 45 of 47 files reviewed, 8 unresolved discussions (waiting on @danielmai, @fristonio, @hackintoshrao, and @martinmr)


contrib/config/terraform/aws/ha/README.md, line 3 at r3 (raw file):

Terraform automates the process of spinning up the EC2 instance, setting up, and running Dgraph in it.


contrib/config/terraform/aws/ha/README.md, line 30 at r3 (raw file):

The terraform setup has been tested to work well with AWS m5 instances.

Rephrasing the sentence.


contrib/config/terraform/aws/ha/README.md, line 32 at r3 (raw file):

Dgraph cluster

Signed-off-by: fristonio <deepesh@dgraph.io>
Copy link
Member Author

fristonio left a comment

Reviewable status: 45 of 47 files reviewed, 8 unresolved discussions (waiting on @danielmai, @hackintoshrao, @martinmr, and @prashant-shahi)


contrib/config/terraform/aws/ha/README.md, line 3 at r3 (raw file):

Previously, prashant-shahi (Prashant Shahi) wrote…

Terraform automates the process of spinning up the EC2 instance, setting up, and running Dgraph in it.

Done.


contrib/config/terraform/aws/ha/README.md, line 30 at r3 (raw file):

Previously, prashant-shahi (Prashant Shahi) wrote…

The terraform setup has been tested to work well with AWS m5 instances.

Rephrasing the sentence.

Done.


contrib/config/terraform/aws/ha/README.md, line 32 at r3 (raw file):

Previously, prashant-shahi (Prashant Shahi) wrote…

Dgraph cluster

Done.

@fristonio fristonio merged commit 554d202 into master Jan 10, 2020
7 of 8 checks passed
7 of 8 checks passed
code-review/reviewable 2 files, 8 discussions left (danielmai, hackintoshrao, martinmr, prashant-shahi)
Details
Blockade (dgraph) TeamCity build finished
Details
CI (dgraph) TeamCity build finished
Details
DeepSource: Go Analysis Passed: No blocking issues detected.
Details
Docs-Preview (dgraph) TeamCity build finished
Details
Docs-Preview/dgraph-26a8aca6d1-38901 Deployment ready!
Details
GolangCI No issues found!
Details
license/cla Contributor License Agreement is signed.
Details
@fristonio fristonio deleted the fristonio/terraform-aws-ha branch Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.