-
Notifications
You must be signed in to change notification settings - Fork 235
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: IAC for a prototype devnet #2720
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6ab6768
Don't deploy auonat
PhilWindle aad6373
WIP
PhilWindle 6706d19
Merge branch 'master' into pw/devnet-2
PhilWindle 88c730c
WIP
PhilWindle 17f722b
Merge branch 'master' into pw/devnet-2
PhilWindle f011a96
WIP
PhilWindle f463b25
WIP
PhilWindle bbda5da
WIP
PhilWindle 348e5ea
WIP
PhilWindle 7c6f8b1
Merge branch 'master' into pw/devnet-2
PhilWindle 59fe85c
WIP
PhilWindle 456c857
Fix
PhilWindle 7330f66
Fix
PhilWindle 4b7a152
WIP
PhilWindle aeb1147
WIP
PhilWindle 49964f1
Build fix
PhilWindle 4f4f1f5
Cleanup
PhilWindle a60ea83
Merge branch 'master' into pw/devnet-2
PhilWindle adca668
Cleanup
PhilWindle d52cfad
Cleanup and deploy images
PhilWindle d0dd046
Test fix
PhilWindle 734d486
Fix
PhilWindle 8239ada
Merge branch 'master' into pw/devnet-2
PhilWindle 69aafd2
Cleanup
PhilWindle 1da0fc8
Merge branch 'pw/devnet-2' of github.com:AztecProtocol/aztec-packages…
PhilWindle 4397bad
Merge branch 'master' into pw/devnet-2
PhilWindle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ node_modules | |
build/ | ||
.idea | ||
cmake-build-debug | ||
.terraform | ||
.terraform* | ||
.bootstrapped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
terraform { | ||
backend "s3" { | ||
bucket = "aztec-terraform" | ||
key = "aztec-network/iac" | ||
region = "eu-west-2" | ||
} | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "3.74.2" | ||
} | ||
} | ||
} | ||
|
||
data "terraform_remote_state" "setup_iac" { | ||
backend = "s3" | ||
config = { | ||
bucket = "aztec-terraform" | ||
key = "setup/setup-iac" | ||
region = "eu-west-2" | ||
} | ||
} | ||
|
||
provider "aws" { | ||
profile = "default" | ||
region = "eu-west-2" | ||
} | ||
|
||
# Create our load balancer. | ||
resource "aws_lb" "aztec-network" { | ||
name = "aztec-network" | ||
internal = false | ||
load_balancer_type = "network" | ||
security_groups = [ | ||
data.terraform_remote_state.setup_iac.outputs.security_group_public_id, aws_security_group.security-group-p2p.id | ||
] | ||
subnets = [ | ||
data.terraform_remote_state.setup_iac.outputs.subnet_az1_id, | ||
data.terraform_remote_state.setup_iac.outputs.subnet_az2_id | ||
] | ||
|
||
access_logs { | ||
bucket = "aztec-logs" | ||
prefix = "aztec-network-nlb-logs" | ||
enabled = false | ||
} | ||
|
||
tags = { | ||
Name = "aztec-network" | ||
} | ||
} | ||
|
||
resource "aws_security_group" "security-group-p2p" { | ||
name = "security-group-p2p" | ||
description = "Allow inbound p2p traffic" | ||
vpc_id = data.terraform_remote_state.setup_iac.outputs.vpc_id | ||
|
||
tags = { | ||
Name = "allow-p2p" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
output "nlb_arn" { | ||
value = "${aws_lb.aztec-network.arn}" | ||
} | ||
|
||
output "nlb_dns" { | ||
value = "${aws_lb.aztec-network.dns_name}" | ||
} | ||
|
||
output "p2p_security_group_id" { | ||
value = "${aws_security_group.security-group-p2p.id}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project AS builder | ||
|
||
WORKDIR /usr/src/yarn-project/aztec-node | ||
|
||
# Productionify. See comment in yarn-project-base/Dockerfile. | ||
RUN yarn cache clean && yarn workspaces focus --production | ||
|
||
# Create final, minimal size image. | ||
FROM node:18-alpine | ||
COPY --from=builder /usr/src/ /usr/src/ | ||
WORKDIR /usr/src/yarn-project/aztec-node | ||
ENTRYPOINT ["yarn"] | ||
CMD [ "start" ] | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should now be built by yarn-project I think. You would be able to grab the build from there
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.
Doesn't yarn-project just produce a single image
yarn-project
with all of the built code? And if we want an actual deployable package image we need to have a Dockerfile which extracts the relevant built code for that package?