Skip to content
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: Merge Devnet back to Master #7611

Merged
merged 52 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3b3954d
Initial metrics deployment
PhilWindle Jul 24, 2024
c0e609d
Fixes
PhilWindle Jul 24, 2024
0e04caf
Always build
PhilWindle Jul 24, 2024
6d552e9
Moved terraform
PhilWindle Jul 24, 2024
4600367
Fixed spelling
PhilWindle Jul 24, 2024
2f4411d
Attempted fix
PhilWindle Jul 24, 2024
06f527a
Re-instate diff check
PhilWindle Jul 24, 2024
229ebb2
Attempt grafana
PhilWindle Jul 24, 2024
0bbf42a
feat: devnet release (#7593)
alexghr Jul 24, 2024
fd59b19
ci: fix env var
alexghr Jul 24, 2024
3513334
Inject secrets through TF
PhilWindle Jul 24, 2024
7756ab3
Merge branch 'devnet' of github.com:AztecProtocol/aztec-packages into…
PhilWindle Jul 24, 2024
426313a
TF Fix
PhilWindle Jul 24, 2024
7f05bc3
More fixes
PhilWindle Jul 24, 2024
e9356b8
Fixed grafana TF
PhilWindle Jul 24, 2024
283c866
fix: recreate mount points
alexghr Jul 24, 2024
2dc9763
Otel config
PhilWindle Jul 24, 2024
17f50b6
Merge branch 'devnet' of github.com:AztecProtocol/aztec-packages into…
PhilWindle Jul 24, 2024
aae287f
Grafana updates
PhilWindle Jul 24, 2024
b0fbb8e
Updated node config
PhilWindle Jul 24, 2024
e97b7ce
Removed USER directive
PhilWindle Jul 24, 2024
af35f36
Don't deploy mainet fork
PhilWindle Jul 24, 2024
988882d
Comment
PhilWindle Jul 24, 2024
0931bd7
DNS fix
PhilWindle Jul 24, 2024
b9345ea
Revert change
PhilWindle Jul 24, 2024
e776f03
Only 1 sequencer
PhilWindle Jul 24, 2024
231a344
fix: correctly serialize contract addresses
alexghr Jul 25, 2024
4b26848
fix: don't destroy mainnet-fork
alexghr Jul 25, 2024
b3ce684
ci: skip rebuilding aztec image
alexghr Jul 25, 2024
0673ff1
ci: add logging
alexghr Jul 25, 2024
7866135
fix: exclude emty lines from build check
alexghr Jul 25, 2024
c278e8a
ci: recreate mountpoints
alexghr Jul 25, 2024
71ec387
ci: recreate efs
alexghr Jul 25, 2024
e5df449
fix: log json correctly
alexghr Jul 25, 2024
1c288d6
Fixes
PhilWindle Jul 25, 2024
15c789a
Merge branch 'devnet' of github.com:AztecProtocol/aztec-packages into…
PhilWindle Jul 25, 2024
26276a3
fix: skip build if only tf files have changed
alexghr Jul 25, 2024
06fab9d
Fixes
PhilWindle Jul 25, 2024
b1cdb76
Merge branch 'devnet' of github.com:AztecProtocol/aztec-packages into…
PhilWindle Jul 25, 2024
347489b
chore: enable debug logging in otel
alexghr Jul 25, 2024
d1e8fd2
fix: specify endpoint
alexghr Jul 25, 2024
3ae0b7e
Deploy latest metrics
PhilWindle Jul 25, 2024
5e037eb
Merge branch 'devnet' of github.com:AztecProtocol/aztec-packages into…
PhilWindle Jul 25, 2024
29f3edb
fix: remove http://
alexghr Jul 25, 2024
163ae48
fix: add otel logging
alexghr Jul 25, 2024
bb99244
fix: only deploy metrics if changed
alexghr Jul 25, 2024
389eb52
Merge remote-tracking branch 'origin/master' into devnet
alexghr Jul 25, 2024
94b1c49
fix: add more logging
alexghr Jul 25, 2024
cc17cbe
Deploy latest images
PhilWindle Jul 25, 2024
7e9a579
Merge branch 'devnet' of github.com:AztecProtocol/aztec-packages into…
PhilWindle Jul 25, 2024
24d5dee
fix: exit early
alexghr Jul 25, 2024
413049e
Force a rebuild
PhilWindle Jul 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/workflows/devnet-deploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ env:
TF_VAR_L1_CHAIN_ID: 677692
TF_VAR_BOOTNODE_1_PRIVATE_KEY: ${{ secrets.BOOTNODE_1_PRIVATE_KEY }}
TF_VAR_BOOTNODE_2_PRIVATE_KEY: ${{ secrets.BOOTNODE_2_PRIVATE_KEY }}
TF_VAR_SEQ_1_PUBLISHER_PRIVATE_KEY: ${{ secrets.SEQ_1_PUBLISHER_PRIVATE_KEY }}
TF_VAR_SEQ_2_PUBLISHER_PRIVATE_KEY: ${{ secrets.SEQ_2_PUBLISHER_PRIVATE_KEY }}
TF_VAR_SEQUENCER_PRIVATE_KEYS: '["${{ secrets.SEQ_1_PUBLISHER_PRIVATE_KEY }}"]'
TF_VAR_NODE_P2P_PRIVATE_KEYS: '[""]'
TF_VAR_DEPLOY_TAG: devnet
TF_VAR_IMAGE_TAG: ${{ github.sha }}
TF_VAR_API_KEY: ${{ secrets.FORK_API_KEY }}
TF_VAR_FORK_MNEMONIC: ${{ secrets.FORK_MNEMONIC }}
TF_VAR_INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
TF_VAR_FAUCET_ACCOUNT_INDEX: 5
CONTRACT_S3_BUCKET: s3://aztec-${{ env.DEPLOY_TAG }}-deployments
CONTRACT_S3_BUCKET: s3://aztec-devnet-deployments

jobs:
setup:
Expand All @@ -47,11 +48,28 @@ jobs:
with:
concurrency_key: build-release-artifacts-${{ github.actor }}
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
- name: Check if only workflow flows have changed
id: check_only_workflow_changes
uses: actions/github-script@v7
with:
script: |
const { execSync } = require('child_process');
const changedFiles = execSync('git diff --name-only ${{ github.event.before }} ${{ github.sha }}')
.toString()
.split('\n')
.filter(line => line);
const prefixesToIgnore = ['.github', 'iac'];
const suffixesToIgnore = ['.tf'];
return changedFiles.every(file => (
prefixesToIgnore.some(prefix => file.startsWith(prefix)) ||
suffixesToIgnore.some(suffix => file.endsWith(suffix))
));
- name: "Build & Push aztec images"
timeout-minutes: 40
if: steps.check_only_workflow_changes.outputs.result == 'false'
run: |
earthly-ci \
--no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ env.DEPLOY_TAG }}
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ env.DEPLOY_TAG }}
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ github.sha }}

