Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Ensure that you have Python 3.6 installed on your local machine. Azure Functions currently only supports Python 3.6.

  2. Install the Azure Functions extension for Visual Studio Code.

  3. In Visual Studio Code, click the Azure icon.

    Image RemovedImage Added
  4. Click Create New Project...

    Image RemovedImage Added
  5. Choose a folder in your repository in which to create the new Azure FunctionmFunction, and click Select.

    Image RemovedImage Added
  6. Choose HTTP trigger from the dropdown list.

    Image RemovedImage Added
  7. Specify a name for the HTTP trigger and press 'Enter'.

    Image RemovedImage Added
  8. Choose the Function authorization level for the HTTP trigger. This will ensure that the function can only be invoked if a function key is passed as a parameter.

    Image RemovedImage Added
  9. Code your Python function. Note that the function will be called via the main function in __init__.py.

  10. Add the Python packages on which your code is dependent to the requirements.txt file. See the pip documentation for more information on requirements files.

...

  1. Azure Python function apps are currently in Preview, and thus are not available in all regions (including Canada Central). In order for Azure Python function apps to access the eGIS environments' portal URLs, we set up the following temporary solution:
    Create an app service plan in the East US region. Note that this app service plan has a fixed monthly cost regardless of usage. For production deployment, we will use a consumption plan (also in Preview) that will cost only per usage.

  2. Create the Azure function app using the app service plan.

  3. Determine the outbound IP addresses used by the Azure function app.

    1. Open the 1. Function App in the Azure portal, click on the 2. Platform features tab, and click on 3. Resource Explorer

      Image RemovedImage Added

    2. Find the key named outboundIpAddresses in the configuration, and copy the set of IP addresses there.

  4. Configure the eGIS environment's virtual network to allow HTTPS traffic from these IP addresses. In the Azure portal, navigate to the eGIS environment's web VM, click Networking,the modify hte HTTPS rule (port 443) to allow traffic from these IP addresses.

...