Make sure that scheduler_driver is filter_scheduler and scheduler_defualt_filters has AggregateInstanceExtraSpecsFilter in nova.conf.
- packages This needs python-pbr packages for install.
Setup this repository and install depending packages.
# clone this repository
$ git clone https://github.com/muroi/promise
$ cd promise
# install promise command
$ python setup.py build
$ python setup.py install
# install depending packages
$ pip install -r requirements.txt
If you want to see the details, type promise help
or promise help <subcommand>
.
- Reservation
Make a reservation of cloud instances. This command create a flavor and a host-aggregate and assignes hosts that can have enough capacity for the reservation with the aggregate.
$ promise reserve promise-flavor 1 1024 10 1 az1
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| reservation id | 18902602-2e2e-4bbc-804d-e1d1beb4bb06 |
| aggregate id | 26 |
| hosts | [u'promise-compute4'] |
+----------------+--------------------------------------+
- Association
Associate the reservation with a project. After associating, the project can create new instances with the flavor of the reservation.
$ promise associate 18902602-2e2e-4bbc-804d-e1d1beb4bb06 f4552d1af2c8446abb2a90a29777c6f
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| reservation id | 18902602-2e2e-4bbc-804d-e1d1beb4bb06 |
| associated project | f4552d1af2c8446abb2a90a29777c6f5 |
+--------------------+--------------------------------------+
- Finish
Finish the use of reserved instances. This command deletes the association, instances created with the flavor, and the host aggregate.
$ promise finish 18902602-2e2e-4bbc-804d-e1d1beb4bb0
Promise uses a flavor id as a reservation id in its context. Flavors and host aggregates have an extra specs, generated by flavor id to enable Nova to schedule valid hosts. When you want to check your reservation, use reservation id for searching flavor and aggregate.