zun/zun/scheduler/__init__.py
Hongbin Lu ddc2a81532 Support multiple compute hosts
This patch is for supporting deploying multiple instances of
zun-compute to multiple hosts. In particular, if a container
is created, it will be scheduled to a host picked by a scheduler.
The host was recorded at the container object. Later, container
life-cycle operations will call/cast to the host, to which the
container was scheduled.

The list of changes of this commit is as following:
* Add a basic scheduler framework. The default scheduler is
  a basic scheduler that randomly choose a host.
* In RPC, add support for sending message to specified host.
* In compute, add APIs to schedule a container.
* In context, add a method to elevate to admin privilege
* In Nova driver, force the nova instance to be created in the
  scheduled host. This requires to elevate context before
  calling Nova APIs.
* In objects and dbapi, add a method to list Zun services with
  specified binary.
* In setup.cfg, add a scheduler entry point.
* In cmd, use hostname as the rpc server ID (instead of a generated
  short ID).
* In conf, use hostname as default value of CONF.host.

Implements: blueprint support-multiple-hosts
Implements: blueprint basic-container-scheduler
Change-Id: I6955881e3087c488eb9cd857cbbd19f49f6318fc
2017-01-11 10:21:32 -06:00

0 lines
Python