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

Terraform README #13

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Terraform README #13

merged 1 commit into from
Dec 11, 2024

Conversation

neekolas
Copy link
Contributor

@neekolas neekolas commented Dec 8, 2024

TL;DR

Added comprehensive documentation for deploying XMTPD nodes using Terraform on AWS.

What changed?

  • Added detailed setup instructions for deploying XMTPD nodes
  • Included pre-requisite requirements for AWS and Alchemy accounts
  • Documented domain registration process in Route53
  • Added configuration instructions for both Terraform Cloud and local deployment
  • Provided contract addresses and RPC URL configuration examples

How to test?

  1. Follow the pre-requisite checklist to ensure all accounts and credentials are set up
  2. Register a domain in Route53
  3. Configure terraform variables either through Terraform Cloud or locally
  4. Run terraform init and terraform apply to verify deployment

Why make this change?

To provide clear, step-by-step instructions for users wanting to deploy XMTPD nodes on AWS infrastructure, making the deployment process more accessible and reducing potential setup errors.

Copy link
Contributor Author

neekolas commented Dec 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@neekolas neekolas marked this pull request as ready for review December 8, 2024 20:12
Comment on lines +52 to +54
messages_contract_address = "0x162f2d4d96565437F47bfB7a0BF8AC4FF481Bbf6"
identity_updates_contract_address = "0x00e92e15AB0D7d3aA5c76bceCcE675DcAf311189"
Copy link
Collaborator

Choose a reason for hiding this comment

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

are these the "final" ones? Can I copy them over to the Helm README?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're the ones in use in our current testnet. You can copy over for now, although we should come up with a central place to hold these values so we only have to update one place instead of 6 when we eventually rewrite these contracts.

Copy link

Choose a reason for hiding this comment

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

We could adopt a proxy + create2 approach for contract deployments.
Making the contracts upgradable through a proxy would guarantee that, once deployed, the address won't ever change.
CREATE2 is a optional; it's an EVM opcode that would give us the capability of predicting the address where a contract is going to be deployed by using a salt. This could be used in the future if we consider migrating between blockchains and would want to preserve the address for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that idea. We would still need to update some config if the shape of the events ever changed, since the ABI parsing lives in the code and would need to be updated at the same time.

But most contract changes don't change the event structure.

3. In Terraform Cloud make sure the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables are set to the credentials for your Terraform IAM user
4. `terraform init` (you may need to run `terraform login` first if you have never used the Terraform CLI before)
5. `terraform apply`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would recommend to do terraform plan "and review the plan" before running apply.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. That is more prudent.

@mkysel mkysel self-requested a review December 9, 2024 18:27
@neekolas neekolas force-pushed the 12-06-terraform_readme branch from a3fdc9e to ff80a9a Compare December 11, 2024 23:49
Copy link
Contributor Author

neekolas commented Dec 11, 2024

Merge activity

  • Dec 11, 3:50 PM PST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 11, 3:50 PM PST: A user merged this pull request with Graphite.

@neekolas neekolas merged commit 44b3300 into main Dec 11, 2024
5 of 6 checks passed
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