- name: Check if mainnet fork needs deployment
id: check_fork_changes
Expand Down Expand Up @@ -166,6 +184,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: "${{ env.GIT_COMMIT }}"
fetch-depth: 0

- uses: ./.github/ci-setup-action

Expand All @@ -182,6 +201,7 @@ jobs:

- name: Deploy protocol contracts
run: |
set -e
docker pull aztecprotocol/aztec:${{ env.DEPLOY_TAG }}
docker run aztecprotocol/aztec:${{ env.DEPLOY_TAG }} deploy-protocol-contracts \
--rpc-url https://api.aztec.network/${{ env.DEPLOY_TAG }}/aztec-pxe/${{ secrets.FORK_API_KEY }} \
Expand All @@ -193,6 +213,7 @@ jobs:

- name: Bootstrap devnet
run: |
set -e
docker run aztecprotocol/aztec:${{ env.DEPLOY_TAG }} bootstrap-devnet \
--rpc-url https://api.aztec.network/${{ env.DEPLOY_TAG }}/aztec-pxe/${{ secrets.FORK_API_KEY }} \
--l1-rpc-url https://${{ env.DEPLOY_TAG }}-mainnet-fork.aztec.network:8545/${{ secrets.FORK_API_KEY }} \
Expand Down Expand Up @@ -225,14 +246,15 @@ jobs:

- name: Retrieve contract addresses
run: |
set -e
aws s3 cp ${{ env.CONTRACT_S3_BUCKET }}/l1_contract_addresses.json ./l1-contract_addresses.json
aws s3 cp ${{ env.CONTRACT_S3_BUCKET }}/devnet-contracts.json ./devnet-contracts.json

echo "TF_VAR_GAS_TOKEN_CONTRACT_ADDRESS=$(jq -r '.gasTokenAddress' ./l1-contract_addresses.json)" >>$GITHUB_ENV
echo "TF_VAR_DEV_COIN_CONTRACT_ADDRESS=$(jq -r '.devCoinL1' ./devnet-contracts.json)" >>$GITHUB_ENV

