A software development team is building a microservices-based event processing application on Google Cloud that relies heavily on Cloud Pub/Sub and Cloud Datastore. The team leads report high Google Cloud charges during early development iterations and security risks due to developers creating service account keys on their local workstations to authenticate against live Cloud resources during local testing. As a Cloud Architect advising the development and operations teams, which TWO actions should you recommend to establish a secure, cost-effective local development and integration testing workflow?
- Advise developers to run Cloud Pub/Sub and Datastore local emulators on their workstations for local unit and integration testing.Cevap
- Configure local environment variables to point application client libraries to the local emulator endpoints instead of live Google Cloud API endpoints.Cevap
- CGenerate long-lived JSON service account keys with the Project Owner role and commit them into the shared Git repository for developer convenience.
- DGrant every developer the Editor role at the project level so they can dynamically provision cloud resources whenever tests run.
- EGrant developers the Service Account Admin role on the project to allow automated creation of temporary service accounts during local test execution.
Cevap
The development and operations teams should be advised to run Cloud Pub/Sub and Cloud Datastore local emulators on developer workstations and configure local environment variables to direct client libraries to the emulator endpoints.
Recommending Google Cloud local emulators allows developers to perform fast, isolated integration testing locally on their workstations without incurring live cloud consumption charges or requiring service account keys. Redirecting Google Cloud client libraries via environment variables ensures that application code remains environment-agnostic without requiring code changes.
Adım Adım Çözüm
Anahtar Kavram
Advising Development and Operation Teams on Local Emulators and Environment Workflows