Azure Functions Help,mainly around deloyment

EnenDaveyBoy 66 Reputation points
2020-10-17T14:04:22.307+00:00

Hi

I have developed a series for what I call micro services on my local machine using visual studio code, I have two micro services products and categories, which has a root folder,which has a functions project and class library project,and there is an additional folder with a shared project.

Since I can only debug 1 project at a time to moc the cross services communication I added basic activity functions with static content (this doesn't feel right is there a better way to do it)

All my functions in the local setup use the same storage for everything.

Now I am looking to upload and configure a staging environment to get things ready fora live environment.

so I have a few questions

Do I have a different function app's for products and categories?

How do i upload the functions to azure, they both have with additional dll's, the functions all use dependency injection. There is nothing in the extension that i can see that helps.

The MS docs state its best practice to not re use azure storage, is that on a function level, app function level or combination of the two?

Any information would be appriciated

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,029 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,636 Reputation points Microsoft Employee
    2020-10-19T11:26:56.377+00:00

    I'll try to be as elaborate as possible. Please let me know if I might miss something.

    Starting with the root folder, the structure you have is ideal. Something like this if I'm not wrong

       - root  
         |- FunctionA  
         |- FunctionB  
         |- SharedLibraryA  
         |- SharedLibraryB  
    

    and while running them locally, it is fine to use the same storage account or storage emulator.

    As for testing them locally, you should be able to run different function apps at different ports to test inter-service communication. Depending on how you are running them, there should be an option for specifying the port.

    For example, with func, you could run func host start --port 7072. In VSC, you could update .vscode/tasks.json to include the port by adding --port=7072 to the host start command like below
    33337-image.png

    ---

    For running it on Azure, its best to have separate function apps (and storage accounts) to ensure they don't affect each other's performance. From a cost perspective, there should be no difference I believe.

    For deploying them, once you have each function app open in separate VSC windows, you can deploy them individually, which takes care of all dependencies as long as the references are setup correctly.


0 additional answers

Sort by: Most helpful

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.