-
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 1 commit
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
terraform { | ||
backend "s3" { | ||
bucket = "aztec-terraform" | ||
key = "spartan-gke-cluster/terraform.tfstate" | ||
key = "aztec-gke-cluster/terraform.tfstate" | ||
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. I had created a new terraform file for the new cluster leaving these as is. The rationale being that at some point I would |
||
region = "eu-west-2" | ||
} | ||
required_providers { | ||
|
@@ -49,7 +49,8 @@ resource "google_service_account" "helm_sa" { | |
resource "google_project_iam_member" "helm_sa_roles" { | ||
for_each = toset([ | ||
"roles/container.admin", | ||
"roles/storage.admin" | ||
"roles/storage.admin", | ||
"roles/secretmanager.admin" | ||
]) | ||
project = var.project | ||
role = each.key | ||
|
@@ -58,7 +59,7 @@ resource "google_project_iam_member" "helm_sa_roles" { | |
|
||
# Create a GKE cluster | ||
resource "google_container_cluster" "primary" { | ||
name = "spartan-gke" | ||
name = var.cluster_name | ||
location = var.zone | ||
|
||
initial_node_count = 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.
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
.