Hacker News new | past | comments | ask | show | jobs | submit login

As we put in the docs, to try this out:

  gcloud compute instances create my-vm --preemptible --zone=us-central1-c
or just set the preemptible bool to true via the API (it's under scheduling). When you want to test how your system behaves on preemption, you can just do:

  gcloud compute instances stop my-vm --zone=us-central1-c
which will give you the same 30 second timeout as when you're preempted. Most OSes have a fairly standard set of things they do on shutdown that will at least send all your running processes a signal (via kill), but if you need to add your own you can inject it via the new shutdown script support (https://cloud.google.com/compute/docs/shutdownscript).

We tried to cover this in the docs (https://cloud.google.com/compute/docs/instances/preemptible) any feedback on that would be welcome!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: