DAPR, KEDA on ARO (Azure RedHat OpenShift): passo a passo by info.odysseyx@gmail.com September 2, 2024 written by info.odysseyx@gmail.com September 2, 2024 0 comment 3 views 3 This task requires configuration of DAPR, KEDA on ARO (Azure RedHat OpenShift). 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 RedHat OpenShift (ARO) Azure Container Registry (ACR) Ferramentas para Desenvolvimento Infrastructure Configuration Use the CLI to sign in to Azure. Make sure it’s suitable for a variety of environments. - $SubscriptionID = '' - $Location = '' - $ResourceGroupName = '' - $ClusterName = '' - $ContainerRegistryName = '' - $ServiceBusNamespace = '' Select Azure assinatura: az account set --subscription $SubscriptionID Cree Resource Group: az group create --name $ResourceGroupName --location $Location Ring the virtual network az network vnet create --address-prefixes 10.0.0.0/22 --name "$ClusterName-vnet" --resource-group $ResourceGroupName Ring the subnet para control plane. az network vnet subnet create --resource-group $ResourceGroupName --vnet-name "$ClusterName-vnet" --name "$ClusterName-control-plane-subnet" --address-prefixes 10.0.0.0/23 Create a subnet for your workers az network vnet subnet create --resource-group $ResourceGroupName --vnet-name "$ClusterName-vnet" --name "$ClusterName-worker-subnet" --address-prefixes 10.0.2.0/23 Describes network policy configuration for private link services az network vnet subnet update --name "$ClusterName-control-plane-subnet" --resource-group $ResourceGroupName --vnet-name "$ClusterName-vnet" --disable-private-link-service-network-policies true Criando seu cluster ARO e conectando ao ACR Cree or Cluster ARO: az aro create --resource-group $ResourceGroupName --name $ClusterName --vnet "$ClusterName-vnet" --master-subnet "$ClusterName-control-plane-subnet" --worker-subnet "$ClusterName-worker-subnet" Crie or container registry: az acr create --name $ContainerRegistryName --resource-group $ResourceGroupName --sku basic Connecting ARO to a Container Registry: az acr credential show -n $ContainerRegistryName oc create secret docker-registry --docker-server=$ContainerRegistryName.azurecr.io --docker-username=<user name> --docker-password=<your password>--docker-email=unused acr-secret oc secrets link default <pull_secret_name> --for=pull Check the URL in the OpenShift console. az aro show --name $ClusterName --resource-group $ResourceGroupName -o tsv --query consoleProfile Pegue trusts OpenShift: az aro list-credentials --name $ClusterName --resource-group $ResourceGroupName -o tsv Verify cluster connectivity. Added for reference: 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 Verify correct OS pod: kubectl get pods -n dapr-system Access the DAPR dashboard and run the following command: Expected answer: DAPR dashboard found in namespace: dapr-system DAPR dashboard available at http://localhost:8080 3. Configuring KEDA in ARO Added for reference: 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 Configuring Transport Cameras via DAPR and KEDA Neste project, here are 3 different options (example): Fazendo is an application distribution 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 . Posted as an image to ACR docker push "$ContainerRegistryName.azurecr.io/consumer-app:1.0.0" docker push "$ContainerRegistryName.azurecr.io/producer-app:1.0.0" Composed of dependent DAPR and KEDA helm upgrade --install app .helmcharts/app -n tree --create-namespace Verify correct OS pod: kubectl get pods -n tree # validar Logs kubectl logs -f -l app=consumer1 --all-containers=true -n tree # configurar a porta para acesso local kubectl port-forward pod/producer1 8081 8081 -n tree # enviar post para a aplicação producer - POST -> http://localhost:8081/plant - Json Body: {"numberOfTrees":100} # Validar status dos pods kubectl get pod -l app=consumer1 -n tree Excluindo os recursos (limpeza) Finally, after the testicles are terminated, a command is executed for the task components that are excluded from the sky blue when the app is running. 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 Delete all Azure resources: az aro delete --resource-group $ResourceGroupName --name $ClusterName az acr delete --resource-group $ResourceGroupName --name $ContainerRegistryName az group delete --name $ResourceGroupName Source link Share 0 FacebookTwitterPinterestEmail info.odysseyx@gmail.com previous post Exciting Kitchen Helper Opportunities Available at Amayra Kitchen in Dombivali, Mumbai next post Remote Desktop Services enrolling for TLS certificate from an Enterprise CA 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.