Azure
This page provides an overview of the architecture, requirements and steps to install the TrueFoundry compute plane cluster in Azure
The architecture of a TrueFoundry compute plane is as follows:
Requirements:
The common requirements to setup compute plane in each of the scenarios is as follows:
- Billing must be enabled for the Azure subscription.
- Ensure that Microsoft.Storage resource provider is registered. Check this link for more details.
- Egress access to container registries -
public.ecr.aws
,quay.io
,ghcr.io
,tfy.jfrog.io
,docker.io/natsio
,nvcr.io
,registry.k8s.io
so that we can download the docker images for argocd, nats, gpu operator, argo rollouts, argo workflows, istio, keda, etc. - We need a domain to map to the service endpoints and certificate to encrypt the traffic. A wildcard domain like *.services.example.com is preferred. TrueFoundry can do path based routing like
services.example.com/tfy/*
, however, many frontend applications do not support this. For certificate, check this document for more details. - Enough quotas for CPU/GPU instances must be present depending on your usecase. You can check and increase quotas at Azure compute quotas
- Ensure that host encryption is enabled.
- The new VPC subnet should have a CIDR range of /24 or larger. Secondary ranges for pods (min /20) and services (min /24) are required. Secondary range can be from a non-routable range. This is to ensure capacity for ~250 instances and 4096 pods.
- User/serviceaccount to provision the infrastructure.
- The new VPC subnet should have a CIDR range of /24 or larger. Secondary ranges for pods (min /20) and services (min /24) are required. Secondary range can be from a non-routable range. This is to ensure capacity for ~250 instances and 4096 pods.
- User/serviceaccount to provision the infrastructure.
- The existing network subnet should have a CIDR range of /24 or larger. Secondary ranges for pods (min /20) and services (min /24) are required. Secondary range can be from a non-routable range. This is to ensure capacity for ~250 instances and 4096 pods.
- The network should have NAT gateway for subnets to reach to internet. Port 80 and 443 should be open for the load balancer. Allow all traffic between the subnets.
- User/serviceaccount to provision the infrastructure.
- AKS Version should be 1.30 or later.
- Following node pools must be created:
- Compute quotas should be increased for the cluster. Required to ensure sufficient resources are available. Spot instances can help optimize costs for interruptible workloads.
Setting up compute plane
TrueFoundry compute plane infrastructure is provisioned using terraform. You can download the terraform code for your exact account by filling up your account details and downloading a script that can be executed on your local machine.
Choose to create a new cluster or attach an existing cluster
Go to the platform section in the left panel and click on Clusters
. You can click on Create New Cluster
or Attach Existing Cluster
depending on your use case. Read the requirements and if everything is satisfied, click on Continue
.
Fill up the form to generate the terraform code
A form will be presented with the details for the new cluster to be created. Fill in with your cluster details. Click Submit
when done
The key fields to fill up here are:
Region
- The region and availability zones where you want to create the cluster.Resource Group
- The resource group where you want to create the cluster. Chose betweenNew Resource Group
orExisting Resource Group
depending on your use case.Cluster Name
- A name for your cluster.Cluster Version
andnode pools
- The version of the cluster and the node pools to be created.Network Configuration
- Choose betweenNew Vnet
orExisting Vnet
depending on your use case.Storage account (container) for Terraform State
- Terraform state will be stored in this container. It can be a preexisting storage account or a new storage account name. The new storage account will automatically be created by our script.Platform Features
- This is to decide which features like BlobStorage, ClusterIntegration using Azure AD and Container Registry will be enabled for your cluster. To read more on how these integrations are used in the platform, please refer to the platform features page.
The key fields to fill up here are:
Region
- The region and availability zones where you want to create the cluster.Resource Group
- The resource group where you want to create the cluster. Chose betweenNew Resource Group
orExisting Resource Group
depending on your use case.Cluster Name
- A name for your cluster.Cluster Version
andnode pools
- The version of the cluster and the node pools to be created.Network Configuration
- Choose betweenNew Vnet
orExisting Vnet
depending on your use case.Storage account (container) for Terraform State
- Terraform state will be stored in this container. It can be a preexisting storage account or a new storage account name. The new storage account will automatically be created by our script.Platform Features
- This is to decide which features like BlobStorage, ClusterIntegration using Azure AD and Container Registry will be enabled for your cluster. To read more on how these integrations are used in the platform, please refer to the platform features page.
The key fields to fill up here are:
Region
- The region and availability zones where you want to create the cluster.Resource Group
- The resource group where the cluster is already created.Cluster Name
- Your cluster name.Network Configuration
- Existig Vnet and subnet details.Cluster Addons
- TrueFoundry needs to install addons like ArgoCD, ArgoWorkflows, Keda, Istio, etc. Please disable the addons that are already installed on your cluster so that truefoundry installation does not overrride the existing configuration and affect your existing workloads.Storage account (container) for Terraform State
- Terraform state will be stored in this container. It can be a preexisting storage account or a new storage account name. The new storage account will automatically be created by our script.Platform Features
- This is to decide which features like BlobStorage, ClusterIntegration using Azure AD and Container Registry will be enabled for your cluster. To read more on how these integrations are used in the platform, please refer to the platform features page.
Copy the curl command and execute it on your local machine
You will be presented with a curl
command to download and execute the script. The script will take care of installing the pre-requisites, downloading terraform code and running it on your local machine to create the cluster. This will take around 40-50 minutes to complete.
Verify the cluster is showing as connected in the platform
Once the script is executed, the cluster will be shown as connected in the platform.
Create DNS Record
We can get the load-balancer’s IP address by going to the platform section in the bottom left panel under the Clusters section. Under the preferred cluster, you’ll see the load balancer IP address under the Base Domain URL
section.
Create a DNS record in your route 53 or your DNS provider with the following details
Record Type | Record Name | Record value |
---|---|---|
CNAME | *.tfy.example.com | LOADBALANCER_IP_ADDRESS |
Setup routing and TLS for deploying workloads to your cluster
Follow the instructions here to setup DNS and TLS for deploying workloads to your cluster.
Start deploying workloads to your cluster
You can start by going here
Permissions required to create the infrastructure
The IAM user should have the following permissions -
-
Contributor Role to the above Subscription
-
Role Based Access Administrator to the above subscription
-
Either Azure AD Administrator or Azure AD Application Developer role to:
- Create app registrations and service principals
- Assign Reader role to AD application for read-only AKS cluster access
- Assign Monitoring Reader role to applications for cluster monitoring (Ref: How to add Azure admin permission
Setting up TLS in Azure
There are two ways primarily through we can add TLS to the load balancer in Azure
- Using cert-manager + Azure DNS (recommended) - Through this certs get renewed automatically
- Using Certificate and key files - Through this pre-created certs are added to istio