Configuring Deployment

While the included PowerShell scripts may be edited freely, it is possible to set most configuration options through your Python project.

To specify the version of Python your web should run with, make it the active environment for your project. (Ensure that you have a WebPI reference or startup task to install this version on the instance - see the documentation in ConfigureCloudService.ps1 for more details.)

If your version of Python cannot be detected using the CPython registry keys after it has been installed, you can add the DeployedPythonInterpreterPath property to your Python project by editing the .pyproj file. This path will take precedence over the active environment.

To install packages using pip, update the requirements.txt file in the root directory of your project.

To set PYTHONPATH (or equivalent) before running the web, add the necessary Search Paths to your project.

To specify your main handler script, make it the startup file in your project. Alternatively, you can set the full importable name of your WSGI app in Project Properties\Web\WSGI Handler.

Troubleshooting Deployment

If your web role does not behave correctly after deployment, check the following:

  1. Your Python project includes a bin\ folder with (at least):

  2. Your Cloud project references those files from the service definition.
  3. Your Python project includes either:

  4. Enable Remote Desktop on your Cloud Service and investigate the log files.

    Logs for ConfigureCloudService.ps1 are stored in the following path on the machine instance:

  5. Start a discussion at our discussion forum for further help.

This readme file may be deleted when you no longer need it.