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

DATA-1181:Add config for imtbl zkevm mainnet #5

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ENV FLEX_TEMPLATE_JAVA_CLASSPATH=/template/*
ENV FLEX_TEMPLATE_JAVA_MAIN_CLASS=io.blockchainetl.ethereum.EthereumPubSubToBigQueryPipeline

COPY target/blockchain-etl-dataflow-bundled-0.1.jar /template/
COPY chain-config/blockchain_zkevm_imtbl_testnet_${env}.json /template/
COPY chain-config/blockchain_*_${env}.json /template/
8 changes: 8 additions & 0 deletions chain-config/blockchain_zkevm_imtbl_mainnet_dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"transformNamePrefix": "blockchain_zkevm_imtbl_mainnet_",
"pubSubSubscriptionPrefix": "projects/dev-im-data/subscriptions/blockchain-zkevm-imtbl-mainnet-dataflow",
"bigQueryDataset": "raw_blockchain_zkevm_imtbl_mainnet",
"startTimestamp": "2019-03-02T00:00:00Z"
}
]
8 changes: 8 additions & 0 deletions chain-config/blockchain_zkevm_imtbl_mainnet_prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"transformNamePrefix": "blockchain_zkevm_imtbl_mainnet_",
"pubSubSubscriptionPrefix": "projects/prod-im-data/subscriptions/blockchain-zkevm-imtbl-mainnet-dataflow",
"bigQueryDataset": "raw_blockchain_zkevm_imtbl_mainnet",
"startTimestamp": "2019-03-02T00:00:00Z"
}
]
27 changes: 27 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,31 @@ resource "google_dataflow_flex_template_job" "flex_template_job" {
region=local.region
zone=local.zone
}
}


resource "google_dataflow_flex_template_job" "zkevm_imtbl_mainnet_job" {
provider = google-beta
project = "${terraform.workspace}-im-data"
name = "zkevm-imtbl-mainnet-etl-dataflow-${formatdate("YYYYMMDD-hhmmss", timestamp())}"
region = local.region
skip_wait_on_job_termination = true
container_spec_gcs_path = "gs://${google_storage_bucket_object.blockchain_etl_dataflow.bucket}/${google_storage_bucket_object.blockchain_etl_dataflow.name}"
on_delete = "drain"


parameters = {
chainConfigFile = "/template/blockchain_zkevm_imtbl_mainnet_${terraform.workspace}.json"
allowedTimestampSkewSeconds = "5184000"
gcpTempLocation = "gs://${terraform.workspace}-im-data-imx-resource/ethereum-etl/zkevm-imtbl-mainnet-streaming/temp"
tempLocation = "gs://${terraform.workspace}-im-data-imx-resource/ethereum-etl/zkevm-imtbl-mainnet-streaming/temp"
project = "${terraform.workspace}-im-data"
runner = "DataflowRunner"
workerMachineType = "n1-standard-1"
maxNumWorkers = 1
diskSizeGb=30
enableStreamingEngine=true
region=local.region
zone=local.zone
}
}
6 changes: 5 additions & 1 deletion terraform/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.0.0"
version = "~> 4.82.0, < 5.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.82.0, < 5.0.0"
}
}
provider_meta "google" {
Expand Down
Loading