Your team maintains the infrastructure for your organization. The current infrastructure requires changes. You need to share your proposed changes with the rest of the team. You want to follow Google's recommended best practices. What should you do?
A.
Use Deployment Manager templates to describe the proposed changes and store them in a Cloud Storage bucket.
B.
Use Deployment Manager templates to describe the proposed changes and store them in Cloud Source Repositories.
C.
Apply the changes in a development environment, run gcloud compute instances list, and then save the output in a shared Storage bucket.
D.
Apply the changes in a development environment, run gcloud compute instances list, and then save the output in Cloud Source Repositories.
Correct Answer is (A):
Connecting to Cloud Storage buckets
Cloud Storage is a flexible, scalable, and durable storage option for your virtual machine instances. You can read and write files to Cloud Storage buckets from almost anywhere, so you can use buckets as common storage between your instances, App Engine, your on-premises systems, and other cloud services.
https://cloud.google.com/compute/docs/disks/gcs-buckets
Why not (B)?
Caution
Cloud Source Repositories are intended to store only the source code for your app and not user or personal data. Don't store any Core App Engine Customer Data (as defined in your License Agreement) in Cloud Source Repositories.
https://cloud.google.com/source-repositories/docs/features
I agree with what are you saying, but the problem that you know how the deployment manager template looks? Is jinja/yaml file that means that are source code, so better to put them inside of an repository.
So, for my perpective I will go with the B.
maybe below link will help
https://cloud.google.com/deployment-manager/docs/configuration/templates/hosting-templates-externally
from that we can take a idea on deciding cloud storage or repo :),
you store the sensitive data NOT in the instance template, that is the current best practice. But you need version control like GIT or Google's GIT (Cloud Source Repo) to backup your code somehow and able to roll back if needed.
B is the answer. Deployment Manager Template can be written in either Jinja or Python, this is Infrastructure as Code (IaC) we are talking about here, same as AWS Cloudformation, or Terraform. Therefore, they should be stored on a git repository such as Google Cloud Source Repositories.
You can do all thing you are mentioning in the cloud store also. Ethically answer is cloud store as you are not dealing with a source file but a template. Again here the argument can go that config is also a part of the source so B answers. To make life easy let's call this template/config file as the proposal file, so the best way to share will be cloud store.
I don't see how you can do this when I tried creating:
Add code to your repository
info
Your repository is currently empty. Add some code using a selected method and then refresh your browser. Contents added to this repository can take some time to show up in search results. Learn more.
Select an option to push code to your repository:
Push code from a local Git repository
Clone your repository to a local Git repository
Effective June 17, 2024, Cloud Source Repositories isn't available to new customers. So only option is A for latest, (this question/answers might not be valid anymore)
https://cloud.google.com/source-repositories/docs
Effective June 17, 2024, Cloud Source Repositories isn't available to new customers. If your organization hasn't previously used Cloud Source Repositories, you can't enable the API or use Cloud Source Repositories. New projects not connected to an organization can't enable the Cloud Source Repositories API. Organizations that have used Cloud Source Repositories prior to June 17, 2024 are not affected by this change.
I think that the question does not exist already, or A is right answer
Use of Deployment Manager Templates:
Google Cloud Deployment Manager is a tool that allows you to automate the creation and management of Google Cloud resources. It uses templates written in YAML, Python, or Jinja2 to describe your resources and their configurations.
By using Deployment Manager templates, you can provide a clear, codified, and repeatable description of the proposed changes to your infrastructure.
Version Control and Collaboration:
Cloud Source Repositories provide managed and scalable Git repositories hosted on Google Cloud. Storing your Deployment Manager templates in a source repository enables version control, which is a best practice in software and infrastructure development.
This approach facilitates collaboration among team members, allowing for review, commenting, and history tracking of changes to the templates.
A. Store in Cloud Storage Bucket: While storing templates in a Cloud Storage bucket makes them accessible, it does not provide the benefits of version control and collaborative features offered by source control systems.
Option B (storing in Cloud Source Repositories) might be suitable for storing application code, but it's not the best practice for storing infrastructure configuration templates.
B is right .. Showing Deployment Manager templates to your team will allow you to define the changes you want to implement in your cloud infrastructure. You can use Cloud Source Repositories to store Deployment Manager templates and collaborate with your team. Cloud Source Repositories are fully-featured, scalable, and private Git repositories you can use to store, manage and track changes to your code.
Hence, the correct answer is: Create Deployment Manager templates to define the proposed changes and save them into Cloud Source Repositories.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ESP_SAP
Highly Voted 4 years, 3 months agogcpengineer
3 years, 4 months agopYWORLD
3 years, 4 months agoashrafh
3 years, 3 months agostepkurniawan
4 years, 3 months agoJohnnieWalker
3 years, 5 months ago[Removed]
4 years, 2 months agomagistrum
3 years, 11 months agoSSPC
Highly Voted 4 years, 3 months agoAmitKM
4 years, 3 months agomagistrum
3 years, 11 months agoyomi95
Most Recent 1 month agoBuenaCloudDE
4 months, 2 weeks agoCynthia2023
11 months agoCynthia2023
11 months agosara11190
1 year, 1 month agoCaptain1212
1 year, 2 months agopritampanda1988
1 year, 3 months agoPraxii
1 year, 7 months agoSK1990
1 year, 11 months agodavidsalomon
1 year, 11 months agoKopy
2 years agodiasporabro
2 years, 1 month agoAwesomeGCP
2 years, 1 month agoKapilDhamija
2 years, 3 months agotomis2
2 years, 4 months agoAzureDP900
2 years, 5 months ago