Skip to content

Commit 00aaef6

Browse files
authored
fix: tf vars (#10457)
Please read [contributing guidelines](CONTRIBUTING.md) and remove this line.
1 parent 64f6dad commit 00aaef6

File tree

7 files changed

+29
-18
lines changed

7 files changed

+29
-18
lines changed

.github/workflows/devnet-deploy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: ./.github/workflows/network-deploy.yml
3737
with:
3838
namespace: ${{ github.event.inputs.namespace }}
39-
values_file: release-devnet
39+
values_file: release-devnet.yaml
4040
aztec_docker_image: ${{ github.event.inputs.aztec_docker_image }}
4141
deployment_mnemonic_secret_name: ${{ github.event.inputs.deployment_mnemonic_secret_name }}
4242
respect_tf_lock: ${{ github.event.inputs.respect_tf_lock }}
@@ -48,8 +48,6 @@ jobs:
4848
runs-on: ubuntu-latest
4949
needs: deploy-network
5050
steps:
51-
- uses: ./.github/ci-setup-action
52-
5351
- name: Configure AWS credentials
5452
uses: aws-actions/configure-aws-credentials@v1
5553
with:
@@ -97,15 +95,15 @@ jobs:
9795
trap cleanup EXIT
9896
9997
echo "Waiting for PXE pods to be ready..."
100-
if ! kubectl wait --for=condition=ready pod -l app=$NAMESPACE-aztec-network-pxe --timeout=10m; then
98+
if ! kubectl wait -n $NAMESPACE --for=condition=ready pod -l app=pxe --timeout=10m; then
10199
echo "Error: PXE pods did not become ready within timeout"
102100
exit 1
103101
fi
104102
105103
helm get values $NAMESPACE -n $NAMESPACE -o json --all > helm_values.json
106104
107105
PXE_PORT="$(jq -r .pxe.service.nodePort helm_values.json)"
108-
ETHEREUM_PORT="$(jq -r ethereum.service.port helm_values.json)"
106+
ETHEREUM_PORT="$(jq -r .ethereum.service.port helm_values.json)"
109107
L1_CHAIN_ID="$(jq -r .ethereum.chainId helm_values.json)"
110108
111109
MNEMONIC="$(jq -r .aztec.l1DeploymentMnemonic helm_values.json)"
@@ -115,18 +113,20 @@ jobs:
115113
116114
kubectl port-forward -n $NAMESPACE svc/$NAMESPACE-aztec-network-pxe $PXE_PORT &
117115
pxe_port_forward_pid=$!
118-
kubectl port-forward -n $NAMESPACE svc/$NAMESPACE-aztec-network-ethereum $ETHEREUM_PORT &
116+
117+
# port-forward directly to the pod because the Eth node does not have a service definition
118+
ETH_POD_NAME=$(kubectl get pods -n $NAMESPACE -l app=ethereum -o jsonpath='{.items[0].metadata.name}')
119+
kubectl port-forward -n $NAMESPACE pod/$ETH_POD_NAME $ETHEREUM_PORT &
119120
ethereum_port_forward_pid=$!
120121
121122
# wait for port-forwards to establish
122123
sleep 5
123124
124-
docker run --rm $AZTEC_DOCKER_IMAGE bootstrap-network \
125-
--network host \
125+
docker run --rm --network host $AZTEC_DOCKER_IMAGE bootstrap-network \
126126
--rpc-url http://127.0.0.1:$PXE_PORT \
127127
--l1-rpc-url http://127.0.0.1:$ETHEREUM_PORT \
128-
--l1-chain-id $CHAIN_ID \
129-
--mnemonic $MNEMONIC \
128+
--l1-chain-id "$L1_CHAIN_ID" \
129+
--mnemonic "$MNEMONIC" \
130130
--json | tee ./basic_contracts.json
131131
132132
aws s3 cp ./basic_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/devnet/basic_contracts.json

.github/workflows/network-deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ jobs:
120120
working-directory: ./spartan/terraform/deploy-release
121121
run: |
122122
terraform plan \
123-
-var="release_name=${{ env.NAMESPACE }}" \
124-
-var="values_file=${{ env.VALUES_FILE }}" \
125-
-var="gke_cluster_context=${{ env.GKE_CLUSTER_CONTEXT }}" \
126-
-var="aztec_docker_image=${{ env.AZTEC_DOCKER_IMAGE }}" \
127-
-var="l1_deployment_mnemonic=${{ steps.get-mnemonic.outputs.mnemonic }}" \
123+
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \
124+
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \
125+
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \
126+
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \
127+
-var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" \
128128
-out=tfplan \
129129
-lock=${{ inputs.respect_tf_lock }}
130130

spartan/aztec-network/templates/deploy-l1-verifier.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ metadata:
55
name: {{ include "aztec-network.fullname" . }}-deploy-l1-verifier
66
labels:
77
{{- include "aztec-network.labels" . | nindent 4 }}
8+
annotations:
9+
"helm.sh/hook": post-install
10+
"helm.sh/hook-weight": "0"
11+
"helm.sh/hook-delete-policy": before-hook-creation
12+
813
spec:
914
template:
1015
metadata:

spartan/aztec-network/templates/setup-l2-contracts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
name: {{ include "aztec-network.fullname" . }}-setup-l2-contracts
66
labels:
77
{{- include "aztec-network.labels" . | nindent 4 }}
8+
annotations:
9+
"helm.sh/hook": post-install
10+
"helm.sh/hook-weight": "0"
11+
"helm.sh/hook-delete-policy": before-hook-creation
812
spec:
913
template:
1014
metadata:

spartan/terraform/deploy-release/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terraform {
66
required_providers {
77
helm = {
88
source = "hashicorp/helm"
9-
version = "~> 2.12.1"
9+
version = "~> 2.16.1"
1010
}
1111
kubernetes = {
1212
source = "hashicorp/kubernetes"
@@ -37,6 +37,7 @@ resource "helm_release" "aztec-gke-cluster" {
3737
chart = "aztec-network"
3838
namespace = var.RELEASE_NAME
3939
create_namespace = true
40+
upgrade_install = true
4041

4142
# base values file
4243
values = [file("../../aztec-network/values/${var.VALUES_FILE}")]
@@ -48,7 +49,7 @@ resource "helm_release" "aztec-gke-cluster" {
4849

4950
set {
5051
name = "aztec.l1DeploymentMnemonic"
51-
value = var.l1_deployment_mnemonic
52+
value = var.L1_DEPLOYMENT_MNEMONIC
5253
}
5354

5455
# Setting timeout and wait conditions

spartan/terraform/deploy-release/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ variable "AZTEC_DOCKER_IMAGE" {
1919
type = string
2020
}
2121

22-
variable "l1_deployment_mnemonic" {
22+
variable "L1_DEPLOYMENT_MNEMONIC" {
2323
description = "Mnemonic to use for the L1 contract deployments"
2424
type = string
2525
sensitive = true

yarn-project/cli/src/cmds/devnet/bootstrap_network.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ async function deployERC20({ walletClient, publicClient }: L1Clients) {
130130
publicClient,
131131
erc20.contractAbi,
132132
erc20.contractBytecode,
133+
['DevCoin', 'DEV', walletClient.account.address],
133134
);
134135
const { address: portalAddress } = await deployL1Contract(
135136
walletClient,

0 commit comments

Comments
 (0)