Skip to content

Commit 9ca714a

Browse files
committed
Clean up
1 parent 09226c6 commit 9ca714a

1 file changed

Lines changed: 70 additions & 66 deletions

File tree

scenarios/AksKaito/README.md

Lines changed: 70 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@ ms.author: schaffererin
99

1010
---
1111

12-
# Deploy an AI model on Azure Kubernetes Service (AKS) with the AI toolchain operator (preview)
12+
## Quickstart: Create a Linux virtual machine with the Azure CLI on Azure
13+
14+
**Applies to:** :heavy_check_mark: Linux VMs
15+
16+
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://go.microsoft.com/fwlink/?linkid=2262692)
17+
18+
This quickstart shows you how to use the Azure CLI to deploy a Linux virtual machine (VM) in Azure. The Azure CLI is used to create and manage Azure resources via either the command line or scripts.
19+
20+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
21+
22+
## Deploy an AI model on Azure Kubernetes Service (AKS) with the AI toolchain operator (preview)
1323

1424
The AI toolchain operator (KAITO) is a managed add-on for AKS that simplifies the experience of running OSS AI models on your AKS clusters. The AI toolchain operator automatically provisions the necessary GPU nodes and sets up the associated inference server as an endpoint server to your AI models. Using this add-on reduces your onboarding time and enables you to focus on AI model usage and development rather than infrastructure setup.
1525

