File tree 4 files changed +20
-6
lines changed
deployment/modules/gcp/cloudbuild
4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -65,18 +65,21 @@ resource "google_cloudbuild_trigger" "preloader_trigger" {
65
65
# # TODO(phboneff): move to its own container / cloudrun / batch job.
66
66
# # Preload entries.
67
67
# # Leave enough time for the preloader to run, until the token expires.
68
+ # # Stop after 40k entries, this is what gets copied within 60 minutes.
68
69
timeout = " 4200s" // 60 minutes
69
70
step {
70
71
id = " ct_preloader"
71
72
name = " golang"
72
73
script = << EOT
73
- START_INDEX=$(curl -H "Authorization: Bearer $(cat /workspace/cb_access)" https://storage.googleapis.com/${ var . monitoring_url } /checkpoint | head -2 | tail -1)
74
- echo "Will start preloader at index $START_INDEX"
74
+ START_INDEX=$(curl -H "Authorization: Bearer $(cat /workspace/cb_access)" ${ var . monitoring_url } /checkpoint | head -2 | tail -1)
75
+ END_INDEX=$(($START_INDEX+400000))
76
+ echo "Will run preloader between $START_INDEX and $END_INDEX"
75
77
go run github.com/google/certificate-transparency-go/preload/preloader@master \
76
78
--target_log_uri=${ var . submission_url } / \
77
79
--target_bearer_token="$(cat /workspace/cb_identity)" \
78
- --source_log_uri=https://ct.googleapis.com/logs/us1/argon2025h1 \
80
+ --source_log_uri=${ var . source_log_uri } \
79
81
--start_index=$START_INDEX \
82
+ --end_index=$END_INDEX \
80
83
--num_workers=20 \
81
84
--parallel_fetch=20 \
82
85
--parallel_submit=20
Original file line number Diff line number Diff line change @@ -24,11 +24,16 @@ variable "github_owner" {
24
24
}
25
25
26
26
variable "submission_url" {
27
- description = " Submission URL of the destination log"
27
+ description = " Submission URL of the destination static-ct-api log"
28
28
type = string
29
29
}
30
30
31
31
variable "monitoring_url" {
32
- description = " Monitoring URL of the destination log"
32
+ description = " Monitoring URL of the destination static-ct-api log"
33
+ type = string
34
+ }
35
+
36
+ variable "source_log_uri" {
37
+ description = " URL of the source RFC6962 log"
33
38
type = string
34
39
}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ resource "google_cloudbuild_trigger" "build_trigger" {
133
133
id = " terraform_apply_preloader"
134
134
name = " alpine/terragrunt"
135
135
script = << EOT
136
- terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color -var="submission_url=$(cat /workspace/conformance_url)/arche2025h1.ct.transparency.dev/" -var="monitoring_url=$(cat /workspace/conformance_bucket_name)" 2>&1
136
+ terragrunt --terragrunt-non-interactive --terragrunt-no-color apply -auto-approve -no-color -var="submission_url=$(cat /workspace/conformance_url)/arche2025h1.ct.transparency.dev/" -var="monitoring_url=https://storage.googleapis.com/ $(cat /workspace/conformance_bucket_name)" 2>&1
137
137
EOT
138
138
dir = " deployment/live/gcp/static-ct-staging/cloudbuild/preloader"
139
139
env = [
@@ -144,6 +144,7 @@ resource "google_cloudbuild_trigger" "build_trigger" {
144
144
" TF_VAR_location=${ var . location } " ,
145
145
" TF_VAR_env=${ var . env } " ,
146
146
" TF_VAR_github_owner=${ var . github_owner } " ,
147
+ " TF_VAR_source_log_uri=${ var . source_log_uri } " ,
147
148
]
148
149
wait_for = [" terraform_apply_conformance_staging" ]
149
150
}
Original file line number Diff line number Diff line change @@ -22,3 +22,8 @@ variable "github_owner" {
22
22
description = " GitHub owner used in Cloud Build trigger repository mapping"
23
23
type = string
24
24
}
25
+
26
+ variable "source_log_uri" {
27
+ description = " URL of the source RFC6962 log to be preloaded."
28
+ type = string
29
+ }
You can’t perform that action at this time.
0 commit comments