Skip to content

1974 staeful commitments #5799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,31 @@ Follow the instructions below while referring to the [Azure documentation](https
1. Obtain the credentials from your Azure app. Refer to [Get the Azure Credentials Required to Connect Commitments to Spot Products]()
2. Create or edit a stateful node. See [Manage Stateful Nodes](https://docs.spot.io/managed-instance/azure/tutorials/manage?id=manage-stateful-nodes).
3. In the Availability settings area, next to Utilize RIs/SPs, click **Add permission**.
<img width="600" src="https://github.com/user-attachments/assets/cab63ab7-ef89-482f-8758-05a64379aaef" />

<img src="https://docs.spot.io/managed-instance/_media/create-stateful-node-commitments.png" />

### Step 1: App Registrations

1. In Connect RIs/SPs to Spot wizard, step 1, create (register) a new Azure app or upgrade an existing one.

Upgrade:

<img width="500" src="https://github.com/user-attachments/assets/52ed6761-4d7a-4a8f-b05c-d0356392b217" />

<img src="https://docs.spot.io/managed-instance/_media/commitments_register-upgrade-app.png" />

New:

<img width="500" src="https://github.com/user-attachments/assets/86e527cd-f95d-4be6-a44f-7e01da0c21c4" />

<img src="https://docs.spot.io/managed-instance/_media/commitments-register-new-app.png" />

2. Copy the following credentials from your Azure app and paste them into the fields:
3. Copy the following credentials from your Azure app and paste them into the fields:
* Application (client) ID.
* Directory (tenant) ID.

3. Go to Step 2: Certificates and Secrets
4. Go to Step 2: Certificates and Secrets

### Step 2: Certificates and Secrets

<img width="500" src="https://github.com/user-attachments/assets/e61b0e9d-103d-47f2-b46e-74cac43daa82" />
<img src="https://docs.spot.io/managed-instance/_media/commitments-certs-and-secrets.png" />

1. Copy the following credentials from your Azure app and paste them into the fields:
* Application secret expiration date.
Expand All @@ -77,7 +76,7 @@ Follow the instructions below while referring to the [Azure documentation](https

### Step 3: Permissions Assignment

<img width="500" src="https://github.com/user-attachments/assets/71cae309-ad03-4c61-9859-c455bef17ec2" />
<img src="https://docs.spot.io/managed-instance/_media/commitments-permss-with-reader.png" />

>IMPORTANT:
>
Expand All @@ -89,7 +88,7 @@ Follow the instructions below while referring to the [Azure documentation](https

1. Select the custom reader role, and the permissions in accordance with those you purchased from Azure (by default, both RI and SP are selected).

2. Use the following Azure PowerShell script to assign the Reservation Reader role at the tenant level:
2. Use the following Azure PowerShell script to assign the Reservation Reader / Savings Plan Reader roles at the tenant level:

```
Import-Module Az.Accounts
Expand Down Expand Up @@ -152,5 +151,5 @@ Make sure that the VM attached to the specific stateful node also has `shouldUt
Under Spot API > Elastigroup > Elastigroup Azure Stateful >...

* [Create Stateful Node](https://docs.spot.io/api/#tag/Elastigroup-Azure-Stateful/operation/azureStatefulNodeCreate) or [Update Stateful Node](https://docs.spot.io/api/#tag/Elastigroup-Azure-Stateful/operation/azureStatefulNodeUpdate) (under statefulNode > strategy)
* [Get Stateful Node Status](https://docs.spot.io/api/#tag/Elastigroup-Azure-Stateful/operation/azureStatefulNodeGetStatus) or [Update Stateful Node Status](https://docs.spot.io/api/#tag/Elastigroup-Azure-Stateful/operation/azureStatefulNodeChangeState)
* [Get Stateful Node Status](https://docs.spot.io/api/#tag/Elastigroup-Azure-Stateful/operation/azureStatefulNodeGetStatus) or [Update Stateful Node Status](https://docs.spot.io/api/#tag/Elastigroup-Azure-Stateful/operation/azureStatefulNodeChangeState)

14 changes: 6 additions & 8 deletions src/docs/managed-instance/features/commitments-stateful-aks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Cloud service provider relevance: <font color="#FC01CC">Azure Kubernetes</font>

## Azure Commitments

Azure Commitments are agreements you make to use a certain amount of Azure resources over a specified period, including RIs and Saving Plans.
Azure Commitments are agreements you make to use a certain amount of Azure resources over a specified period, including RIs and SPs.

Commitment types are as follows:

Expand All @@ -20,15 +20,15 @@ You can prioritize available RIs and SPs: Prioritize to prevent their underutili

### Azure Reserved Instances

Azure RIs let you reserve VMs in Azure for a one- or three-year term, providing significant cost savings compared to pay-as-you-go pricing, and provide the following benefits:
Azure RIs let you reserve VMs in Azure for a one, three, or five year term, providing significant cost savings compared to pay-as-you-go pricing, and provide the following benefits:

* Cost Savings: Typically offers discounts of up to 72% compared to on-demand prices.
* Predictable Billing: Helps budget and forecast costs as you pre-purchase capacity.
* Flexibility: You can exchange or cancel RIs, providing flexibility in your commitment.

### Azure Savings Plans

Azure SPs offer a flexible pricing model that lets you save up to 65% on your Azure compute costs in exchange for a commitment to spend a specific amount over a one- or three-year period and provide the following benefits:
Azure SPs offer a flexible pricing model that lets you save significantly on your Azure compute costs in exchange for a commitment to spend a specific amount over a one, three, or five year term and provide the following benefits:

* Flexibility: Unlike RIs, SPs apply to a broader range of services and can adjust based on your usage patterns.
* Automatic Savings: Automatically applies savings to eligible resources, making managing costs across multiple services easier.
Expand All @@ -37,13 +37,11 @@ Azure SPs offer a flexible pricing model that lets you save up to 65% on your Az

## Commitments Scenarios


<img width="1140px" src="https://github.com/user-attachments/assets/f991b76b-efd4-41a6-9576-3e7895ecb2f5" />

<img src="https://docs.spot.io/managed-instance/_media/stateful-node-commitment-options.png" />

### Launching a VM

As part of the scale-up process, Stateful Node checks if an RI or SP applies to the market selection. If so, utilizes that RI/SP.
As part of the scale-up process, Stateful Node checks if an RI or SP applies to the market selection. If so, prioritizes that RI/SP.

### Running Spot VMs

Expand All @@ -70,5 +68,5 @@ Stateful Node performs a strategy fix check every **xx (to check)** minutes to d
The reversion will not occur if:

* There is no alternative commitment or spot VM to revert back to.
* It violates the group's regular VM count request.
* It violates the group's regular VM count request.