Versions Compared

Key

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

...

You've created a CI / CD pipeline that will automatically deploy and run your Python script when you merge it into the master branch in your Azure DevOps repository.

Redeploy Azure Function App

Once Azure Function App is setup, it is in maintenance stage. It might require to do bug fix, or add new functions in. After checking in the code from Visual Studio Code, you need to redeploy the function app. Visual Studio Code cannot be used to deploy Function App, it requires Docker to do so. Once the pipeline is setup, the checked in code should be automatically deployed. Sometimes there are errors with this automation step.

From DevOps, open Release-93, which has the error mark:

...

Open the Logs, and the error is listed:

...

There is a restriction though that Azure is expecting 20 seconds interval between the two deployment, e.g., from DEV to Sandbox. Once time out happens on DEV for example, deployment can still work on Sandbox, while Pilot and PROD require manual intervention before doing deployment.

For the possible errors and solutions, it will be added in RDIMS-#15688753.

Notes on Setup

Folder Structure

...

  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.

...