How can I schedule tasks to CPUs?

10/13/2016

I have some tasks defined as Docker containers, each one will consume one full CPU whilst it runs.

Id like to run them as cost efficiently as possible so that VMs are only active when the tasks are running.

Whats the best way to do this on Google Cloud Platform?

It seems Kuberenetes and other cluster managers assume you will be running some service, and have spare capacity in your cluster to schedule the containers.

Is there any program or system that I can use to define my tasks, and then start/stop VMs on a schedule to run those tasks?

I think the best way is to just use the GCP/Docker APIs and script it myself?

-- zino
docker
google-cloud-platform
kubernetes
scheduled-tasks

1 Answer

10/14/2016

You're right, all the major cloud container services provide you a cluster for running containers - GCP Container Engine, EC2 Container Service, and Azure Container Service.

In all those cases, the compute is charged by the VMs in the cluster, so you'll pay while the VMs are running. If you have an occasional workload you'll need to script creating or starting the VMs before running your containers, and stopping or deleting them when you're done.

An exception is Joyent's cloud, which let's you run Docker containers and charges per container - that could fit your scenario.

Disclaimer - I don't work for Google, Amazon, Microsoft or Joyent. Or Samsung.

-- Elton Stoneman
Source: StackOverflow