|
| 1 | +# OpenStack Blazar |
| 2 | + |
| 3 | +!!! warning "Technology preview" |
| 4 | + |
| 5 | + Blazar support is currently in technology preview and under active development. |
| 6 | + |
| 7 | + Its possible how this feature works may radically change in a future release. |
| 8 | + |
| 9 | +When available on the target cloud, Azimuth is able to make use of |
| 10 | +[Blazar](https://docs.openstack.org/blazar/latest/), an OpenStack service for reserving |
| 11 | +cloud resources. When Blazar support is enabled, Azimuth is able to create reservations |
| 12 | +for platforms and deploy platforms into those reservations. |
| 13 | + |
| 14 | +Currently, Azimuth is using Blazar to give users better feedback about when the cloud is full, |
| 15 | +meaning that their platform cannot be created right now. This is a common issue with |
| 16 | +"fixed capacity" clouds, where there is more demand for resources than available capacity. |
| 17 | + |
| 18 | +When creating a platform, users must specify how long they need that platform for. Azimuth |
| 19 | +translates this information, along with the parameters for the platform, into a request for |
| 20 | +a Blazar reservation (starting now) that can accomodate the requested platform. If this is |
| 21 | +successful then Azimuth creates the platform using the reserved resources. If it is not |
| 22 | +successful, Azimuth reports that the cloud is not able to accomodate the platform as currently |
| 23 | +configured and the user may try again with different parameters. |
| 24 | + |
| 25 | +!!! info "Future work" |
| 26 | + |
| 27 | + Blazar also supports creating reservations that start in the future, e.g. "can I have three |
| 28 | + machines of flavor X and two of flavor Y for two weeks starting tomorrow". This is useful for |
| 29 | + cases where it is known advance when resources will be required, and they can be reserved for |
| 30 | + that time. In the future, Azimuth will support creating platforms that start in the future |
| 31 | + using this mechanism. |
| 32 | + |
| 33 | +## Blazar flavor plugin |
| 34 | + |
| 35 | +Azimuth relies on the new |
| 36 | +[Blazar flavor plugin](https://opendev.org/openstack/blazar/src/branch/master/blazar/plugins/flavor/flavor_plugin.py) |
| 37 | +that allows resources to be reserved in Blazar using existing Nova flavors. When creating a |
| 38 | +reservation, the required number of servers of each flavor is specified and Blazar reserves |
| 39 | +the corresponding resources from its pool of hosts. |
| 40 | + |
| 41 | +Azimuth does not currently support the host reservation or instance reservation plugins. |
| 42 | + |
| 43 | +There is active work on the Blazar flavor plugin to improve the support for VMs with GPUs |
| 44 | +attached, and to allow [Ironic](https://docs.openstack.org/ironic/latest/) bare-metal nodes |
| 45 | +to be added as possible flavor reservation targets. |
| 46 | + |
| 47 | +Currently, Azimuth only supports the case where all projects are able to access all configured |
| 48 | +Nova flavors via Blazar. |
| 49 | + |
| 50 | +For more information on Blazar, and how to add hosts into Blazar's control, please see the |
| 51 | +[Blazar documentation](https://docs.openstack.org/blazar/latest/cli/flavor-based-instance-reservation.html). |
| 52 | + |
| 53 | +## Coral Credits |
| 54 | + |
| 55 | +Blazar has support for |
| 56 | +[delegating to an external service](https://docs.openstack.org/blazar/latest/admin/usage-enforcement.html#externalservicefilter) |
| 57 | +to determine whether a reservation is permitted. |
| 58 | + |
| 59 | +[Coral Credits](https://github.com/stackhpc/coral-credits) is a new open-source service for |
| 60 | +facilitating sharing of resources using credit allocations. It implements the API required |
| 61 | +for Blazar to call out to it, allowing the creation of Blazar reservations to be constrained |
| 62 | +by the available credits for a project. |
| 63 | + |
| 64 | +Coral Credits can be deployed as part of an Azimuth installation using the following: |
| 65 | + |
| 66 | +```yaml title="environments/my-site/inventory/group_vars/all/variables.yml" |
| 67 | +coral_credits_enabled: yes |
| 68 | +``` |
| 69 | +
|
| 70 | +For Details on how to configure Blazar to use Coral Credits as an enforcement plugin, and how |
| 71 | +to configure the credit allocations for each OpenStack project, see the |
| 72 | +[Coral Credits documentation](https://github.com/stackhpc/coral-credits/blob/main/README.md#blazar-configuration). |
| 73 | +
|
| 74 | +## Azimuth configuration |
| 75 | +
|
| 76 | +To enable "time-limited" platforms in Azimuth, i.e. platforms that are automatically deleted |
| 77 | +at a specified time in the future, set the following variable: |
| 78 | +
|
| 79 | +```yaml title="environments/my-site/inventory/group_vars/all/variables.yml" |
| 80 | +azimuth_scheduling_enabled: true |
| 81 | +``` |
| 82 | +
|
| 83 | +When this variable is set, Azimuth users will be required to specify an end time for any |
| 84 | +platforms that they create. |
| 85 | +
|
| 86 | +!!! warning "Platforms cannot be extended" |
| 87 | +
|
| 88 | + Currently, Azimuth does **not** support extending the end time for a platform. |
| 89 | +
|
| 90 | +By default, this **does not** use Blazar reservations - Azimuth just ensures that the platform is |
| 91 | +deleted at the requested time. This is still useful to help to prevent resource squatting on clouds |
| 92 | +where Blazar is not available. However platforms can still encounter issues when the cloud is full |
| 93 | +because the resources are not reserved for the platform as they are in Blazar. |
| 94 | +
|
| 95 | +To tell Azimuth to create Blazar reservations for platforms, set the following variable: |
| 96 | +
|
| 97 | +```yaml title="environments/my-site/inventory/group_vars/all/variables.yml" |
| 98 | +azimuth_schedule_operator_blazar_enabled: true |
| 99 | +``` |
| 100 | +
|
| 101 | +When this variable is set, Azimuth will attempt to create a Blazar lease for each platform. If |
| 102 | +the creation of the Blazar lease fails, Azimuth will report whether the problem was due to cloud |
| 103 | +capacity or being limited by credits. If the Blazar lease is created successfully, Azimuth will |
| 104 | +create the platform using the reserved resources. |
0 commit comments