-
Notifications
You must be signed in to change notification settings - Fork 266
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: values for sepolia deployment #10362
Changes from 22 commits
c33c122
d9cab7b
d049c0e
02fcc11
6141a50
97d1248
c5e0e7c
9633ab9
b9dc642
9cc7cc9
fe15b83
9216a74
44c375c
cb9f57e
37d3d38
1eca57d
6e08c18
afefb5f
3717fb1
dc983f9
bf04092
6ab38e3
ca4e910
5debe14
e3b8a7d
281ce7e
be47200
21bce8c
d72d954
2be454b
49ee379
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ on: | |
type: string | ||
deployment_mnemonic_secret_name: | ||
description: The name of the secret which holds the boot node's contract deployment mnemonic | ||
required: true | ||
required: false | ||
type: string | ||
default: testnet-deployment-mnemonic | ||
deployment_salt: | ||
|
@@ -40,6 +40,11 @@ on: | |
required: false | ||
type: string | ||
default: "master" | ||
sepolia_deployment: | ||
description: "Whether to deploy on Sepolia network (default: false)" | ||
required: false | ||
type: boolean | ||
default: false | ||
secrets: | ||
GCP_SA_KEY: | ||
required: true | ||
|
@@ -56,7 +61,7 @@ on: | |
required: true | ||
deployment_mnemonic_secret_name: | ||
description: The name of the secret which holds the boot node's contract deployment mnemonic | ||
required: true | ||
required: false | ||
default: testnet-deployment-mnemonic | ||
deployment_salt: | ||
description: The salt to use for this deployment. Defaults to random | ||
|
@@ -76,6 +81,11 @@ on: | |
required: false | ||
type: string | ||
default: "master" | ||
sepolia_deployment: | ||
description: "Whether to deploy on Sepolia network (default: false)" | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
network_deployment: | ||
|
@@ -154,26 +164,56 @@ jobs: | |
# Destroy fails if the resources are already destroyed, so we continue on error | ||
continue-on-error: true | ||
run: | | ||
terraform destroy -auto-approve \ | ||
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \ | ||
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \ | ||
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" | ||
if ${{ inputs.sepolia_deployment }}; then | ||
terraform destroy -auto-approve \ | ||
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \ | ||
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \ | ||
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-var="L1_DEPLOYMENT_PRIVATE_KEY=${{ secrets.SEPOLIA_L1_DEPLOYMENT_PRIVATE_KEY }}" \ | ||
-var="VALIDATOR_KEYS=${{ secrets.VALIDATOR_KEYS }}" \ | ||
-var="BOOT_NODE_SEQ_PUBLISHER_PRIVATE_KEY=${{ secrets.BOOT_NODE_SEQ_PUBLISHER_PRIVATE_KEY }}" \ | ||
-var="PROVER_NODE_PROVER_PUBLISHER_PRIVATE_KEY=${{ secrets.PROVER_NODE_PROVER_PUBLISHER_PRIVATE_KEY }}" \ | ||
-var="ETHEREUM_EXTERNAL_HOST=${{ secrets.SEPOLIA_EXTERNAL_HOST }}" \ | ||
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. Is this a secret because it has the API key in the URL? 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. yep 👍 |
||
-lock=${{ inputs.respect_tf_lock }} | ||
else | ||
terraform destroy -auto-approve \ | ||
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \ | ||
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \ | ||
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" | ||
-lock=${{ inputs.respect_tf_lock }} | ||
fi | ||
|
||
- name: Terraform Plan | ||
working-directory: ./spartan/terraform/deploy-release | ||
run: | | ||
terraform plan \ | ||
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \ | ||
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \ | ||
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" \ | ||
-var="L1_DEPLOYMENT_SALT=${DEPLOYMENT_SALT:-$RANDOM}" \ | ||
-out=tfplan \ | ||
-lock=${{ inputs.respect_tf_lock }} | ||
if ${{ inputs.sepolia_deployment }}; then | ||
terraform plan \ | ||
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \ | ||
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \ | ||
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-var="L1_DEPLOYMENT_PRIVATE_KEY=${{ secrets.SEPOLIA_L1_DEPLOYMENT_PRIVATE_KEY }}" \ | ||
-var="L1_DEPLOYMENT_SALT=${DEPLOYMENT_SALT:-$RANDOM}" \ | ||
-var="VALIDATOR_KEYS=${{ secrets.VALIDATOR_KEYS }}" \ | ||
-var="BOOT_NODE_SEQ_PUBLISHER_PRIVATE_KEY=${{ secrets.BOOT_NODE_SEQ_PUBLISHER_PRIVATE_KEY }}" \ | ||
-var="PROVER_NODE_PROVER_PUBLISHER_PRIVATE_KEY=${{ secrets.PROVER_NODE_PROVER_PUBLISHER_PRIVATE_KEY }}" \ | ||
-var="ETHEREUM_EXTERNAL_HOST=${{ secrets.SEPOLIA_EXTERNAL_HOST }}" \ | ||
-out=tfplan \ | ||
-lock=${{ inputs.respect_tf_lock }} | ||
else | ||
terraform plan \ | ||
-var="RELEASE_NAME=${{ env.NAMESPACE }}" \ | ||
-var="VALUES_FILE=${{ env.VALUES_FILE }}" \ | ||
-var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ | ||
-var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ | ||
-var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" \ | ||
-var="L1_DEPLOYMENT_SALT=${DEPLOYMENT_SALT:-$RANDOM}" \ | ||
-out=tfplan \ | ||
-lock=${{ inputs.respect_tf_lock }} | ||
fi | ||
|
||
- name: Terraform Apply | ||
working-directory: ./spartan/terraform/deploy-release | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,8 +53,8 @@ get_service_address() { | |
} | ||
|
||
# Configure Ethereum address | ||
if [ "${ETHEREUM_EXTERNAL_HOST}" != "" ]; then | ||
ETHEREUM_ADDR="${ETHEREUM_EXTERNAL_HOST}" | ||
if [ "${EXTERNAL_ETHEREUM_HOST}" != "" ]; then | ||
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. Sorry about this one. Hope you didn't lose much time. |
||
ETHEREUM_ADDR="${EXTERNAL_ETHEREUM_HOST}" | ||
elif [ "${NETWORK_PUBLIC}" = "true" ]; then | ||
ETHEREUM_ADDR=$(get_service_address "ethereum" "${ETHEREUM_PORT}") | ||
else | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{{- if not .Values.network.disableEthNode }} | ||
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. instead of adding a new flag, could this be replaced by checking if .Values.ethereum.externalHost is set? If we wanted a flag, we could create a helper based off checking that value? |
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
|
@@ -144,4 +145,5 @@ spec: | |
requests: | ||
storage: {{ .Values.ethereum.storage }} | ||
{{- end }} | ||
--- | ||
--- | ||
{{ end }} |
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.
A nit, not for now, but a bunch of the script above here is to set up port forwarding, but we use none of that in this
if
. Seems we should just have a different step, and condition oninputs.sepolia_deployment
, and then a common step beneath for uploading.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.
added here