-
Notifications
You must be signed in to change notification settings - Fork 265
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
chore: use non default mnemonic for releases #10400
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,14 @@ on: | |
aztec_docker_image: | ||
description: The Aztec Docker image to use, e.g. aztecprotocol/aztec:da809c58290f9590836f45ec59376cbf04d3c4ce-x86_64 | ||
required: true | ||
deployment_mnemonic_secret_name: | ||
description: The name of the secret which holds the boot node's contract deployment mnemonic | ||
required: true | ||
default: testnet-deployment-mnemonic | ||
respect_tf_lock: | ||
description: Whether to respect the Terraform lock | ||
required: false | ||
default: "true" | ||
|
||
jobs: | ||
network_deployment: | ||
|
@@ -26,6 +34,7 @@ jobs: | |
AZTEC_DOCKER_IMAGE: ${{ inputs.aztec_docker_image }} | ||
NAMESPACE: ${{ inputs.namespace }} | ||
VALUES_FILE: ${{ inputs.values_file }} | ||
DEPLOYMENT_MNEMONIC_SECRET_NAME: ${{ inputs.deployment_mnemonic_secret_name }} | ||
CHART_PATH: ./spartan/aztec-network | ||
CLUSTER_NAME: aztec-gke | ||
REGION: us-west1-a | ||
|
@@ -62,6 +71,12 @@ jobs: | |
echo "Terraform state bucket already exists" | ||
fi | ||
|
||
- name: Grab the boot node deployment mnemonic | ||
id: get-mnemonic | ||
run: | | ||
echo "::add-mask::$(gcloud secrets versions access latest --secret=${{ env.DEPLOYMENT_MNEMONIC_SECRET_NAME }})" | ||
echo "mnemonic=$(gcloud secrets versions access latest --secret=${{ env.DEPLOYMENT_MNEMONIC_SECRET_NAME }})" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
|
@@ -82,8 +97,10 @@ jobs: | |
-var="values_file=${{ env.VALUES_FILE }}" \ | ||
-var="gke_cluster_context=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="aztec_docker_image=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-out=tfplan | ||
-var="l1_deployment_mnemonic=${{ steps.get-mnemonic.outputs.mnemonic }}" \ | ||
-out=tfplan \ | ||
-lock=${{ inputs.respect_tf_lock }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is to avoid concurrent updates, right? not against it, curious if we think there's a chance of that happening There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, and I don't know. Two people could click through the UI at the same time so I'd rather not risk it. |
||
|
||
- name: Terraform Apply | ||
working-directory: ./spartan/terraform/deploy-release | ||
run: terraform apply -auto-approve tfplan | ||
run: terraform apply -lock=${{ inputs.respect_tf_lock }} -auto-approve tfplan |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ aztec: | |
epochDuration: 16 # how many L2 slots in an epoch | ||
epochProofClaimWindow: 13 # in L2 slots | ||
realProofs: false | ||
l1DeploymentMnemonic: "test test test test test test test test test test test junk" # the mnemonic used when deploying contracts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this isn't just used when deploying contracts, right? This is the eth node's mnemonic? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, but whatever is set in this field is what will be used for contract deployments. |
||
|
||
bootNode: | ||
peerIdPrivateKey: "" | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Create ingress firewall rules for UDP | ||
resource "google_compute_firewall" "udp_ingress" { | ||
name = "allow-udp-ingress-custom" | ||
network = "default" | ||
allow { | ||
protocol = "udp" | ||
ports = ["40400-40499", "8080", "8545"] | ||
} | ||
direction = "INGRESS" | ||
source_ranges = ["0.0.0.0/0"] | ||
target_tags = ["gke-node", "aztec-gke-node"] | ||
} | ||
|
||
# Create egress firewall rules for UDP | ||
resource "google_compute_firewall" "udp_egress" { | ||
name = "allow-udp-egress-custom" | ||
network = "default" | ||
allow { | ||
protocol = "udp" | ||
ports = ["40400-40499", "8080", "8545"] | ||
} | ||
direction = "EGRESS" | ||
destination_ranges = ["0.0.0.0/0"] | ||
target_tags = ["gke-node", "aztec-gke-node"] | ||
} | ||
|
||
# Create ingress firewall rules for TCP | ||
resource "google_compute_firewall" "tcp_ingress" { | ||
name = "allow-tcp-ingress-custom" | ||
network = "default" | ||
allow { | ||
protocol = "tcp" | ||
ports = ["40400-40499", "8080", "8545"] | ||
} | ||
direction = "INGRESS" | ||
source_ranges = ["0.0.0.0/0"] | ||
target_tags = ["gke-node", "aztec-gke-node"] | ||
} | ||
|
||
# Create egress firewall rules for TCP | ||
resource "google_compute_firewall" "tcp_egress" { | ||
name = "allow-tcp-egress-custom" | ||
network = "default" | ||
allow { | ||
protocol = "tcp" | ||
ports = ["40400-40499", "8080", "8545"] | ||
} | ||
direction = "EGRESS" | ||
destination_ranges = ["0.0.0.0/0"] | ||
target_tags = ["gke-node", "aztec-gke-node"] | ||
} |
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 we're storing the secret name as a secret out of abundance of caution?
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 no that was mainly for configurability. It defaults above to
testnet-deployment-mnemonic
.