Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions docs/configuration/18-scheduling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Scheduling

Azimuth allows scheduling of the ddeletion of CaaS and Kubernetes clusters. The creating user picks the lifetime of their platform at creation time, and Azimuth will delete the platform when it expires.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in ddeletion


By default, no scheduling features are enabled. Azimuth configuration allows:

- Allowing scheduling, but giving users' free choice as to the lifetime of their platforms.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove '

- Allowing scheduling, and enforcing a maximum lifetime across all platforms.
- Allowing scheduling, and enforcing a maximum lifetime on a per-platform basis using annotations.

## Enabling scheduling globally

To enable scheduling globally, add azimuth_scheduling_enabled to the appropriate configuration file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To enable scheduling globally, add azimuth_scheduling_enabled to the appropriate configuration file.
To enable scheduling globally, add `azimuth_scheduling_enabled` to the appropriate configuration file (see below).

This will enable users creating new platforms to pick a deletion time when the platforms are created.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they pick a deletion time? Above it says users pick a lifetime which is slightly different

Existing platforms will be unnafected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Existing platforms will be unnafected.
Existing platforms will be unaffected.


```yaml title="environments/my-site/inventory/group_vars/all/secrets.yml"
azimuth_scheduling_enabled: true
```

## Annotations

Scheduling is implemented using annotations that are applied to instances of the
`clustertemplates.azimuth.stackhpc.com` and
`clustertypes.caas.azimuth.stackhpc.com` resources for Kubernetes cluster templates,
and CaaS cluster types respectively.
It is not possible to set maximum lifetimes for individual apps inside a kubernetes cluster,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is not possible to set maximum lifetimes for individual apps inside a kubernetes cluster,
It is not possible to set maximum lifetimes for individual apps inside a Kubernetes cluster,

only the cluster itself.

The annotations is the same for all platform types:

- `scheduling.azimuth.stackhpc.com/max-lifetime-hours`
A an integer number of hours which will be the maximum lifetime for the platform.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A an integer number of hours which will be the maximum lifetime for the platform.
An integer number of hours which will be the maximum lifetime for the platform.


<!-- prettier-ignore-start -->
!!! warning "No annotations means infinite lifetime"
If no scheduling are present, then that platform has no maximum lifetime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If no scheduling are present, then that platform has no maximum lifetime.
If no scheduling annotations are present, then that platform has no maximum lifetime.

<!-- prettier-ignore-end -->

## Built-in platform types

`azimuth-ops` supports a number of variables that can be used to apply scheduling
to the built-in platform types.

The following variables allow default lifetimes to be set **for all built-in
platform types**:

```yaml title="environments/my-site/inventory/group_vars/all/variables.yml"
azimuth_max_platform_duration_hours: 20
```

These can be overridden for specific platform types if required:

```yaml title="environments/my-site/inventory/group_vars/all/variables.yml"
# The following apply to all Kubernetes cluster templates

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# The following apply to all Kubernetes cluster templates
# The following applies to all Kubernetes cluster templates

azimuth_capi_operator_max_duration_hours: 24

# Each CaaS cluster type has specific variables, e.g.:
azimuth_caas_stackhpc_workstation_max_duration_hours: 200
```