You are tasked with deploying a Python-based microservice to Google Cloud Functions (2nd gen) using the gcloud command-line interface. Arrange the deployment workflow steps into the correct chronological order from start to finish.
- 1Enable the required Google Cloud APIs, including the Cloud Functions API and Cloud Build API.
- 2Prepare the source code (main.py) and dependencies file (requirements.txt) in the local working directory.
- 3Run the gcloud functions deploy command specifying the function name, runtime, trigger, and entry point.
- 4Test the function by invoking its generated HTTPS endpoint URL to verify successful execution.
Cevap
The correct chronological sequence is: first, enable the required APIs; second, prepare local application files; third, execute the gcloud functions deploy command; fourth, test the deployed HTTPS endpoint.
Deploying serverless workloads on Google Cloud follows a standard linear lifecycle: project API enablement precedes local source code creation, followed by deploying via the gcloud CLI, and concluding with endpoint functional testing.
Adım Adım Çözüm
Anahtar Kavram
Cloud Functions Deployment Workflow