From 33bccaab19648b0b13c21ce0f25eea2603e6d903 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 6 Feb 2024 10:47:54 -0800 Subject: [PATCH 1/2] Make config path configurable Add environment variable FULCIO_CONFIG to allow providing an alternate configuration file rather than overwriting the default one. If a testing environment overwrote the git-committed config/config.jsn, it would pollute the repository checkout and be difficult to reuse on subsequent test runs. Signed-off-by: Colleen Murphy --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 49feb8c8d..124a9ec5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,7 @@ services: - "${FULCIO_METRICS_PORT:-2112}:2112" volumes: - ~/.config/gcloud:/root/.config/gcloud/:z # for GCP authentication - - ./config/config.jsn:/etc/fulcio-config/config.json:z + - ${FULCIO_CONFIG:-./config/config.jsn}:/etc/fulcio-config/config.json:z healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5555/healthz"] interval: 10s From 41f9b9e78aedb9c1d92d1571ef364b7912253a12 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 6 Feb 2024 10:49:41 -0800 Subject: [PATCH 2/2] Add persistent volume for mysql The ctfe_init container uses a persistent volume to store the tree head ID among other things from previous runs. However, the mysql container is not guaranteed to reuse the same data directory when it is destroyed and recreated, so it may come up empty. When this happens, but the CT log is configured for an existing tree, then signing objects will fail with a Not Found error. This change adds a persistent volume to the docker-compose file for mysql so that the database can live on and be consistent with the CT log's configuration. Signed-off-by: Colleen Murphy --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 124a9ec5b..cee2a6410 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -109,6 +109,8 @@ services: timeout: 3s retries: 3 start_period: 10s + volumes: + - mysql:/var/lib/mysql trillian-log-server: image: gcr.io/trillian-opensource-ci/log_server command: [ @@ -141,3 +143,4 @@ services: - mysql volumes: ctfeConfig: {} + mysql: {}