0

We have a problem deploying a python application to App service using the Az CLI. Do you have an idea of the problem source ?

Here is the command we use. We execute it on an ubuntu VM. az webapp up -n $WEB_APP_NAME -l "westeurope" -g $RESOURCE_GROUP_NAME --sku B1

Here is the error we have. We don't get it :

Zip deployment failed. {'id': '200a84e1e024461ca2ef18edd8c3f607', 'status': 3, 'status_text': '', 'author_email': 'N/A', 'author': 'N/A', 'deployer': 'Push-Deployer', 'message': 'Created via a push deployment', 'progress': '', 'received_time': '2021-06-22T15:49:57.8395052Z', 'start_time': '2021-06-22T15:49:59.5399261Z', 'end_time': '2021-06-22T15:50:13.4118115Z', 'last_success_end_time': None, 'complete': True, 'active': False, 'is_temp': False, 'is_readonly': True, 'url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest', 'log_url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest/log', 'site_name': 'test-surveillance-api-2'}. Please run the command az webapp log deployment show -n test-surveillance-api-2 -g azr-rg-bpceit-bpcesa-d2i2`

Here is a link to the full deployment log. In those logs, I saw the following errors. They are not clear haha.

knack.util.CLIError: Zip deployment failed. {'id': '273909f740bd44de93111b0576d235f9', 'status': 3, 'status_text': '', 'author_email': 'N/A', 'author': 'N/A', 'deployer': 'Push-Deployer', 'message': 'Created via a push deployment', 'progress': '', 'received_time': '2021-06-22T16:11:12.3912894Z', 'start_time': '2021-06-22T16:11:13.5603203Z', 'end_time': '2021-06-22T16:11:23.3248561Z', 'last_success_end_time': None, 'complete': True, 'active': False, 'is_temp': False, 'is_readonly': True, 'url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest', 'log_url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest/log', 'site_name': 'test-surveillance-api-2'}. Please run the command az webapp log deployment show -n test-surveillance-api-2 -g azr-rg-bpceit-bpcesa-d2i2
cli.azure.cli.core.azclierror : Zip deployment failed. {'id': '273909f740bd44de93111b0576d235f9', 'status': 3, 'status_text': '', 'author_email': 'N/A', 'author': 'N/A', 'deployer': 'Push-Deployer', 'message': 'Created via a push deployment', 'progress': '', 'received_time': '2021-06-22T16:11:12.3912894Z', 'start_time': '2021-06-22T16:11:13.5603203Z', 'end_time': '2021-06-22T16:11:23.3248561Z', 'last_success_end_time': None, 'complete': True, 'active': False, 'is_temp': False, 'is_readonly': True, 'url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest', 'log_url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest/log', 'site_name': 'test-surveillance-api-2'}. Please run the command az webapp log deployment show -n test-surveillance-api-2 -g azr-rg-bpceit-bpcesa-d2i2
Zip deployment failed. {'id': '273909f740bd44de93111b0576d235f9', 'status': 3, 'status_text': '', 'author_email': 'N/A', 'author': 'N/A', 'deployer': 'Push-Deployer', 'message': 'Created via a push deployment', 'progress': '', 'received_time': '2021-06-22T16:11:12.3912894Z', 'start_time': '2021-06-22T16:11:13.5603203Z', 'end_time': '2021-06-22T16:11:23.3248561Z', 'last_success_end_time': None, 'complete': True, 'active': False, 'is_temp': False, 'is_readonly': True, 'url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest', 'log_url': 'https://test-surveillance-api-2.scm.azurewebsites.net/api/deployments/latest/log', 'site_name': 'test-surveillance-api-2'}. Please run the command az webapp log deployment show -n test-surveillance-api-2 -g azr-rg-bpceit-bpcesa-d2i2

More details about the environment: OS : Ubuntu 18.04.5 LTS Python version : 3.8.7

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15
Sevy
  • 15
  • 2
  • 6
  • did you try the recommended command in the error message ? "Please run the command az webapp log deployment show -n test-surveillance-api-2 -g azr-rg-bpceit-bpcesa-d2i2" – KarthikBhyresh-MT Jun 25 '21 at 08:33
  • Yes, I tried it, but it just redirects me to a json containing lot of stuffs I can't understand. – Sevy Jun 25 '21 at 09:26

2 Answers2

0

I solved my problem !!

After doing some researches, I noticed the problem was with the requirements.txt and the repository containing my files.

So, I copied the files in another repository. And I generated the requirements.txt with the python of my python virtual env (./env/bin/python3), not with the one installed in the OS.

I don't understand why this was the problem. If someone knows, please tell me.

Have a good day.

Sevy
  • 15
  • 2
  • 6
0

Here is an alternative solution, you can use continuous deployment. You can use git. If the code is confidential, you can also use your own to create a git storage service locally and use local git for deployment. In this case, the application will be automatically deployed after each modification is submitted.

For Further details Refer this SO link .

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15
  • If above mentioned answer also helpful, Could you please accept the answer as solution. This could help other community users who have similar query in the future. – AjayKumarGhose Jun 26 '21 at 10:26