There wasn't really a good overview on how to use placement, so I've tried to start something by expanding on how nova uses placement in very broad strokes. The intent here is not to instruct people on the details of how to manage resources with placement, rather that they _can_ manage resources with placement and here's the major steps involved. Change-Id: I11cd622162efce2e87a21fa5ae5d297f4b248541
3.4 KiB
Placement Usage
Tracking Resources
The placement service enables other projects to track their own resources. Those projects can register/delete their own resources to/from placement via the placement HTTP API.
The placement service originated in the Nova project </>
.
As a result much of the functionality in placement was driven by nova's
requirements. However, that functionality was designed to be
sufficiently generic to be used by any service that needs to manage the
selection and consumption of resources.
How Nova Uses Placement
Two processes, nova-compute
and
nova-scheduler
, host most of nova's interaction with
placement.
The nova resource tracker in nova-compute
is responsible
for creating
the resource provider record corresponding to the compute host on
which the resource tracker runs, setting
the inventory that describes the quantitative resources that are
available for workloads to consume (e.g., VCPU
), and setting
the traits that describe qualitative aspects of the resources (e.g.,
STORAGE_DISK_SSD
).
If other projects -- for example, Neutron or Cyborg -- wish to manage
resources on a compute host, they should create resource providers as
children of the compute host provider and register their own managed
resources as inventory on those child providers. For more information,
see the Modeling with Provider Trees <provider-tree>
.
The nova-scheduler
is responsible for selecting a set of
suitable destination hosts for a workload. It begins by formulating a
request to placement for a list of allocation
candidates. That request expresses quantitative and qualitative
requirements, membership in aggregates, and in more complex cases, the
topology of related resources. That list is reduced and ordered by
filters and weighers within the scheduler process. An allocation
is made against a resource provider representing a destination,
consuming a portion of the inventory set by the resource tracker.
provider-tree