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
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 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 :),
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.
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, 6 months agostepkurniawan
4 years, 5 months agoJohnnieWalker
3 years, 7 months ago[Removed]
4 years, 5 months agomagistrum
4 years, 1 month agogcpengineer
3 years, 6 months agopYWORLD
3 years, 6 months agoashrafh
3 years, 6 months agoSSPC
Highly Voted 4 years, 6 months agoAmitKM
4 years, 5 months agomagistrum
4 years, 1 month agoQjb8m9h
Most Recent 5 days, 21 hours agoyomi95
3 months, 3 weeks agoBuenaCloudDE
7 months, 1 week agoCynthia2023
1 year, 1 month agoCynthia2023
1 year, 1 month agosara11190
1 year, 4 months agoCaptain1212
1 year, 5 months agopritampanda1988
1 year, 6 months agoPraxii
1 year, 9 months agoSK1990
2 years, 1 month agodavidsalomon
2 years, 2 months agoKopy
2 years, 3 months agodiasporabro
2 years, 4 months agoAwesomeGCP
2 years, 4 months agoKapilDhamija
2 years, 6 months agotomis2
2 years, 7 months ago