-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
151 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Deploy to devnet | ||
on: | ||
push: | ||
branches: [devnet] | ||
|
||
env: | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
GIT_COMMIT: ${{ github.sha }} | ||
# TF Vars | ||
TF_VAR_DOCKERHUB_ACCOUNT: aztecprotocol | ||
TF_VAR_CHAIN_ID: 31337 | ||
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_DEPLOY_TAG: devnet | ||
TF_VAR_API_KEY: ${{ secrets.FORK_API_KEY }} | ||
|
||
jobs: | ||
setup: | ||
uses: ./.github/workflows/setup-runner.yml | ||
with: | ||
username: master | ||
runner_type: builder-x86 | ||
secrets: inherit | ||
|
||
build: | ||
runs-on: ${{ github.actor }}-x86 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}" | ||
concurrency_key: build-release-artifacts-${{ github.actor }} | ||
- name: "Build & Push images" | ||
timeout-minutes: 40 | ||
# Run the build steps for each image with version and arch, push to dockerhub | ||
run: | | ||
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=devnet | ||
terraform_deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- 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: us-west-2 | ||
|
||
- name: Deploy Bootstrap Nodes | ||
working-directory: ./yarn-project/aztec/terraform/node | ||
run: | | ||
terraform init -input=false -backend-config="key=devnet/aztec-node" | ||
terraform apply -input=false -auto-approve | ||
- name: Deploy Aztec Nodes | ||
working-directory: ./yarn-project/aztec/terraform/node | ||
run: | | ||
terraform init -input=false -backend-config="key=devnet/aztec-node" | ||
terraform apply -input=false -auto-approve |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
VERSION 0.8 | ||
|
||
build: | ||
FROM ubuntu:focal | ||
|
||
# Install nginx | ||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | ||
RUN apt-get update && apt install -y git curl nginx | ||
|
||
# Copy nginx config | ||
COPY . . | ||
COPY nginx/gateway.conf /etc/nginx/gateway.conf | ||
COPY nginx/nginx.conf /etc/nginx/nginx.conf | ||
|
||
# Install foundry | ||
RUN ./scripts/install_foundry.sh | ||
ENV PATH="./foundry/bin:${PATH}" | ||
|
||
# Expose port 80 | ||
EXPOSE 80 | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["sh", "-c", "./scripts/run_nginx_anvil.sh"] | ||
|
||
export-mainnet-fork: | ||
FROM +build | ||
ARG DIST_TAG="aztec-dev" | ||
ARG ARCH | ||
SAVE IMAGE --push spypsy/mainnet-fork:${DIST_TAG}${ARCH:+-$ARCH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ http { | |
# Basic Settings | ||
## | ||
|
||
client_max_body_size 20M; | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters