Resource connector enhancements

The following enhancements affect LSF resource connector.

Support for additional Google Cloud Platform features

The LSF resource connector for Google Cloud Platform now includes support for the following Google Cloud Platform features:

Launch instance templates
You can now specify the launchTemplateId attribute to enable launch instance templates. You need to create the specified instance template in Google Cloud before using it. When using launch instance templates, you can define all the instance's properties within the template when you create it, then you only need to specify the zone or region in the googleprov_templates.json file. The same attributes that are specified in the googleprov_templates.json file override the values that are specified in the template. For more information on the override behavior of instance templates, see the Google Cloud documentation: https://cloud.google.com/compute/docs/instances/create-vm-from-instance-template#creating_a_vm_instance_from_an_instance_template_with_overrides.
Note: To export environment variables to the instances, you still must specify the userData attribute in the googleprov_templates.json file. To add labels to the instances, you still must specify the instanceTags attribute in the googleprov_templates.json file.

For more information on launch instance templates, see the Google Cloud documentation:https://cloud.google.com/compute/docs/instance-templates

Local SSDs
LSF now supports attached local SSDs through launch instance templates, but does not include an interface in the googleprov_templates.json file. In Google Cloud, attach the local SSD to the launch instance template in Disks > Add new disk by selecting Local SSD scratch disk in the Type field.

You must mount SSDs before using them. LSF includes an example code that illustrates how to mount multiple local SSDs in one logical volume in the <LSF_TOP>/<LSF_VERSION>/resource_connector/google/scripts/example_user_data.sh file.

For more information on local SSDs, see the Google Cloud documentation: https://cloud.google.com/compute/docs/disks/local-ssd.

Preemptible VM instances
Preemptible VM instances are instances that run at a lower cost than standard instances, with most of the same features as standard instances.

LSF now supports preemptible VM instances through launch instance templates, but does not include an interface in the googleprov_templates.json file. In Google Cloud, set the Preemptibility field to On when creating the launch instance template to enable preemptible VM instances.

When a VM instance is being preempted, the instance transitions into TERMINATED status and LSF automatically requeues the job that is running on the instance. LSF then deletes the preempted instance.

For more information on preemptible VM instances, see the Google Cloud documentation: https://cloud.google.com/compute/docs/instances/preemptible.

Bulk instance APIs (Bulk API endpoints)
LSF resource connector now automatically uses bulk API endpoints to create Google Cloud instances. Google Cloud Platform provides both zonal bulk API endpoint (Instances.BulkInsert) and regional bulk API endpoint (RegionInstances.BulkInsert) support.

If the zone in which you want to create your instances is not important, configure LSF resource connector to call the regional bulk API endpoint by specifying a value for the GCLOUD_REGION parameter in the googleprovconfig.json file or by defining a region in the googleprov_template.json file. The region that is defined in the googleprov_templates.json file overrides the region that is defined in the GCLOUD_REGION parameter. Google Cloud Platform automatically selects the zone in which to create your instances, considering the available hardware capacity in each zone.

If you want to specify a zone in which to create your instances, define the zone in the googleprov_templates.json file, and LSF resource connector calls the zonal bulk API endpoint.