4

I'm trying to work with multiple Pre-emptive VM instances on Google Compute Engine for elastic search service and facing some doubts as follows:-

  1. Is 30sec window enough to store data from a preemptive elastic search instance to a stable VM?

  2. How to save the state of one VM that is ending and restore it to other?

  3. Is there an alternative to Google Autoscaler?

  • Try StackExchange or another forum dedicated to elasticsearch, this is not really a question specific to GCE (it's just that Preemptible VMs gives you the 30s criteria that you're asking about). – Paul R. Nash Nov 21 '16 at 10:05
  • @PaulR.Nash well, if the question is about general hibernation and wake up of the preemptive (Linux) machine, then it's more about GCE than Elasticsearch. – xmedeko Jan 31 '17 at 19:33
  • It says "is 30sec enough to store data..." So, it would depend on the data and the application, wouldn't it? – Paul R. Nash Feb 01 '17 at 07:11
  • I 've rather posted a separate question to clarify my idea: http://stackoverflow.com/questions/41974562/google-compute-engine-suspend-and-restore-preemptible-machine-to-disk – xmedeko Feb 01 '17 at 07:57

1 Answers1

0

You could try running a 'shutdown-script' to create a snapshot with the command:

gcloud compute disks snapshot [disk_name] --zone=[zone] --snapshot-names=[snapshot_name]

Although you should manage to have different snapshot names. Using this you would have a backup of the current VM state, but there is no automatic way to create another VM from this snapshot when is created.

As far as I know there is no predefined alternative that do the same as the autoscaler. Although you could also try using the shutdown script to starts a VM.

Watacroft
  • 322
  • 2
  • 11