Skip to content

oaviles/logicapp_containerized

Repository files navigation

PoC: Logic App deployed on Kubernetes

Deploy Logic App Anywhere

Steps to deploy this PoC

  1. GitHub account and repository.
  2. Azure subscription.
  3. A Service Principal with Contributor role at subscription scope. This is the identity that will be used to access the Azure resources from GitHub Action.
    • If you don't have a Service Principal, create one by following these steps.
  4. Deploy Azure Kubernetes Service, your can reuse this project and run GitHub Action called "Depoy AKS Env". Optional, you can also depoy this PoC on:
  5. Create an Azure Storage Account and get Connection String.
az storage account create --name <account-name> --resource-group <storage-resource-group> --location eastus --sku Standard_LRS --kind StorageV2
az storage account show-connection-string --name <account-name> --resource-group <storage-resource-group>
  1. Encode your "Azure Storage Account Connection String" o Create a Secret in Kubernetes called "storage-cs" and key "csc" with your "Azure Storage Account Connection String" .
echo '<<your_azure-storage-account_connectionstring>>' | based64
kubectl create secret generic storage-cs --dry-run=client -o yaml --from-literal=scs='<<your_azure-storage-account_connectionstring>>'
  1. Update YAML files called "logicapp-pod.yaml" with your encoded "Azure Storage Account Connection String" in line 8.
  2. Create Secrets refered in Gihub Actions called "build-push-image.yml"
  3. Build a Push Image to Container Registry (ACR), reuse GitHub Workflow called "build-push-image.yml"
  4. Deploy Logic App on Kubernetes using YAML file called "logicapp-pod.yaml"
  5. Validate deployment, get ip address assignet to deployment and check if logic app is deployed.
kubectl get service -n logicapp
curl -I <<your_ip-address>>
  1. Open Postmand and fetch logic app URL using callback URL

    • Fetch master key from your Azure Blob Storage in container name "azure-webjobs-secrets" and file name "host.json", this key will help in fetching callback URL, Image reference.
    • http://<<your_ip-address>>:80/runtime/webhooks/workflow/api/management/workflows/oapistaless/triggers/manual/listCallbackUrl?api-version=2020-05-01-preview&code=<<your_logicapp-master-key>>
  2. Copy and Paste in your Bowser value from postman results (line 2). This this an example of url value:

    • http://localhost:80/api/{your logic app workflow name}/triggers/manual/invoke?api-version=2020-05-01-preview&sp={value for sp}&sv={value for sv}&sig={value for sig}
    • http://<<your_ip-address>>:80/api/oapistaless/triggers/manual/invoke?api-version=2020-05-01-preview&sp={value for sp}&sv={value for sv}&sig={value for sig}
  3. A random number will be displayed in your browser.

  4. Test and Enjoy PoC

You can learn more about Logic Apps here:

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

PoC about Cloud-Native. Build and Deploy Azure Logic Apps to Kubernetes based on DevSecOps Practices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published