In this article, we will learn How to use the Deployment Manager to deploy VM Instance as well as monitor them in the Google Cloud Platform. If you are new to this series of Google Cloud Platform, I will recommend you to go through the below articles of this series:
Setting Up LAMP Certified by Bitnami In Google Cloud Platform
Create Virtual Machine Instance in Compute Engine in The Google Cloud Platform
Create a storage bucket in Google Cloud Platform
Getting Started with Cloud SQL in Google Cloud Platform
Working Up With Google Kubernetes Engine In Google Cloud Platform
Let’s Begin:
Step 1:
Log in to the Google Cloud Platform by visiting https://console.cloud.google.com/ (Google provides $300 as a free trial, but for that, you need to link your credit card).
Step 2:
Go to APIs & Services, And Click on Dashboard
Make sure Cloud Deployment Manager V2 API, Cloud Runtime Configuration, Stack Driver Monitoring API (If you want to monitor, troubleshoot & improve application performance on your Google Cloud)
Step 3:
Click on the Google Cloud Shell icon and Create a .yaml file (named It as mydeploy.yaml). You can use nano editor in order to do the same. (Please refer to https://cloud.google.com/deployment-manager/docs/configuration/create-basic-configuration link in order to understand the basic configuration required to create .yaml deployment configuration)
Step 4:
Run the below command in google cloud shell as mentioned below:
gcloud deployment-manager deployments create my-first-depl –config mydeploy.yaml
--config flag is the relative path to your yaml configuration file. Once the above command executed successfully, a list with the resource name mentioned in the yaml file and its state will be shown to the user. We can also check the VM Instances in the Compute Engine menu as shown in the below image.
Step: 5
Click on the VM Instance Name, Check the Startup-Script section.
Let’s edit the startup-scripts in the deployment.yaml config file as shown in the below image:
Run the below command in order to update the deployment/VM instance
gcloud deployment-manager deployments update my-first-depl –config mydeply.yaml
Once updated, Visit the VM Instance again, you will see that startup-script under the custom-metadata section is also updated.
Step 1:
Click on the Overview submenu of the Monitoring menu.
Then click on View GCE Dashboard as shown in the below image:I hope this will article help you in getting the basic understanding of Deployment Manager and Monitoring tools in Google Cloud Platform.
Thanks
0 comments:
Post a Comment