- name: Deploy Faucet
working-directory: ./yarn-project/aztec/aztec-faucet
working-directory: ./yarn-project/aztec-faucet
run: |
terraform init -input=false -backend-config="key=${{ env.DEPLOY_TAG }}/aztec-faucet"
terraform apply -input=false -auto-approve
127 changes: 127 additions & 0 deletions .github/workflows/metrics-deploys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Deploy metrics
on:
push:
branches: [devnet]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
GIT_COMMIT: ${{ github.sha }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# TF Vars
TF_VAR_DOCKERHUB_ACCOUNT: aztecprotocol
TF_VAR_GRAFANA_CLIENT_ID: ${{ secrets.GRAFANA_CLIENT_ID }}
TF_VAR_GRAFANA_CLIENT_SECRET: ${{ secrets.GRAFANA_CLIENT_SECRET }}
TF_VAR_IMAGE_TAG: ${{ github.sha }}

jobs:
setup:
uses: ./.github/workflows/setup-runner.yml
with:
username: master
runner_type: builder-x86
secrets: inherit
build:
needs: setup
runs-on: ${{ github.actor }}-x86
steps:
- uses: actions/checkout@v4
with:
ref: "${{ env.GIT_COMMIT }}"
fetch-depth: 0
- uses: ./.github/ci-setup-action
with:
concurrency_key: build-metrics-${{ github.actor }}
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"

- name: Check if metrics have changed
id: check_metrics_changes
uses: actions/github-script@v7
with:
script: |
const { execSync } = require('child_process');
const changedFiles = execSync('git diff --name-only ${{ github.event.before }} ${{ github.sha }}').toString().split('\n');
const fileChanged = changedFiles.some(file => file.startsWith('metrics'));
return fileChanged

- name: Build & push prometheus
working-directory: ./metrics/prometheus
if: steps.check_metrics_changes.outputs.result == 'true'
run: |
docker build -t aztecprotocol/aztec-prometheus .
docker tag aztecprotocol/aztec-prometheus aztecprotocol/aztec-prometheus:$GIT_COMMIT
docker push aztecprotocol/aztec-prometheus
docker push aztecprotocol/aztec-prometheus:$GIT_COMMIT

- name: Build & push grafana
working-directory: ./metrics/grafana
if: steps.check_metrics_changes.outputs.result == 'true'
run: |
docker build -t aztecprotocol/aztec-grafana .
docker tag aztecprotocol/aztec-grafana aztecprotocol/aztec-grafana:$GIT_COMMIT
docker push aztecprotocol/aztec-grafana
docker push aztecprotocol/aztec-grafana:$GIT_COMMIT

- name: Build & push open telemetry
working-directory: ./metrics/otel
if: steps.check_metrics_changes.outputs.result == 'true'
run: |
docker build -t aztecprotocol/aztec-otel .
docker tag aztecprotocol/aztec-otel aztecprotocol/aztec-otel:$GIT_COMMIT
docker push aztecprotocol/aztec-otel
docker push aztecprotocol/aztec-otel:$GIT_COMMIT

terraform_deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
ref: "${{ env.GIT_COMMIT }}"
fetch-depth: 0
- uses: ./.github/ci-setup-action
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.7.5

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

- name: Check if metrics have changed
id: check_metrics_changes
uses: actions/github-script@v7
with:
script: |
const { execSync } = require('child_process');
const changedFiles = execSync('git diff --name-only ${{ github.event.before }} ${{ github.sha }}').toString().split('\n');
const fileChanged = changedFiles.some(file => file.startsWith('metrics'));
return fileChanged

- name: Deploy prometheus
working-directory: ./metrics/prometheus/terraform
if: steps.check_metrics_changes.outputs.result == 'true'
run: |
terraform init -input=false -backend-config="key=aztec-prometheus"
terraform apply -input=false -auto-approve

- name: Deploy grafana
working-directory: ./metrics/grafana/terraform
if: steps.check_metrics_changes.outputs.result == 'true'
run: |
terraform init -input=false -backend-config="key=aztec-grafana"
terraform apply -input=false -auto-approve

- name: Deploy open telemetry
working-directory: ./metrics/otel/terraform
if: steps.check_metrics_changes.outputs.result == 'true'
run: |
terraform init -input=false -backend-config="key=aztec-otel"
terraform apply -input=false -auto-approve
12 changes: 6 additions & 6 deletions barretenberg/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = f5b9be0eb29d7d1a7f202cb075f892552ab151c5
parent = 840486e5ce6b41d6c873239de108b3731dd81101
method = merge
cmdver = 0.4.6
remote = https://github.com/AztecProtocol/barretenberg
branch = master
commit = f5b9be0eb29d7d1a7f202cb075f892552ab151c5
parent = 840486e5ce6b41d6c873239de108b3731dd81101
method = merge
cmdver = 0.4.6
4 changes: 4 additions & 0 deletions metrics/grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM grafana/grafana:9.3.2
COPY grafana.ini /etc/grafana/grafana.ini
USER root
EXPOSE 80
Loading
Loading