@@ -36,97 +46,91 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
3646
* [Install the Azure CLI AKS preview extension](#install-the-azure-cli-preview-extension).
3747
* [Register the AI toolchain operator add-on feature flag](#register-the-ai-toolchain-operator-add-on-feature-flag).
3848

39-
### Install the Azure CLI preview extension
49+
## Set up resource group
4050

41-
1. Install the Azure CLI preview extension using the [az extension add][az-extension-add] command.
51+
Set up a resource group with a random ID.
4252

43-
```azurecli-interactive
44-
az extension add --name aks-preview
45-
```
53+
```bash
54+
export RANDOM_ID="$(openssl rand -hex 3)"
55+
export RG_NAME="myPostgresResourceGroup$RANDOM_ID"
56+
export REGION="centralus"
57+
export CLUSTER_NAME="myClusterName$RANDOM_ID"
4658

47-
2. Update the extension to make sure you have the latest version using the [az extension update][az-extension-update] command.
59+
az group create \
60+
--name $RG_NAME \
61+
--location $REGION \
62+
```
4863

49-
```azurecli-interactive
50-
az extension update --name aks-preview
51-
```
64+
## Install the Azure CLI preview extension
5265

53-
### Register the AI toolchain operator add-on feature flag
66+
Install the Azure CLI preview extension using the [az extension add][az-extension-add] command. Then update the extension to make sure you have the latest version using the [az extension update][az-extension-update] command.
5467

55-
1. Register the AIToolchainOperatorPreview feature flag using the [az feature register][az-feature-register] command.
68+
```bash
69+
az extension add --name aks-preview
70+
az extension update --name aks-preview
71+
```
5672

57-
```azurecli-interactive
58-
az feature register --namespace "Microsoft.ContainerService" --name "AIToolchainOperatorPreview"
59-
```
73+
## Register the AI toolchain operator add-on feature flag
6074

61-
It takes a few minutes for the registration to complete.
75+
Register the AIToolchainOperatorPreview feature flag using the az feature register command.
76+
It takes a few minutes for the registration to complete.
6277

63-
2. Verify the registration using the [az feature show][az-feature-show] command.
78+
```bash
79+
az feature register --namespace "Microsoft.ContainerService" --name "AIToolchainOperatorPreview"
80+
```
6481

65-
```azurecli-interactive
66-
az feature show --namespace "Microsoft.ContainerService" --name "AIToolchainOperatorPreview"
67-
```
82+
Verify the registration using the [az feature show][az-feature-show] command.
6883

69-
### Export environment variables
84+
```bash
85+
az feature show --namespace "Microsoft.ContainerService" --name "AIToolchainOperatorPreview"
86+
```
7087

71-
* To simplify the configuration steps in this article, you can define environment variables using the following commands. Make sure to replace the placeholder values with your own.
88+
## Create an AKS cluster with the AI toolchain operator add-on enabled
7289

73-
```azurecli-interactive
74-
export AZURE_SUBSCRIPTION_ID="mySubscriptionID"
75-
export AZURE_RESOURCE_GROUP="myResourceGroup"
76-
export AZURE_LOCATION="myLocation"
77-
export CLUSTER_NAME="myClusterName"
78-
```
90+
Create an Azure resource group using the [az group create][az-group-create] command.
7991

80-
## Enable the AI toolchain operator add-on on an AKS cluster
92+
```bash
93+
az group create --name ${AZURE_RESOURCE_GROUP} --location ${REGION}
94+
```
8195

82-
The following sections describe how to create an AKS cluster with the AI toolchain operator add-on enabled and deploy a default hosted AI model.
96+
Create an AKS cluster with the AI toolchain operator add-on enabled using the [az aks create][az-aks-create] command with the `--enable-ai-toolchain-operator` and `--enable-oidc-issuer` flags.
8397

84-
### Create an AKS cluster with the AI toolchain operator add-on enabled
98+
> [!NOTE]
99+
> AKS creates a managed identity once you enable the AI toolchain operator add-on. The managed identity is used to create GPU node pools in the managed AKS cluster. Proper permissions need to be set for it manually following the steps introduced in the following sections.
100+
>
101+
> AI toolchain operator enablement requires the enablement of OIDC issuer.
85102
86-
1. Create an Azure resource group using the [az group create][az-group-create] command.
103+
```bash
104+
az aks create --location ${REGION} \
105+
--resource-group ${AZURE_RESOURCE_GROUP} \
106+
--name ${CLUSTER_NAME} \
107+
--enable-oidc-issuer \
108+
--enable-ai-toolchain-operator \
109+
--generate-ssh-keys
110+
```
87111

88-
```azurecli-interactive
89-
az group create --name ${AZURE_RESOURCE_GROUP} --location ${AZURE_LOCATION}
90-
```
91-
92-
2. Create an AKS cluster with the AI toolchain operator add-on enabled using the [az aks create][az-aks-create] command with the `--enable-ai-toolchain-operator` and `--enable-oidc-issuer` flags.
112+
On an existing AKS cluster, you can enable the AI toolchain operator add-on using the [az aks update][az-aks-update] command.
93113

94-
```azurecli-interactive
95-
az aks create --location ${AZURE_LOCATION} \
114+
```bash
115+
az aks update --name ${CLUSTER_NAME} \
96116
--resource-group ${AZURE_RESOURCE_GROUP} \
97-
--name ${CLUSTER_NAME} \
98117
--enable-oidc-issuer \
99-
--enable-ai-toolchain-operator \
100-
--generate-ssh-keys
101-
```
102-
103-
> [!NOTE]
104-
> AKS creates a managed identity once you enable the AI toolchain operator add-on. The managed identity is used to create GPU node pools in the managed AKS cluster. Proper permissions need to be set for it manually following the steps introduced in the following sections.
105-
>
106-
> AI toolchain operator enablement requires the enablement of OIDC issuer.
107-
108-
3. On an existing AKS cluster, you can enable the AI toolchain operator add-on using the [az aks update][az-aks-update] command.
109-
110-
```azurecli-interactive
111-
az aks update --name ${CLUSTER_NAME} \
112-
--resource-group ${AZURE_RESOURCE_GROUP} \
113-
--enable-oidc-issuer \
114-
--enable-ai-toolchain-operator
115-
```
118+
--enable-ai-toolchain-operator
119+
```
116120

117121
## Connect to your cluster
118122

119-
1. Configure `kubectl` to connect to your cluster using the [az aks get-credentials][az-aks-get-credentials] command.
123+
Configure `kubectl` to connect to your cluster using the [az aks get-credentials][az-aks-get-credentials] command.
120124

121-
```azurecli-interactive
122-
az aks get-credentials --resource-group ${AZURE_RESOURCE_GROUP} --name ${CLUSTER_NAME}
123-
```
125+
```bash
126+
az aks get-credentials --resource-group ${AZURE_RESOURCE_GROUP} --name ${CLUSTER_NAME}
127+
```
124128

125-
2. Verify the connection to your cluster using the `kubectl get` command.
129+
Verify the connection to your cluster using the `kubectl get` command.
126130

127-
```azurecli-interactive
128-
kubectl get nodes
129-
```
131+
```bash
132+
kubectl get nodes
133+
```
130134

131135
## Export environment variables
132136

@@ -248,4 +252,4 @@ For more inference model options, see the [KAITO GitHub repository](https://gith
248252
[az-extension-update]: /cli/azure/extension#az_extension_update
249253
[az-feature-register]: /cli/azure/feature#az_feature_register
250254
[az-feature-show]: /cli/azure/feature#az_feature_show
251-
[az-provider-register]: /cli/azure/provider#az_provider_register
255+
[az-provider-register]: /cli/azure/provider#az_provider_register

0 commit comments

Comments
 (0)