Open rmharrison opened 1 year ago
GCP Batch has instructions to use a custom VM instance template
I created an Instance Template via the web console. Selecting my existing Network interface under "Advanced options" > "Networking" > "Network interfaces"
Modified job.json to use the instanceTemplate instead of default policy
...
"allocationPolicy": {
"instances": [
{
"instanceTemplate": "[instance-template-created-in-console]"
}
]
},
...
I also had to modify transcode.sh
vopts="-c:v libvpx-vp9 -b:v 1800k -minrate 1500 -maxrate 1610"
Quotes around the options Because all of my instances failed with "2023-03-07 17:54:35.356 EST /mnt/share/transcode.sh: line 26: libvpx-vp9: command not found"
Add to troubleshooting, because this was somewhat gnarly to resolve?
For this error in your GCP Log Explorer "Query results"
The resource 'projects/[PROJECT_NUMBER]/global/networks/default' was not found
The project [PROJECT_NUMBER] did not have a default VPC created at project creation. This can occur in centrally managed enterprise accounts where an enterprise administrator uses a global default for the organization instead of project-specific defaults.
See also:
There doesn't seem to be a way to restore the actual "default", as it created only at project creation. See: https://stackoverflow.com/questions/45789502/restore-google-cloud-default-network
However, you can resolve by manually creating a VPC named "default".
Briefly, from the GCP VPC Console
Complete instructions for creating a VPC: https://cloud.google.com/vpc/docs/create-modify-vpc-networks#create-auto-network
I ran both busybox (Container Job) and transcoding (Script Job). Using both the sample scripts and web console.
This error does not exist in Troubleshooting.
My best guess...
==> How do I set my default network? I have an existing network interface that I've used without incident for a manually provisioned Compute Engine VM instance.
Busybox, Script
Transcoding, Web Console