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 this. (Please refer
here in order to understand the basic configuration required to create .yaml deployment configuration)
.yaml file contains the configuration for the VM Instance like VM Name, Type, Zone, Machine Type, etc. as shown in the below image.
Once everything is configured, mydeploy.yaml will look like as shown below:
Step 4
Run the below command in the 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 has 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.
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.
Monitoring of Google Cloud Services
Step 1
Click on the Overview submenu of the Monitoring menu.
Then click on View GCE Dashboard as shown in the below image,
Check Monitoring Agent Status, in case it's not detected, Install Agent by clicking on the Install Agent button.
You can track CPU Utilization, received & send bytes, etc.
I hope this article will help you in getting the basic understanding of Deployment Manager and Monitoring tools in Google Cloud Platform.
Thanks.