-
Notifications
You must be signed in to change notification settings - Fork 6
arche2025h2 configs #303
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
Merged
Merged
arche2025h2 configs #303
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e3756a3
arche2025h2
phbnf 4840312
redit README.md for arche2025h2
phbnf 46f3c22
add preloader and cloudbuild config
phbnf 39f764d
make log terragrunt config a var
phbnf 6d0aa95
preloader named with docker_env
phbnf 1fafd90
split preloader config into two logs
phbnf c53011b
organize cloudbuild config
phbnf 898dd27
remove cloudbuild from preloader tf bucket
phbnf 6b51041
use docker_env in trigger name
phbnf 954d4e2
rename docker_env to base_name
phbnf bd5ef86
give multiple tesseract tf to cloudbuild
phbnf 446c82d
move cloudbuild/arche2025h1/ to tesseact/
phbnf d00c07a
update tesseract/README.md
phbnf 7f356b5
delete arche2025h2 dir
phbnf 025671c
docker --> Docker
phbnf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 0 additions & 30 deletions
30
deployment/live/gcp/static-ct-staging/cloudbuild/arche2025h1/terragrunt.hcl
This file was deleted.
Oops, something went wrong.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
deployment/live/gcp/static-ct-staging/cloudbuild/preloader/arche2025h1/terragrunt.hcl
This file contains hidden or 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,18 @@ | ||
terraform { | ||
source = "${get_repo_root()}/deployment/modules/gcp//cloudbuild/preloader" | ||
} | ||
|
||
locals { | ||
source_log_uri = "https://ct.googleapis.com/logs/us1/argon2025h1" | ||
} | ||
|
||
include "root" { | ||
path = find_in_parent_folders() | ||
expose = true | ||
} | ||
|
||
inputs = merge( | ||
local, | ||
include.root.locals, | ||
) | ||
|
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
deployment/live/gcp/static-ct-staging/cloudbuild/preloader/arche2025h2/terragrunt.hcl
This file contains hidden or 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,18 @@ | ||
terraform { | ||
source = "${get_repo_root()}/deployment/modules/gcp//cloudbuild/preloader" | ||
} | ||
|
||
locals { | ||
source_log_uri = "https://ct.googleapis.com/logs/us1/argon2025h2" | ||
} | ||
|
||
include "root" { | ||
path = find_in_parent_folders() | ||
expose = true | ||
} | ||
|
||
inputs = merge( | ||
local, | ||
include.root.locals, | ||
) | ||
|
15 changes: 4 additions & 11 deletions
15
deployment/live/gcp/static-ct-staging/cloudbuild/preloader/terragrunt.hcl
This file contains hidden or 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
22 changes: 22 additions & 0 deletions
22
deployment/live/gcp/static-ct-staging/cloudbuild/tesseract/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
31 changes: 31 additions & 0 deletions
31
deployment/live/gcp/static-ct-staging/cloudbuild/tesseract/terragrunt.hcl
This file contains hidden or 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,31 @@ | ||
terraform { | ||
source = "${get_repo_root()}/deployment/modules/gcp//cloudbuild/tesseract" | ||
} | ||
|
||
locals { | ||
env = get_env("GOOGLE_ENV", "staging") | ||
docker_env = get_env("GOOGLE_ENV", "staging") | ||
project_id = get_env("GOOGLE_PROJECT", "static-ct-staging") | ||
location = get_env("GOOGLE_REGION", "us-central1") | ||
github_owner = get_env("GITHUB_OWNER", "transparency-dev") | ||
logs_terragrunts = ["deployment/live/gcp/static-ct-staging/logs/arche2025h1", "deployment/live/gcp/static-ct-staging/logs/arche2025h2"] | ||
} | ||
|
||
inputs = local | ||
|
||
remote_state { | ||
backend = "gcs" | ||
|
||
config = { | ||
project = local.project_id | ||
location = local.location | ||
bucket = "${local.project_id}-cloudbuild-terraform-state" | ||
prefix = "terraform.tfstate" | ||
|
||
gcs_bucket_labels = { | ||
name = "terraform_state" | ||
env = "${local.env}" | ||
} | ||
} | ||
} | ||
|
39 changes: 39 additions & 0 deletions
39
deployment/live/gcp/static-ct-staging/logs/arche2025h2/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
deployment/live/gcp/static-ct-staging/logs/arche2025h2/README.md
This file contains hidden or 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,62 @@ | ||
# Arche2025h2 staging log | ||
|
||
## Overview | ||
|
||
This config uses the [gcp/tesseract/cloudrun](/deployment/modules/gcp/tesseract/cloudrun) module to | ||
run TesseraCT on Cloud Run, backed by Trillian Tessera and preloaded with argon2025h2 entries. | ||
|
||
### Update the roots | ||
Run the following command from the root of the repository. | ||
|
||
It fetches roots from argon2025h2, and filters out roots that don't parse with `crypto/x509` and `internal/lax509`. | ||
As of 2025-03-21, these roots are: | ||
- https://crt.sh/?id=298, with a negative serial number | ||
- https://crt.sh/?id=9027356, affected by https://github.com/golang/go/issues/69463. | ||
|
||
``` | ||
go run github.com/google/certificate-transparency-go/client/ctclient@master get-roots --log_uri=https://ct.googleapis.com/logs/us1/argon2025h2/ --text=false | \ | ||
awk \ | ||
'/-----BEGIN CERTIFICATE-----/{c=1; pem=$0; show=1; next} | ||
c{pem=pem ORS $0} | ||
/-----END CERTIFICATE-----/{c=0; if(show) print pem} | ||
($0=="MIIFxDCCBKygAwIBAgIBAzANBgkqhkiG9w0BAQUFADCCAUsxGDAWBgNVBC0DDwBT"||$0=="MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB"){show=0}' \ | ||
> deployment/live/gcp/static-ct-staging/logs/arche2025h2/roots.pem | ||
``` | ||
|
||
|
||
### Automatic Deployment | ||
This GCP SCTFE preloaded staging environment is designed to be deployed by the Cloud Build ([Terraform module](/deployment/modules/gcp/cloudbuild/tesseract/), [Terragrunt configuration](/deployment/live/gcp/static-ct-staging/cloudbuild/arche2025h2/)). | ||
|
||
### Manual Deployment | ||
TODO(phboneff): come back to this, Cloud Run doesn't trigger a deployment if the tag does not change value. | ||
|
||
First authenticate via `gcloud` as a principle with sufficient ACLs for | ||
the project: | ||
|
||
```sh | ||
gcloud auth application-default login | ||
``` | ||
|
||
Set the required environment variables: | ||
|
||
```sh | ||
export GOOGLE_PROJECT={VALUE} | ||
export GOOGLE_REGION={VALUE} # e.g: us-central1 | ||
unset TESSERA_BASE_NAME | ||
``` | ||
|
||
You need an Artifact Registry repository to store container images; adapt the configs and commands below to use your registry of choice. The rest of these instructions assume that the repository is hosted on GCP, and called `${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-staging`. For reference, here's a [terraform module](/deployment/modules/gcp/artifactregistry/) you can use to set up such a registry. | ||
|
||
Build and push the Docker image to Artifact Registry repository: | ||
|
||
```sh | ||
gcloud auth configure-docker ${GOOGLE_REGION}-docker.pkg.dev | ||
docker build -f ./cmd/gcp/Dockerfile -t tesseract-gcp:latest . | ||
docker build -f ./cmd/gcp/staging/Dockerfile -t conformance-gcp:latest . | ||
docker tag conformance-gcp:latest ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-staging/conformance-gcp:latest | ||
docker push ${GOOGLE_REGION}-docker.pkg.dev/${GOOGLE_PROJECT}/docker-staging/conformance-gcp | ||
``` | ||
|
||
Terraforming the project can be done by: | ||
1. `cd` to [/deployment/live/gcp/static-ct-staging/logs/arche2025h2/](/deployment/live/gcp/static-ct-staging/logs/arche2025h2/). | ||
2. Run `terragrunt apply`. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.