How do I share function code between projects?Microsoft AZURE blob triggered function working intermittentlyAzure function app and SignalRCan we have two separate bin folders within a single Function App?Is it possible to disable AAD Auth on specific Azure functions?Best method for deploying Azure function app application settingsAzure Function Transforms During VSTS BuildHow do I configure a session cookie in Azure Functions?Deploying a precompiled f# function to Azure Functions v2Grant Access to a Shared Mailbox From an ApplicationReference external script in JavaScript Azure Function code
How to be diplomatic in refusing to write code that breaches the privacy of our users
What's the purpose of "true" in bash "if sudo true; then"
Coordinate position not precise
How was Earth single-handedly capable of creating 3 of the 4 gods of chaos?
How will losing mobility of one hand affect my career as a programmer?
If you attempt to grapple an opponent that you are hidden from, do they roll at disadvantage?
Lay out the Carpet
Is there a good way to store credentials outside of a password manager?
Can criminal fraud exist without damages?
Is a roofing delivery truck likely to crack my driveway slab?
Will it be accepted, if there is no ''Main Character" stereotype?
What are the ramifications of creating a homebrew world without an Astral Plane?
Why "be dealt cards" rather than "be dealing cards"?
Trouble understanding overseas colleagues
What't the meaning of this extra silence?
Is it correct to write "is not focus on"?
Was Spock the First Vulcan in Starfleet?
Ways to speed up user implemented RK4
What's a natural way to say that someone works somewhere (for a job)?
Can I use my Chinese passport to enter China after I acquired another citizenship?
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
Can I Retrieve Email Addresses from BCC?
Are there any comparative studies done between Ashtavakra Gita and Buddhim?
The baby cries all morning
How do I share function code between projects?
Microsoft AZURE blob triggered function working intermittentlyAzure function app and SignalRCan we have two separate bin folders within a single Function App?Is it possible to disable AAD Auth on specific Azure functions?Best method for deploying Azure function app application settingsAzure Function Transforms During VSTS BuildHow do I configure a session cookie in Azure Functions?Deploying a precompiled f# function to Azure Functions v2Grant Access to a Shared Mailbox From an ApplicationReference external script in JavaScript Azure Function code
What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.
For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.
How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.
For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0
I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?
I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.
Or is there any other good ways to achieve this?
azure-functions
add a comment |
What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.
For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.
How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.
For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0
I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?
I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.
Or is there any other good ways to achieve this?
azure-functions
You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.
– rickvdbosch
Mar 8 at 10:12
add a comment |
What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.
For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.
How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.
For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0
I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?
I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.
Or is there any other good ways to achieve this?
azure-functions
What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.
For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.
How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.
For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0
I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?
I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.
Or is there any other good ways to achieve this?
azure-functions
azure-functions
asked Mar 8 at 10:07
SamiRSamiR
297
297
You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.
– rickvdbosch
Mar 8 at 10:12
add a comment |
You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.
– rickvdbosch
Mar 8 at 10:12
You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.
– rickvdbosch
Mar 8 at 10:12
You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.
– rickvdbosch
Mar 8 at 10:12
add a comment |
1 Answer
1
active
oldest
votes
You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.
For your example that would be:
Shared logic resource group:
Function 1 version 1.0
Customer 1 group:
Function 2 version 1.0
Customer 2 resource group:
Function 2 version 1.1
Function 3 version 1.0
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060906%2fhow-do-i-share-function-code-between-projects%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.
For your example that would be:
Shared logic resource group:
Function 1 version 1.0
Customer 1 group:
Function 2 version 1.0
Customer 2 resource group:
Function 2 version 1.1
Function 3 version 1.0
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
add a comment |
You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.
For your example that would be:
Shared logic resource group:
Function 1 version 1.0
Customer 1 group:
Function 2 version 1.0
Customer 2 resource group:
Function 2 version 1.1
Function 3 version 1.0
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
add a comment |
You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.
For your example that would be:
Shared logic resource group:
Function 1 version 1.0
Customer 1 group:
Function 2 version 1.0
Customer 2 resource group:
Function 2 version 1.1
Function 3 version 1.0
You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.
For your example that would be:
Shared logic resource group:
Function 1 version 1.0
Customer 1 group:
Function 2 version 1.0
Customer 2 resource group:
Function 2 version 1.1
Function 3 version 1.0
answered Mar 12 at 12:18
Mark FoppenMark Foppen
12
12
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
add a comment |
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers
– SamiR
Mar 12 at 12:36
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060906%2fhow-do-i-share-function-code-between-projects%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.
– rickvdbosch
Mar 8 at 10:12