Configurando DAPR, KEDA no AKS by info.odysseyx@gmail.com August 22, 2024 written by info.odysseyx@gmail.com August 22, 2024 0 comment 6 views 6 no way CNCF (Cloud Native Computing Foundation) Define Cloud native applications The como software comprises various services and interdependent chamados. Microservices. Essas aplicações são projetadas para aproveitar ao máximo as inovações em computação em nuvem, como Scalability, It’s safe, pliability E Otomasao. Some projects Cloud native I found out more CNCF Includes: Kubernetes, Prometheus, Envoy, Jaeger, Helm, DAPR, KEDA e, etc. Neste artigo, falaremos sobre DAPR, KEDA and como esta Combinação pode trazer eficiência e flexibilidade na construção de aplicações em Kubernetes. DAPR: Distributed Application Runtime DAPR The serverless version allows for runtime portability, easy event management for configuring microserver elasticity, basic message consumption through brokers, etc., and simple mesh management. Various languages and frameworks. KEDA: Kubernetes event-based automatic scaling Keda Simple auto-scaling application, extend the application according to your requirements (pillars, items, etc.) To automatically orient the application in an efficient form (escape for zero) você escale cargas de trabalho de que significa que seu applicación pode escalar dinamicamente para zero instâncias when no one is there, assisted in optimization of the user. Desta forma, aproveitei para montar este repositório no GitHub The “App-Plant-Tree” combination of concepts about Cloud-Native Architecture consists of the following technologies: Go – Producer/Consumer App Distributed Application Runtime – DAPR Kubernetes Event-Based Auto-Scaling – KEDA Azure Kubernetes Service (AKS) Azure Container Registry (ACR) Azure Service Bus (ASB) Ferramentas para desenvolvimento Infrastructure Configuration Logando no Azure usando a linha de commando (CLI): az login The alternative os values of the variáveis abaixo conform to their surroundings. - $SubscriptionID = '' - $Location = '' - $ResourceGroupName = '' - $AKSClusterName = '' - $ContainerRegistryName = '' - $ServiceBusNamespace = '' Subscribe: az account set --subscription $SubscriptionID Create your own resource group: az group create --name $ResourceGroupName --location $Location 1. Creandos Cluster AKS and connect to ACR Configuration of AKS (Azure Kubernetes Service) cluster: az aks create --resource-group $ResourceGroupName --name $AKSClusterName --node-count 3 --location $Location --node-vm-size Standard_D4ds_v5 --tier free --enable-pod-identity --network-plugin azure --generate-ssh-keys Optionally, if you would like to help support Microsoft (no link), here is how to install DAPR and KEDA via extensions/add-ons. Crie or Azure Container Registry (ACR): az acr create --name $ContainerRegistryName --resource-group $ResourceGroupName --sku basic Connect AKS to ACR: az aks update --name $AKSClusterName --resource-group $ResourceGroupName --attach-acr $ContainerRegistryName Pegue as credenciais para se conectar ao cluster AKS: az aks get-credentials --resource-group $ResourceGroupName --name $AKSClusterName --overwrite-existing Verify cluster connectivity. kubectl cluster-info 2. Configuring DAPR on AKS via helmcharts Add to References: helm repo add dapr https://dapr.github.io/helm-charts/ helm repo update helm upgrade --install dapr dapr/dapr --namespace dapr-system --create-namespace helm upgrade --install dapr-dashboard dapr/dapr-dashboard --namespace dapr-system --create-namespace The confirmed OS pods are: kubectl get pods -n dapr-system 2.1 Configuration o DAPR Dashboard to access the DAPR dashboard, or run the next command dapr dashboard -k Expected Results: DAPR dashboard found in namespace: dapr-system DAPR dashboard available at http://localhost:8080 3. Configure KEDA no AKS via helmcharts Add to References: helm repo add kedacore https://kedacore.github.io/charts helm repo update helm upgrade --install keda kedacore/keda -n keda-system --create-namespace helm upgrade --install keda-add-ons-http kedacore/keda-add-ons-http -n keda-system --create-namespace The confirmed OS pods are: kubectl get pods -n keda-system 4. Organize transport operations of DAPR and KEDA. Neste projeto, temos três diferentes opções para configurar a camada de Transporte(escolha uma): Deploying applications without AKS 1. Criando as imagens docker az acr login --name $ContainerRegistryName docker build -t "$ContainerRegistryName.azurecr.io/consumer-app:1.0.0" -f cmd/consumer/dockerfile . docker build -t "$ContainerRegistryName.azurecr.io/producer-app:1.0.0" -f cmd/producer/dockerfile . 2. Subindo as imagens no Container Registry ACR docker push "$ContainerRegistryName.azurecr.io/consumer-app:1.0.0" docker push "$ContainerRegistryName.azurecr.io/producer-app:1.0.0" 3. Application Helmchart das Aplicações helm upgrade --install app .helmcharts/app -n tree --create-namespace The confirmed os pods are confirmed in Rodando:: kubectl get pods -n tree 4. Tested with application kubectl logs -f -l app=consumer1 --all-containers=true -n tree kubectl port-forward pod/producer1 8081 8081 -n tree - POST -> http://localhost:8081/plant - Json Body: {"numberOfTrees":100} kubectl get pod -l app=consumer1 -n tree 4. Remove resources Remove the Helm chart: helm uninstall app -n tree helm uninstall keda-add-ons-http -n keda-system helm uninstall keda -n keda-system helm uninstall dapr -n dapr-system Exclude to-dos and repetitive tasks in Azure. az aks delete --name $AKSClusterName --resource-group $ResourceGroupName az acr delete --name $ContainerRegistryName --resource-group $ResourceGroupName az group delete --name $ResourceGroupName References Source link Share 0 FacebookTwitterPinterestEmail info.odysseyx@gmail.com previous post Global AI security hampered by indecision, regulatory delays next post Introducing AI21 Labs Jamba 1.5 Large and Jamba 1.5 Mini on Azure AI Models-as-a-Service You may also like From Zero to Hero: Building Your First Voice Bot with GPT-4o Real-Time API using... October 12, 2024 A Guide to Responsible Synthetic Data Creation October 12, 2024 Capacity Template – MGDC for SharePoint October 11, 2024 Using Azure NetApp Files (ANF) for data- and logfiles for Microsoft SQL Server in... October 11, 2024 Microsoft Community – Do you love stickers?! Do you want to be a part... October 11, 2024 Advanced Alerting Strategies for Azure Monitoring October 11, 2024 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.