Giter VIP home page Giter VIP logo

Comments (15)

AmrutaKawade avatar AmrutaKawade commented on August 14, 2024

@Salazander can you share your workflow yaml?

from webapps-deploy.

Salazander avatar Salazander commented on August 14, 2024

@AmrutaKawade
Here is a redacted version of my workflow (none of the paths make sense obviously):

name: 'Deploy XXX to Azure'

on:
  workflow_dispatch:
  workflow_run:
    workflows: ["Publish docker images"]
    branches: [main]
    types: 
      - completed

jobs:
  deploy-to-azure-app-service:
    runs-on: ubuntu-latest    

    env:
      ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
      ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
      ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
      ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
     
    steps:
      - name: 'Checkout the repo' 
        uses: actions/checkout@v2
        with:
          ref: 'main'

      - name: 'Setup Terraform'
        uses: hashicorp/setup-terraform@v1
        with:
          terraform_wrapper: false

      - name: 'Terraform Init'
        run: terraform init -backend-config=xxx-yyy.tfvars
        working-directory: ./terraform/dev

      - name: 'Set AppService Name as ENV variable'
        run: echo "APP_SERVICE_NAME=$(terraform output appservice_xx_name | tr -d '"')" >> $GITHUB_ENV
        working-directory: ./terraform/dev

      - name: 'Login via Azure CLI'
        uses: azure/login@v1
        with:
          creds: "{\"clientId\":\"${{ secrets.AZURE_CLIENT_ID }}\",\"clientSecret\":\"${{ secrets.AZURE_CLIENT_SECRET }}\",\"subscriptionId\":\"${{ secrets.AZURE_SUBSCRIPTION_ID }}\",\"tenantId\":\"${{ secrets.AZURE_TENANT_ID }}\" }"   
                 
      - name: 'Deploy the XXX-WebApp' 
        uses: azure/webapps-deploy@v2
        with:
          app-name: ${{ env.APP_SERVICE_NAME }}
          images: 'docker.pkg.github.com/xxx/yyy/zzz:latest'
        
      - name: 'Kickstart the XXX-WebApp'
        run: curl "https://${{ env.APP_SERVICE_NAME }}.azurewebsites.net"



from webapps-deploy.

AmrutaKawade avatar AmrutaKawade commented on August 14, 2024

Enable debugging for your workflow -

Set ACTIONS_STEP_DEBUG = true in secrets

check if there are any warnings/failures in restart of web app.

also check if docker registry details are updated in webapp in container settings section on Azure Portal

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

@Salazander Can you please send debug logs?

from webapps-deploy.

aksm-ms avatar aksm-ms commented on August 14, 2024

Closing the issue since debug logs are not available. Feel free to open the issue in case of any queries.

from webapps-deploy.

JasonFreeberg avatar JasonFreeberg commented on August 14, 2024

Hi @Salazander -- Were you able to pull the image locally? It looks like GitHub changed the hostname of the GitHub Container registry to ghcr.io/username/repo:tag (doc below). GitHub used to have an old version of the container registry on pkg hostname but I don't think that's supported any more.

https://docs.github.com/en/packages/guides/pushing-and-pulling-docker-images

from webapps-deploy.

Salazander avatar Salazander commented on August 14, 2024

@JasonFreeberg Pulling locally works as you can see in the attached screenshot (there is a warning though...). We are aware of the ongoing transition to GitHub Container Registry, but my understanding is that it is still in beta
image

from webapps-deploy.

Salazander avatar Salazander commented on August 14, 2024

For posterity: We've transitioned to Azure Container Registry and it looks like the latest image is automatically pulled.

from webapps-deploy.

Salazander avatar Salazander commented on August 14, 2024

@AmrutaKawade @aksm-ms
I've attached the requested log:
1_deploy-to-azure-app-service.txt

And below is the log output from Azure App Service - Container Settings. Note that the image was pulled only after I manually opened the WebApp's-URL in my browser, observe the timestamps. That's why I added an additional step to the GitHub-workflow to GET the WebApp's endpoint.

2021-02-02T08:55:29.389Z INFO - Pulling image: docker.pkg.github.com/redacted/redacted/vredactedr:latest
2021-02-02T08:55:29.758Z INFO - latest Pulling from redacted/aredactedn/vredactedor
2021-02-02T08:55:29.759Z INFO - Digest: sha256:e9b38e280900c55ee15fbc5e4260e043870e3cc281342e26e484d6768abfdfd5
2021-02-02T08:55:29.759Z INFO - Status: Image is up to date for docker.pkg.github.com/redacted/redacted/redactedr:latest
2021-02-02T08:55:29.761Z INFO - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2021-02-02T08:55:29.782Z INFO - Starting container for site

from webapps-deploy.

20shivangi avatar 20shivangi commented on August 14, 2024

@Salazander Are you able to pull the latest image from github container registry?

from webapps-deploy.

20shivangi avatar 20shivangi commented on August 14, 2024

@Salazander Can you please answer the above question , if you are able to pull the latest image ?

from webapps-deploy.

20shivangi avatar 20shivangi commented on August 14, 2024

There has been no response for so long so we are closing this issue. Please feel free to reach out to us in case of any queries. Thanks

from webapps-deploy.

MrThePlague avatar MrThePlague commented on August 14, 2024

@aksm-ms -- it looks as though I'm experiencing this same issue, with Azure WebApp for Containers, using ACR as the container registry. Is there a secure way for me to share the GitHub deploy logs, and the workflow file?

from webapps-deploy.

Salazander avatar Salazander commented on August 14, 2024

@20shivangi Sorry for the delayed response, I am able to pull the image locally as I already demonstrated above: #99 (comment)

from webapps-deploy.

MrThePlague avatar MrThePlague commented on August 14, 2024

@20shivangi Sorry for the delayed response, I am able to pull the image locally as I already demonstrated above: #99 (comment)

I noticed you're using the latest tag in this workflow. I was experiencing the same issue; however, I changed the tag to the commit id, ${{ github.sha }}, and everything seems to be working perfectly now. Maybe worth a shot.

from webapps-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.