microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
358 stars 27 forks source link

Azure devops samples #533

Open feveden opened 1 year ago

feveden commented 1 year ago

Hi, All the examples related to Azure Container Apps CI/CD deployment is shown with GitHub actions. Why do we not have any Azure DevOps samples. For instance, I would like to see the Microsoft's eshopOnDapr reference application deployed to Azure Container apps with docker-compose via Azure DevOps pipelines. Thanks.

KarenTazayan commented 1 year ago

Hi @feveden, this sample I use for Azure Pipelines workshops. You can use it. I will provide detailed tutorial later.

feveden commented 1 year ago

@KarenTazayan That is great. I appreciate it very much. I am looking forward to your tutorials.

feveden commented 1 year ago

@KarenTazayan I have just looked inside of the folders. What I had meant was actually the image building(via docker-compose) and pushing the images to the ACR tasks in the azure devops pipelines. I think your set up assumes we push our docker images separately into the ACR ( or the likes) beforehand. Nevertheless very useful.

KarenTazayan commented 1 year ago

@feveden let me explain a little bit more. This pipeline sample which I use for our workshops is fully (near 100%) automated. I just use docker only to provide Azure Pipelines Agents based on docker images. The process of building images for Azure Container Apps is completely automated and uses Docker In Docker principle. For production usage, it is NOT secure but for demos and workshops, it is ok. Please see this part for example:

- task: Bash@3
      displayName: 'Push ShoppingApp.SiloHost container image'
      inputs:
        targetType: inline
        script: |
          echo "ACR credentials is: $(acrUrl) $(acrLogin) $(acrPassword)"
          docker login $(acrUrl) -u $(acrLogin) -p $(acrPassword)
          cd "$(Build.SourcesDirectory)"
          docker build -t "$(acrUrl)/shoppingapp/silohost:$(GitVersion.SemVer)" -f src/ShoppingApp.SiloHost/Dockerfile . \
            --build-arg assemblyInformationalVersion=$(GitVersion.InformationalVersion)
          docker push "$(acrUrl)/shoppingapp/silohost:$(GitVersion.SemVer)"
SophCarp commented 1 year ago

Hi @feveden, has your needs been addressed? I want to make sure before I close this issue.

feveden commented 1 year ago

Hi @SophCarp Partly addressed. I would like, for instance, an application similar to the EShopOnDapr or EshopOnContainers reference app examples adapted to AzureDevops pipeline where docker-compose file is utilized instead of a single docker file for each microservice. I hope I made my case clear.