Skip to content

Conversation

@glasnt
Copy link
Collaborator

@glasnt glasnt commented Jul 19, 2023

Replaces compute engine and associated resources with a data "http" call to the Cloud Run API

Requires moving the logic from the metadata startup scripts to within the containers for placeholder, and a new container for init. Uses the same permissions, only the service account has renamed to reflect the usage.

Merge blocked on:

  • updating the containers.tf to reference the latest images (manually created:postjsscurl tagged images used while testing)
  • confirming functionality
  • removing any compute engine APIs/permissions based on removed resources (without removing infra-required APIs)

Lint issues:

  • Warning: data "http" "execute_placeholder_job" is declared but not used (terraform_unused_declarations)
  • Warning: data "http" "execute_init_job" is declared but not used (terraform_unused_declarations)
  • Warning: variable "zone" is declared but not used (terraform_unused_declarations)

Build failures:

  • Cannot delete job 'placeholder-eca5' because there are 1 execution(s) of the job running. (started after reading data.http.execute_placeholder_job)
  • Cannot delete job 'init-eca5' because there are 1 execution(s) of the job running. (started after reading data.http.execute_init_job)

Copy link
Contributor

@grayside grayside left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial questions pass, more a part of design exploration than code review.

gcloud run jobs execute "$SETUP_JOB" --wait --project "$PROJECT_ID" --region "$REGION"

echo "Running client deploy..."
gcloud run jobs execute "$CLIENT_JOB" --wait --project "$PROJECT_ID" --region "$REGION"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this exit with a non-zero status code on failure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it fires https://github.com/GoogleCloudPlatform/avocano/blob/main/client/docker-deploy.sh so in theory yes, if a failed firebase command returns the correct exit code.

@glasnt
Copy link
Collaborator Author

glasnt commented Jul 21, 2023

Closing in favor of #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants