MATIH Platform is in active MVP development. Documentation reflects current implementation status.
18. CI/CD & Build System
Scripts Library
Azure Libraries

Azure Libraries

The Azure libraries provide functions for Azure Kubernetes Service (AKS) management, Azure Container Registry (ACR) operations, authentication, resource naming, and AKS self-healing. These modules are used when the platform is deployed on Azure infrastructure.

Source: scripts/lib/azure/


aks.sh -- AKS Cluster Management

Module: scripts/lib/azure/aks.sh

Configuration

VariableDefaultDescription
AKS_CLUSTER_NAMEmatihlabsaksAKS cluster name
AKS_RESOURCE_GROUPmatihplatformrgAzure resource group

Functions

FunctionDescription
aks_existsCheck if the AKS cluster exists
aks_get_credentialsDownload kubectl credentials for the cluster
aks_get_nodepool_countGet the number of nodes in a nodepool
aks_scale_nodepoolScale a nodepool to a target count

Credential Retrieval

aks_get_credentials "matihlabsaks" "matihplatformrg" false true
# --admin=false --overwrite-existing=true

acr.sh -- Container Registry

Module: scripts/lib/azure/acr.sh

Functions

FunctionDescription
acr_loginAuthenticate to Azure Container Registry
acr_image_existsCheck if an image tag exists in ACR
acr_get_latest_tagGet the most recent tag for a repository
acr_list_tagsList tags for a repository

auth.sh -- Authentication

Module: scripts/lib/azure/auth.sh

Functions

FunctionDescription
azure_loginLogin to Azure CLI (service principal or interactive)
azure_set_subscriptionSet the active Azure subscription
azure_check_loginVerify Azure CLI is authenticated

naming.sh -- Resource Naming

Module: scripts/lib/azure/naming.sh

Provides consistent naming conventions for Azure resources.

Naming Pattern

matih-{component}-{environment}-{region}-{suffix}

aks-healing.sh -- Self-Healing

Module: scripts/lib/azure/aks-healing.sh

Implements pre-deployment health checks and automatic recovery for AKS clusters.

Functions

FunctionDescription
aks_healing_pre_deployRun health checks before deployment
aks_healing_check_nodesVerify all nodes are Ready
aks_healing_check_system_podsVerify kube-system pods are healthy
aks_healing_restart_unhealthyRestart unhealthy system components

providers.sh -- Resource Provider Registration

Module: scripts/lib/azure/providers.sh

Ensures required Azure resource providers are registered in the subscription.


Related Pages