Topic 1 Question 273
You are creating the CI/CD cycle for the code of the directed acyclic graphs (DAGs) running in Cloud Composer. Your team has two Cloud Composer instances: one instance for development and another instance for production. Your team is using a Git repository to maintain and develop the code of the DAGs. You want to deploy the DAGs automatically to Cloud Composer when a certain tag is pushed to the Git repository. What should you do?
- Use Cloud Build to copy the code of the DAG to the Cloud Storage bucket of the development instance for DAG testing.
- If the tests pass, use Cloud Build to copy the code to the bucket of the production instance.
- Use Cloud Build to build a container with the code of the DAG and the KubernetesPodOperator to deploy the code to the Google Kubernetes Engine (GKE) cluster of the development instance for testing.
- If the tests pass, use the KubernetesPodOperator to deploy the container to the GKE cluster of the production instance.
- Use Cloud Build to build a container and the KubernetesPodOperator to deploy the code of the DAG to the Google Kubernetes Engine (GKE) cluster of the development instance for testing.
- If the tests pass, copy the code to the Cloud Storage bucket of the production instance.
- Use Cloud Build to copy the code of the DAG to the Cloud Storage bucket of the development instance for DAG testing.
- If the tests pass, use Cloud Build to build a container with the code of the DAG and the KubernetesPodOperator to deploy the container to the Google Kubernetes Engine (GKE) cluster of the production instance.
ユーザの投票
コメント(3)
- 正解だと思う選択肢: A
The Answer is A. Given that there are two instances (development and production) already available, and the goal is to deploy DAGs to Cloud Composer not entire composer infra build.
Explanation:
- This approach leverages Cloud Build to manage the deployment process.
- It first deploys the code to the Cloud Storage bucket of the development instance for testing purposes.
- If the tests are successful in the development environment, the same Cloud Build process is used to copy the code to the Cloud Storage bucket of the production instance.
B. GKE-based approach is not standard for Cloud Composer. C. GKE used for testing is unconventional for DAG deployments. D. Involves unnecessary GKE deployment for production. Testing DAGs should use Composer instances directly, not Kubernetes containers in GKE.
👍 2BIGQUERY_ALT_ALT2024/01/11 - 正解だと思う選択肢: A
This approach is straightforward and leverages Cloud Build to automate the deployment process. It doesn't require containerization, making it simpler and possibly quicker.
👍 1Smakyel792024/01/07 C. It looks the correct choice, first build, test and verify everything on dev enviornment and then just copy the files on prod bucket. https://cloud.google.com/composer/docs/dag-cicd-integration-guide
👍 1GCP0012024/01/07
シャッフルモード