I have FLask Web app that i published as azure web app. Im getting this error.
I created new resource, downloaded publishing profile and published it from visual studio using the downloaded file. Can someone else tell me what is Microsoft.cis.monitoring.query for? I tried to search around and only things that came up was related to cloud services/worker roles, which i dont believe im using in my project.
my project debug/release was set to "Any CPU".
Things ive tried based on similar questions on here:
changed debug/release to x32
changed debug/release to x64
changed debug/release to x86
i tried all three setttings. (build->configuration->platform) & (solution properties->platform target)
I initialized the webb app using +->web+mobile->web app
Thank you peterPan! Seems like my project somehow was including 'web role' file under project->bin i went ahead and delete and it ran fine. Azure was looking at my projet as a cloud service instead of a web app.
Related
tldr; - When I have deployed a flask app in the past, it uses a requirements.txt file in the main root of the project folder so that azure or heroku can understand what modules need to be installed. However, this is the first time I am messing with django. I am trying to test deploy to azure or heroku but I azure can't detect the stack of the app because there is no requirements.txt file in the main root of the folder.
From messing with django a little bit, it seems alot more complicated than flask. What can I do to test deploy the most basic app to azure app services or heroku or aws or any place in general?
I tried deploying the django app like I normally do with flask but received an error:
Could not auto-detect the runtime stack of your app.
HINT: Are you in the right folder?
For more information, see 'https://go.microsoft.com/fwlink/?linkid=2109470'
Here is a picture of what I am seeing on my side:
I would assume I am not in the right folder but I am not sure if that is the problem completely.
Here is app I am testing myself. Its a microsoft authenication test app where you can test your xbox live account, microsoft school account, or microsoft work account against the webpage: https://github.com/Azure-Samples/ms-identity-python-django-tutorial
**Of course I added the app registration information from azure. Infact, the same app registration information works on my flask app so any azure app registrations issues is probably not the issue. **
The repo you link contains multiple projects. It sounds like you need to clone this, then move one of the project sub-directories (which should have its own requirements.txt already) into a fresh working tree, initialize a new repo there, and then push that to the cloud provider.
I have created a python web app on azure. I also have devOps where I have repository and all the python flask API code.
In azure python web app, under deployment center. I have selected the Azure DevOps and have selected my organization, project, repo and branch. It also has an option of selecting the web application framework in which I think I need to select Python but there is no option of selecting python. If I do not select any framework and click continue, nothing happens. Can anyone please help me in setting this up. Thanks
I suppose you are using a Linux web app, if so, there is no Python option in Web Application Framework, it is just available in the Windows web app.
I'm getting the following error message when trying to deploy my Dash app to Azure:
Error
It then cleans up and says that "Command pyton setup.py egg_info failed with error code 1 in D:\home\site\wwwroot\env\build\Pandas"
What am I doing wrong here? Is there an issue with Pandas?
Funnily enough I ran into the exact same issue for a web app that I am working on at the moment. After 5 days of trying endless solutions I have eventually managed to get my app to deploy to Azure. My app is a Flask web app but the process is pretty much the same (if you are using Django or Dash in your case) or anything else. I am providing my answer based on the most useful links that solved my issue (I checked far too many, but these did the trick!).
This seems to be a known issue with Azure and is to do with Python version and package compatability. The first thing to check here will be the version of python you are using - if you have created your virtual environment in a version of python which is > 3.4 then you will need to install the Azure Python extension. This can be found on the left hand pane of your App Service resource under the category 'Development Tools' -> 'Extensions'. Currently the latest Python extension you can install is version 3.6.4. I had to install this as I was using python 3.6.5 for my web app:
I used the following answer by Konrad Lyda to help me solve my issue : Using python 3.6 on azure app services - not working despite it is installed as extension. You will have to manually install your packages using the kudu console and by adding a .skipPythonDeployment file. This is all explained in the link. I managed to replicate the same WSGI_HANDLER Error as highlighted and some further research led me to this link: https://github.com/Cojacfar/FlaskWeb . I know this link is Flask specific but the project structure should really help. You will need to add a web.config file to your project (just take the code from the web.config file in the git project) and replace the 'WSGI_HANDLER' value to the name of your app file. My app was defined in my views.py file so the value I used was 'views.app'.
The line that did it for me was:
wsgi_app = app.wsgi_app
which goes under your app declaration. For example, as I was using Flask and Flask boostrap I have the following in my app file:
app = Flask(__name__)
bootstrap = Bootstrap(app)
wsgi_app = app.wsgi_app
Once I got all my code in place I removed any unnecessary files that I did not need and deployed to Azure and it started working!
Let me know you get on. Hope this helps.
I'm deploying a django (python) application. I wondered what is the best way to deploy it. With microsoft azure or Amazon Elastic Beanstalk ?
The application just needs to view data from a database. What are (dis)advantages of azure or elastic beanstalk?
I'm using OSX 10.9.5 and Python 3.4.3
As Gaurav Mantri said, you need to provide more details - atleast the OS you are using. Some more surfing could lead you here :
What's the recommended way to deploy a Django app on IIS?
For web apps, Azure has Azure App Service. Deployment can be done through a variety of ways, including FTP, git, or from Visual Studio. Since you're using Mac, I would recommend deploying via git.
To do so, first create a web app in the Azure portal, and then follow the steps here:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
The advantages of Azure App Service, is that you can easily scale your app to many machines, and everything is taken care for you. Note that depending on how you've configured your database, you would have to deploy that separately.
Also, if you want to test Azure App Service, you can easily create a small sample Django application, using the Azure gallery. See the screen shot below.
Azure Web Apps provide a volume of ways for deployment your web applications. We can leverage tools/IDEs including FTP tools , Visual Studio and WebMatrix on Windows for remoting and modifying your web site code, and leverage repository for continuous deployment including local GIT, GITHUB, Visual Studio Online, Dropbox, Bitbucket.
It depends which way you prefer to.
As # theadriangreen mentioned, Azure Web Apps provide Django template for a quick start, you can simply create a Django application and pull the code to local leveraging the methods above.
Beside Continuous deployment using GIT in Azure App Service, you also can refer to Creating web apps with Django in Azure for more information.
I have been added as developer on application.
On Applications Overview this app is shown together with my other app, that I can freely access and change via Google App Engine Launcher.
Question is how to get app I'm supposed to work on my computer locally(in other words in GAE), so I can test and change it locally in the browser on my computer...
Windows 7
App Engine SDK-release: "1.7.6"
API: python27
You can use the appcfg application (the one that handle uploads) to download the source code.
This only works if the administrator has not disabled it.
However, it would be better to ask the developpers to provide you with the original source code !