Skip to content

Commit

Permalink
Adding code spell ignore for AKS and reverting pre commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrishTa committed Dec 7, 2024
1 parent 547202c commit 00310e2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions cloud-service-provider/azure/aks/terraform/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# OPEA applications Azure ASK deployment guide
# OPEA applications Azure AKS deployment guide

This guide shows how to deploy OPEA applications on Azure Kubernetes Service (ASK) using Terraform.
This guide shows how to deploy OPEA applications on Azure Kubernetes Service (AKS) using Terraform.

## Prerequisites

- Access to Azure ASK
- Access to Azure AKS
- [Terraform](https://developer.hashicorp.com/terraform/tutorials/azure-get-started/install-cli), [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/) and [Helm](https://helm.sh/docs/helm/helm_install/) installed on your local machine.
- Keep the Azure subscription handy and enter the subscription id when prompted during the terraform execution.

## Setup

The setup uses Terraform to create ASK cluster with the following properties:
The setup uses Terraform to create AKS cluster with the following properties:

- 1-node ASK cluster with 50 GB disk and `Standard_D32d_v5` SPOT (or standard based on the application variables) instance (16 vCPU and 32 GB memory)
- 1-node AKS cluster with 50 GB disk and `Standard_D32d_v5` SPOT (or standard based on the application variables) instance (16 vCPU and 32 GB memory)
- Cluster autoscaling up to 10 nodes
- Storage Class (SC) `azfs-sc` and Persistent Volume Claim (PVC) `model-volume` for storing the model data
- Storage Class (SC) `azurefile-csi` and Persistent Volume Claim (PVC) `model-volume` for storing the model data

Initialize the Terraform environment.

```bash
terraform init
```

## ASK cluster
## AKS cluster

By default, 1-node cluster is created which is suitable for running the OPEA application. See `variables.tf` and `opea-<application-name>.tfvars` if you want to tune the cluster properties, e.g., number of nodes, instance types or disk size.

## Persistent Volume Claim

OPEA needs a volume where to store the model. For that we need to create Kubernetes Persistent Volume Claim (PVC). OPEA requires `ReadWriteMany` option since multiple pods needs access to the storage and they can be on different nodes. On ASK, only Azure File Service supports `ReadWriteMany`. Thus, each OPEA application below uses the file `aks-azfs-csi-pvc.yaml` to create PVC in its namespace.
OPEA needs a volume where to store the model. For that we need to create Kubernetes Persistent Volume Claim (PVC). OPEA requires `ReadWriteMany` option since multiple pods needs access to the storage and they can be on different nodes. On AKS, only Azure File Service supports `ReadWriteMany`. Thus, each OPEA application below uses the file `aks-azfs-csi-pvc.yaml` to create PVC in its namespace.

## OPEA Applications

### ChatQnA

Use the commands below to create ASK cluster.
Use the commands below to create AKS cluster.
User has to input their Azure subscription id while running the following commands when prompted.

```bash
Expand Down
4 changes: 2 additions & 2 deletions cloud-service-provider/azure/aks/terraform/azure_main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "vnet" {
depends_on = [azurerm_resource_group.main]
}

# ASK Cluster
# AKS Cluster
resource "azurerm_kubernetes_cluster" "main" {
name = var.cluster_name
location = azurerm_resource_group.main.location
Expand Down Expand Up @@ -104,7 +104,7 @@ resource "azurerm_key_vault" "main" {
# Update kubeconfig
resource "null_resource" "kubectl" {
provisioner "local-exec" {
command = "az ask get-credentials --resource-group ${azurerm_resource_group.main.name} --name ${azurerm_kubernetes_cluster.main.name} --overwrite-existing"
command = "az aks get-credentials --resource-group ${azurerm_resource_group.main.name} --name ${azurerm_kubernetes_cluster.main.name} --overwrite-existing"
}
depends_on = [azurerm_kubernetes_cluster.main]
}
Expand Down
2 changes: 1 addition & 1 deletion cloud-service-provider/azure/aks/terraform/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
output "cluster_endpoint" {
description = "Endpoint for ASK control plane"
description = "Endpoint for AKS control plane"
#sensitive = false
sensitive = true
value = azurerm_kubernetes_cluster.main.kube_config.0.host
Expand Down
6 changes: 3 additions & 3 deletions cloud-service-provider/azure/aks/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ variable "location" {
}

variable "cluster_name" {
description = "ASK cluster name"
description = "AKS cluster name"
type = string
default = "opea ask cluster"
default = "opea aks cluster"
}

variable "kubernetes_version" {
description = "ASK cluster version"
description = "AKS cluster version"
type = string
default = "1.30"
}
Expand Down

0 comments on commit 00310e2

Please sign in to comment.