Terraform deployment: `stats-puller` fails, missing `KEY_SERVER_URL` value
krazykid opened this issue · comments
Question
I'm trying to deploy the verification server with terraform and it errors out with the following error:
google_cloud_run_service.stats-puller: Still creating... [10s elapsed]
Error: Error waiting to create Service: resource is in failed state "Ready:False", message: Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information.
Logs URL:
https://console.cloud.google.com/logs/viewer?project=ma-verification-qvtby51btd&resource=cloud_run_revision/service_name/stats-puller/revision_name/stats-puller-jd2v6&advancedFilter=resource.type%3D%22cloud_run_revision%22%0Aresource.labels.service_name%3D%22stats-puller%22%0Aresource.labels.revision_name%3D%22stats-puller-jd2v6%22
I looked at the Cloud Run console and the service logs, and see the following:
and:
I'm not sure where or how to set this value (environment variable? TF var?). Or what its value should be. Any help would be greatly appreciated.
You can set the environment variable in Terraform. If you're using a module, for example
service_environment = {
stats-puller = {
KEY_SERVER_URL = "https://exposure.key.apollo-project.org"
}
}
Specifically this environment variable points to the location of the associated key-server which Verification can use to retrieve statistics about code publish. This URL is set on the server, but each realm must opt-in via realm settings for it to be active. The variable is marked required
with no default value, but if you are just testing and don't intend to pull key-server statistics, you could put any string value in (although that service would fail if any realm opts in).
I'll find a spot to add this to documentation.
@whaught, I'm sorry, but I still don't track what you mean by the key-server
. Is this the server
Cloud Run service in exposure-notifications-verification-server
Cloud Run stack? Or is it a service in exposure-notifications-server
Cloud Run stack?
Thank you for your patience.
KEY_SERVER_URL is an environment variable of the stats-puller
service of exposure-notifications-verification-server
. It should point to a corresponding exposure-notifications-server
from which it may gather statistics.
@krazykid - the KEY_SERVER_URL should point to the exposure
service on the exposure-notifications-server
Thanks all!