Batch - Increasing size of boot disk

I am creating jobs to submit to Batch through the python sdk. I am running a docker container on many instances. I would like to increase the boot disk size of each instance that runs the image. Is there a way to do this with instance templates while maintaining docker compatibility? Or is there just some option I can choose to increase the size of the boot disk? Thank you.

Solved Solved
0 3 1,462
3 ACCEPTED SOLUTIONS

This can be achieved via instance template of the python Batch API (here). Reference the response here.

View solution in original post

 
Welcome to Google Cloud Community!
 
You can increase the boot disk size of your instances in the Google Cloud Platform (GCP) Batch by creating an instance template and specifying the desired boot disk size.
 
To create an instance template, you can use the `gcloud compute instance-templates create` command and specify the `--boot-disk-size flag` with the desired size in GB. For example, to create an instance template with a 100GB boot disk, you would use the following command:
 
gcloud compute instance-templates create my-template --boot-disk-size=100GB
You can then use this template when creating your instances in your Batch job.
 
Regarding the Docker compatibility, as long as the instances you are using support running Docker, you should not have any issues with increasing the boot disk size.
 
Thank you

View solution in original post

Thanks for the responses. @Wen_gcp  pointed out to me in a different topic that "Having a larger size of boot disk can be achieved via an instance template or defining a large boot disk size with boot_disk_mib in compute resources." This was my preferred solution because I didn't have to create a template at all. Thank you!

View solution in original post

3 REPLIES 3

This can be achieved via instance template of the python Batch API (here). Reference the response here.

 
Welcome to Google Cloud Community!
 
You can increase the boot disk size of your instances in the Google Cloud Platform (GCP) Batch by creating an instance template and specifying the desired boot disk size.
 
To create an instance template, you can use the `gcloud compute instance-templates create` command and specify the `--boot-disk-size flag` with the desired size in GB. For example, to create an instance template with a 100GB boot disk, you would use the following command:
 
gcloud compute instance-templates create my-template --boot-disk-size=100GB
You can then use this template when creating your instances in your Batch job.
 
Regarding the Docker compatibility, as long as the instances you are using support running Docker, you should not have any issues with increasing the boot disk size.
 
Thank you

Thanks for the responses. @Wen_gcp  pointed out to me in a different topic that "Having a larger size of boot disk can be achieved via an instance template or defining a large boot disk size with boot_disk_mib in compute resources." This was my preferred solution because I didn't have to create a template at all. Thank you!