Need Expert Advice on Azure Function App V2 and CI/CD Pipeline Best Practices

Yogesh Jain 0 Reputation points
2023-09-26T20:48:48.9566667+00:00

We're in the midst of developing a B2B SaaS application focusing on procurement services and analytics. We've designed our architecture to be robust, leveraging Azure AD B2C custom policies for user authentication, Azure API Management (APIM) for JWT validation, and Python-based Azure Function App V2 model for our backend API.

We're satisfied with our architectural choices but have two specific challenges that we'd love your input on:

Azure Function App V2 and the Blueprint Concept

We've opted for the Function App V2 model due to its decorator-based route and function registration features. We're currently unsure whether the Blueprint concept from the V1 model is still applicable in the V2 model, and any guidance on this would be invaluable. We are using SQLAlchemy to interact with Postgres db.

CI/CD Pipeline Best Practices

We've gleaned much from existing tutorials on setting up CI/CD pipelines for Azure Functions and APIM. Still, we're seeking targeted advice on constructing a CI/CD pipeline that suits our application's unique requirements.

Specific Questions:

  1. Is the Blueprint concept from the Azure Function App V1 model relevant for the V2 model? If so, how can it be implemented?
  2. What are the best practices for building a CI/CD pipeline specific to a Python-based Azure Function App V2 model?

We would greatly appreciate your insights and suggestions. Your expertise could be pivotal in enhancing our application's robustness and maintainability.

Looking forward to your responses!WhatsApp Image 2023-09-27 at 1.08.29 AM

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,090 questions
Azure Startups
Azure Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Startups: Companies that are in their initial stages of business and typically developing a business model and seeking financing.
382 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,531 Reputation points
    2023-09-28T11:29:04.9533333+00:00

    @Yogesh Jain Thanks for reaching out.

    The Blueprint concept from the Azure Function App V1 model is not directly applicable to the V2 model. However, you can achieve similar functionality by using Azure Functions Proxies. Proxies allow you to define routes and route templates that map to your function endpoints. This can help you organize your functions and provide a more structured API surface. You can learn more about Azure Functions Proxies in the official documentation.

    For your second question, there are several best practices for building a CI/CD pipeline. Here are a few suggestions:

    1. Use a source control system like Git to manage your codebase. This will allow you to track changes, collaborate with your team, and roll back changes if necessary.
    2. Use a build system like Azure Pipelines to automate your build and deployment process. Azure Pipelines can be configured to build your Python code, run tests, and deploy your code to Azure Functions and APIM.
    3. Use a package manager like pip to manage your Python dependencies. This will make it easier to install and update your dependencies, and ensure that your code is using the correct versions of each package.
    4. Use environment variables to store sensitive information like connection strings and API keys. This will help you keep your secrets secure and separate from your codebase.
    5. Use automated testing to ensure that your code is working as expected. This can include unit tests, integration tests, and end-to-end tests.

    For more details you can refer to python guide and continuous deployment

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.